Create a new age verification session
Creates a new verification session. The user should be redirected to the `verify_url` returned in the response to complete verification.
Authorization
bearerAuth AuthorizationBearer <token>
API token obtained from your Bouncer dashboard
In: header
Request Body
application/json
age_target*integer
The minimum age to verify. User must be at least this age for verification to succeed.
Value in
8 | 13 | 16 | 18 | 21 | 25 | 30redirect_url*string
URL to redirect the user after verification completes (success or failure)
Format
uriLength
length <= 2048force_kyc?boolean
If true, always require ID document verification regardless of age estimation result
Default
falsemetadata?|null
Custom key:value pairs to attach to the session (e.g., ['order_id:123', 'user_id:456'])
webhook_url?string|null
URL to receive webhook notifications when the session status changes
Format
uriLength
length <= 2048expiration_time?integer
Session expiration time in seconds (default: 300 = 5 minutes)
Default
300Range
60 <= value <= 3600Response Body
application/json
application/json
application/json
curl -X POST "https://bouncer.test/api/v2/session" \ -H "Content-Type: application/json" \ -d '{ "age_target": 18, "redirect_url": "https://your-app.com/callback", "webhook_url": "https://your-app.com/webhooks/bouncer", "metadata": [ "order_id:12345", "user_id:67890" ], "expiration_time": 300 }'{
"id": "550e8400-e29b-41d4-a716-446655440000",
"verify_url": "https://bouncer.test/verify/550e8400-e29b-41d4-a716-446655440000",
"issued_at": "2024-01-15T10:30:00Z",
"expires_at": "2024-01-15T10:35:00Z"
}{
"message": "Unauthenticated."
}{
"message": "The age_target field is required.",
"errors": {
"age_target": [
"The age_target field is required."
],
"redirect_url": [
"The redirect_url must be a valid URL."
]
}
}