Skip to content

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.

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

Example error response

HTTP 400 Bad request
{
  "code": "unknown_parameter",
  "message": "Unknown parameters: my_parameter"
}

HTTP 400 Bad Request

Name Type Description
invalid_parameter Object Validation error on any of the fields in the posted json
json_parser_error Object The request body could not be parsed as valid json
invalid_content_type_error Object The requests Content-Type header isn't set to application/json
unknown_parameter Object One or more of the fields in the posted json was not recognized

HTTP 404 Not Found

Name Type Description
does_not_exist Object The account does not exist

HTTP 409 Conflict

Name Type Description
already_verified Object The account is already verified

HTTP 500 Internal Server Error

Name Type Description
internal_server_error Object Something unexpected happened server side