Skip to main content
Use this endpoint to link a participant profile to a standalone test record. The response depends on the organizer setting tests_auth_required: with SMS verification enabled, the API returns a draft_token and sends a code to the participant; without SMS, the profile is created immediately.
This endpoint is for standalone records only. If the record belongs to a cognitive roadmap, use POST /roadmap/{token}/auth/ instead. Calling this endpoint on a roadmap record returns HTTP 409.

Endpoint

Headers

Path parameters

string
required
The UUID token of the test record.

Body parameters

string
required
Participant’s full name. Maximum 50 characters. Must contain Persian letters only.
string
required
Participant’s mobile number in Iranian format: 11 digits starting with 09, for example 09123456789.
string
required
Participant’s birth date in ISO 8601 format, for example 1990-05-15.
boolean
required
Participant’s gender. true for male, false for female.
integer
Your own unique identifier for this participant. Must be unique per organizer. Useful for idempotent lookups later.

Response

The response shape depends on the organizer’s tests_auth_required setting, which is echoed in every record payload.
boolean
Organizer policy. true means SMS verification is required and a draft_token is returned. false means the profile is created immediately.
string
Returned only when tests_auth_required is true. Pass this to PUT /record/{token}/auth/verify/ along with the SMS code. Valid for 5 minutes.
object
Returned only when tests_auth_required is false. Contains the created profile with token, external_id, case_number, mobile, name, age, birth, and is_male.

Example request

Example response (SMS verification enabled)

When tests_auth_required is true (default), the API sends an SMS code and returns a draft token:
Next step: call PUT /record/{token}/auth/verify/ with the draft_token and the SMS code the participant received.

Example response (SMS verification disabled)

When tests_auth_required is false, the profile is created immediately:
Next step: call GET /record/{token}/questions/ to fetch the test questions.

Error responses