Create verification request
/accounts/create_verification_request
Target audience: Developers
Release version: 4.9.24
Create verification request¶
Introduction¶
This endpoint creates a verification request for an account. A confirmation email will be sent to the account's email address. If the account is already verified, the request will be rejected.
An optional verification_url can be provided, which will be stored in the request metadata and can be used to direct the user to a specific verification page.
This is the first step in the account verification flow. Use Pending verification request to check the status of a request, and Verify account to complete the verification using the confirmation code.
URI¶
| Environment | URI |
|---|---|
| Stage | https://payway-api.stage.adeprimo.se/external/api/v1/accounts/create_verification_request |
| Production | https://backend.worldoftulo.com/external/api/v1/accounts/create_verification_request |
Requirements¶
| Identity | Scope |
|---|---|
| No | /external/account/w |
Parameters¶
| Field | Required | Type | Description |
|---|---|---|---|
| account_id | Required | String | The id of the account to create a verification request for. Size range: ..24 Allowed values: "/^[a-f\d]{24}$/i" |
| verification_url | Optional | String | URL to direct the user to for verification. Size range: ..1024 |
Curl Example¶
curl --request POST \
--url https://payway-api.stage.adeprimo.se/external/api/v1/accounts/create_verification_request \
--header 'accept: application/json' \
--header 'authorization: Bearer <token>' \
--header 'content-type: application/json' \
--data '{
"account_id": "5c6291d537c2ed78a11518b7",
"verification_url": "https://domain.tld/verify"
}'
Response¶
| Field | Description |
|---|---|
| id | The id of the created verification request |
| status | The status of the verification request |
| expires_at | Timestamp for when the verification request expires |
Example response¶
HTTP 201 Created
{
"id": "5caf3c206e95528fe2943abe",
"status": "pending",
"expires_at": "2024-01-15 12:00:00 UTC"
}
Errors¶
This API uses the common error conventions of the Payway API
HTTP 409 Conflict¶
| Name | Type | Description |
|---|---|---|
| already_verified | Object | The account is already verified |