Endpoints

This document outlines all available endpoints in the Nurul API.

Base URL

All API requests should be made to:

https://api.nurul.ai/v1

Prompts

Generate a Prompt

POST /prompts

Generate a new therapeutic prompt based on provided parameters.

Request Body

{
  "primaryConcern": "anxiety",
  "therapeuticApproach": "cbt",
  "sessionContext": "follow_up",
  "clientBackground": "Experiencing workplace stress",
  "goals": ["identify_triggers", "develop_coping_strategies"],
  "preferences": {
    "tone": "supportive",
    "length": "medium",
    "focus": "practical"
  }
}

Response

List Saved Prompts

GET /prompts

Retrieve a list of your saved prompts.

Query Parameters

  • limit (optional): Number of prompts to return (default: 10, max: 100)

  • offset (optional): Pagination offset

  • filter (optional): Filter by approach, concern, or date

Response

Get a Specific Prompt

GET /prompts/{prompt_id}

Retrieve a specific prompt by ID.

Response

Templates

List Templates

GET /templates

Retrieve available prompt templates.

Query Parameters

  • approach (optional): Filter by therapeutic approach

  • category (optional): Filter by category

  • limit (optional): Number of templates to return

Response

Analytics

Get Usage Statistics

GET /analytics/usage

Retrieve usage statistics for your account.

Query Parameters

  • start_date: Start date for the analysis period

  • end_date: End date for the analysis period

  • metrics: Comma-separated list of requested metrics

Response

Error Responses

All endpoints may return the following error responses:

400 Bad Request

401 Unauthorized

429 Too Many Requests

Webhooks

Register Webhook

POST /webhooks

Register a new webhook for event notifications.

Request Body

Response

Next Steps

Last updated