/v1/user

Disable a user from starting new conversations or sending messages

Disable a user by expiring their access immediately. The user can still open the embedded iFrame or WebView app and view their existing history, but Counsel becomes read-only — they cannot start new conversations or send new messages until you re-enable them (e.g., on resubscription) via POST /v1/user/{userId}/enable.

This does not sign the user out of any active sessions. If you also need to terminate sessions, call POST /v1/user/{userId}/signOut separately. Set cancel_subscription to true to also cancel the user's subscription at the end of the current billing period. When omitted or false, the subscription is not changed.

post/v1/user/{userId}/disable/

Request

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

Path parameters

userIdstring required

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

cancel_subscriptionboolean

Response

Default Response

idstring uuid required
created_atstring date-time required

datetime in ISO 8601 format

first_namestring required
last_namestring required
preferred_namestring nullable
dobstring required

date of birth in YYYY-MM-DD format (ISO 8601)

phonestring nullable

US phone number. Supported formats: 8007006000, 800-700-6000, +1 800-700-6000, +18007006000, +1(800)7006000, (800)700-6000

sex_assigned_at_birth'Male' | 'Female' required
gender'Male' | 'Female' | 'Other' nullable
racestring[] nullable
access_expires_atstring date-time nullable

datetime in ISO 8601 format

emailstring email nullable

email address

metadataobject nullable

Custom key-value metadata for external users. Max 25 keys, each value ≤ 1800 characters. Keys must be alphanumeric with underscores/hyphens only.

onboarded_atstring date-time nullable

datetime in ISO 8601 format

external_idstring nullable

Client-supplied stable identifier for this user, unique within your organization. Can be used in place of the Counsel user ID on GET/PATCH /v1/user/{id}.

id_verifiedboolean nullable

Whether this user's identity has been verified. Sending true requires your organization to be granted API identity verification by Counsel support; otherwise the request fails with 403.

status'success' required

Example response

{
  "created_at": "2030-01-01T00:00:00Z",
  "dob": "1990-01-01",
  "phone": "+18007006000",
  "addresses": [
    {
      "line1": "123 Main St",
      "line2": "Apt 2",
      "city": "San Francisco",
      "state": "CA",
      "zip": "12345"
    }
  ],
  "race": [
    "White",
    "Asian"
  ],
  "medical_profile": {
    "conditions": [
      "Diabetes"
    ],
    "medications": [
      "Metformin"
    ],
    "medication_allergies": [
      "Tylenol"
    ],
    "surgeries": [
      "Appendectomy"
    ],
    "family_history": [
      "Diabetes"
    ],
    "doctors": {
      "pcp_name": "Dr. Joe Doe",
      "specialist_types": [
        "Cardiologist"
      ]
    },
    "additional_details": {}
  },
  "access_expires_at": "2030-01-01T00:00:00Z",
  "email": "john.doe@example.com",
  "metadata": {
    "plan": "pro",
    "external_id": "1234567890"
  },
  "onboarded_at": "2030-01-01T00:00:00Z",
  "external_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
}

Changes

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