/v1/user

Create a new user that will go through the Counsel onboarding flow

Create a new "draft" user that will go through the onboarding flow within Counsel.

This API is only available if the organization has enabled the onboarding flow. Contact your Counsel representative to enable this feature.
post/v1/user/draft/

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

dobstring

date of birth in YYYY-MM-DD format (ISO 8601). Must be between 18 and 120 years old

sex_assigned_at_birth'Male' | 'Female'
gender'Male' | 'Female' | 'Other'
emailstring email

email address

state'AL' | 'AK' | 'AZ' | 'AR' | 'CA' | 'CO' | 'CT' | 'DE' | 'FL' | 'GA' | 'HI' | 'ID' | 'IL' | 'IN' | 'IA' | 'KS' | 'KY' | 'LA' | 'ME' | 'MD' | 'MA' | 'MI' | 'MN' | 'MS' | 'MO' | 'MT' | 'NE' | 'NV' | 'NH' | 'NJ' | 'NM' | 'NY' | 'NC' | 'ND' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VT' | 'VA' | 'WA' | 'WV' | 'WI' | 'WY' | 'DC'

US state abbreviation

metadataobject nullable

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

external_idstring nullable

Client-supplied stable identifier for this user, unique within your organization. Carried over to the onboarded user when the draft converts.

id_verifiedboolean nullable

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

first_namestring

Legal given name(s)

last_namestring

Legal family name

preferred_namestring nullable

Preferred name

idstring uuid
unconfirmed_phone_numberstring

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

Example request

{
  "dob": "1990-01-01",
  "email": "john.doe@example.com",
  "state": "CA",
  "metadata": {
    "plan": "pro",
    "external_id": "1234567890"
  },
  "external_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
  "id_verified": true,
  "addresses": [
    {
      "line1": "123 Main St",
      "line2": "Apt 2",
      "city": "San Francisco",
      "state": "CA",
      "zip": "12345"
    }
  ],
  "first_name": "John",
  "last_name": "Doe",
  "preferred_name": "Bob",
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "unconfirmed_phone_number": "+18007006000"
}

Response

A partially-created user still going through onboarding. Used if we need to handle consents and onboarding within Counsel. Converts to a user once onboarding completes.

idstring uuid required
first_namestring
last_namestring
preferred_namestring nullable
dobstring

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

sex_assigned_at_birth'Male' | 'Female'
gender'Male' | 'Female' | 'Other'
emailstring email

email address

state'AL' | 'AK' | 'AZ' | 'AR' | 'CA' | 'CO' | 'CT' | 'DE' | 'FL' | 'GA' | 'HI' | 'ID' | 'IL' | 'IN' | 'IA' | 'KS' | 'KY' | 'LA' | 'ME' | 'MD' | 'MA' | 'MI' | 'MN' | 'MS' | 'MO' | 'MT' | 'NE' | 'NV' | 'NH' | 'NJ' | 'NM' | 'NY' | 'NC' | 'ND' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VT' | 'VA' | 'WA' | 'WV' | 'WI' | 'WY' | 'DC'

US state abbreviation

created_atstring date-time required

datetime in ISO 8601 format

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_atunknown
external_idstring nullable

Client-supplied stable identifier for this user, unique within your organization. Carried over to the onboarded user when the draft converts.

id_verifiedboolean nullable

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

Example response

{
  "dob": "1990-01-01",
  "email": "john.doe@example.com",
  "state": "CA",
  "created_at": "2030-01-01T00:00:00Z",
  "metadata": {
    "plan": "pro",
    "external_id": "1234567890"
  },
  "external_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
  "id_verified": true,
  "addresses": [
    {
      "line1": "123 Main St",
      "line2": "Apt 2",
      "city": "San Francisco",
      "state": "CA",
      "zip": "12345"
    }
  ]
}

Changes

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