Prerequisites
- A Braintest partner account with API access
- Your API key from the organizer panel
curlor any HTTP client
Authentication paths
Every record includes an organizer setting calledtests_auth_required:
true(default): profile authentication requires SMS verification.POST /record/{token}/auth/returns adraft_token, then you finish withPUT /record/{token}/auth/verify/and the SMS code.false:POST /record/{token}/auth/creates the profile immediately.
Step-by-step flow
1
Get your API key
Log in to the Braintest organizer panel and generate an API key. Send it in the
API-KEY header on every request.2
Verify the connection
Test that your key works by calling the connection endpoint.Expected response:
3
List available records
Fetch the list of records and find one with Example response (truncated):Save the
status: 2 (ready) and auth_required: true. Note the tests_auth_required field so you know which path to follow.token value for the next step.4
Start authentication
Send the participant profile to the auth endpoint. The request body is the same regardless of the path.Branch on the response.SMS path (Instant path (
tests_auth_required: true) returns a draft_token and sends an SMS code to the participant’s mobile:tests_auth_required: false) returns the profile immediately. Skip the next step.5
Verify the SMS code (SMS path only)
Ask the participant for the code they received and submit it with the Expected response:Skip this step when
draft_token. The draft token is valid for 5 minutes.tests_auth_required is false.6
Fetch questions
Retrieve the test questions for the authenticated record.Example response:
7
Submit answers
Send the participant answers back. The Expected response:
record array maps question IDs to selected option values.8
Retrieve the result
After submission, fetch the scored result.Example response:You can also request HTML output by calling
/result/html/ instead.Next steps
- Learn about authentication details
- Explore test records and cognitive roadmaps
- Follow the cognitive roadmap guide for multi-test flows

