Skip to content

Verify email change

/accounts/verify_email_change

Target audience: Developers

Verify email change

Introduction

This endpints is used to verify a requested change of email for an account.

URI

Environment URI
Stage https://payway-api.stage.adeprimo.se/external/api/v1/accounts/verify_email_change
Production https://backend.worldoftulo.com/external/api/v1/accounts/verify_email_change

Requirements

Identity Scope
No /external/account/w

Parameters

Field Required Type Description
account_id Required String The id of the account.
Size range ..24
Allowed values: "/^[a-f\d]{24}$/i"
confirmation_code Required String The confirmation code.
Size range ..36

Curl Example

curl --request PUT \
  --url https://payway-api.stage.adeprimo.se/external/api/v1/accounts/verify_email_change \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <insert token here>' \
  --header 'Content-Type: application/json' \
  --data '{
    "account_id": "684f60e417c0f87b3ee7f571",
    "confirmation_code": "3a3107f9-c021-41a4-a4e0-f1e6eae3d56b"
}'

Response

Example Response

HTTP 200 OK
{
  "id": "683005f1ad659d7fd87a83e6"
}

Errors

Example error response

{
  "code": "not_found",
  "field": "account",
  "message": "account could not be found",
  "pw_correlation_id": "pw-api-ac52208e-6fed-4aea-8f53-3798b1c3bec9"
}

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
not_found Object The object could not be found

HTTP 500 Internal Server Error

Name Type Description
internal_server_error Object Something unexpected happened server side