/v1/end-user-jwt

Generate a signed app URL for the authenticated user

Generates a signed app URL for the user identified by the JWT subject claim. For backward compatibility, accepts an optional user_id in the body.

post/v1/user/signedAppUrl/

Request

  • Base URL
    https://api.counselhealth.com (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Headers

Idempotency-Keystring
Example:550e8400-e29b-41d4-a716-446655440000

Optional idempotency key. Repeat requests with the same key and body return the original result.

Request body

user_idstring uuid
agent_contextobject

Example request

{
  "action": {
    "module": "get_care",
    "initial_messages": [
      {
        "body": "I am feeling sick today and need to speak to a doctor",
        "role": "patient"
      },
      {
        "body": "Let me route you to Counsel AI",
        "role": "model"
      }
    ],
    "metadata": {
      "external_session_id": "abc123",
      "plan": "pro",
      "linked_thread_title": "Lightheadedness when standing"
    }
  }
}

Response

Default Response

urlstring uri required
expirystring date-time required

datetime in ISO 8601 format

Example response

{
  "expiry": "2030-01-01T00:00:00Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.