tests_auth_required and echoed on every record and roadmap payload.
Required fields
Every profile must include the following fields when calling an authentication endpoint:Optional fields
Authentication paths
The organizer settingtests_auth_required (visible on every record and roadmap payload) selects the flow. Your integration should always read the flag from the resource and branch on it.
Path A: SMS verification (tests_auth_required: true, default)
POST /record/{token}/auth/orPOST /roadmap/{token}/auth/with the profile data.- The API validates the fields, sends an SMS code to the participant’s mobile, and returns a
draft_token. - Prompt the participant for the code and call
PUT /.../auth/verify/with thedraft_tokenandvcode. - On success, the API returns the final profile (or role profiles) and links them to the record or every record in the roadmap.
Path B: Instant (tests_auth_required: false)
POST /record/{token}/auth/orPOST /roadmap/{token}/auth/with the profile data.- If validation passes, the profile is created (or matched by
external_id) and linked immediately. - There is no SMS code, email link, or secondary confirmation. Move directly to fetching questions or completing tests.
Validation checks (both paths)
Regardless of the path, the API always validates:- Format: name length, mobile pattern, birth date format, and boolean type.
- Prerequisite checks: age and gender restrictions defined by the specific test.
- Uniqueness:
external_idmust be unique within your organizer account.
successful: false with a descriptive message in the messages array.
Age and gender prerequisites
Some psychological tests restrict participation by age or gender. For example, a test may specify:min_age: 18max_age: 65gender_permission:"male"or"female"(ornullfor no restriction)
Auto-generated fields
After successful authentication, Braintest assigns the following fields automatically:Example payload (standalone record)
Example payload (roadmap)
For roadmaps, provide a sharedmobile and an array of role/profile pairs:

