Skip to content

Request password reset

/accounts/request_password_reset

Target audience: Developers

Request password reset

Introduction

This endpoint is used to trigger a password reset for an existing account. It will send a mail with a link to complete the reset process.

URI

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

Requirements

Identity Scope
No /external/account/w

Parameters

Field Required Type Description
email Required String The e-mail address of the account for which to initiate the password reset process.
Size range: ..1024
Allowed values: "/\A[\w+-.]+@[a-z\d-]+(.[a-z]+)*.[a-z]+\z/i"
return_url Optional String The url with which back buttons will be populated in the password reset flow.
Allowed values: Absolute uri. For example: http://www.google.com
device_info Optional Object Object containing information about the used device. Used for logging purposes.
ip_address
Optional String The IP address (IPv4 or IPV6) of the used device
user_agent
Optional String The user agent of the used device

Curl Example

curl --request POST \
  --url https://payway-api.stage.adeprimo.se/external/api/v1/accounts/request_password_reset \
  --header 'accept: application/json' \
  --header 'authorization: Bearer token' \
  --header 'content-type: application/json' \
  --data '{
            "email": "test@example.com"
          }'

Response

Example Response

HTTP 204 No Content
{}

Errors

Example error response

HTTP 400 Bad Request
{
  "code": "invalid_parameter",
  "field": "contact_email",
  "message": "Parameter must match format (?i-mx:\\\\A[\\\\w+\\\\-.]+@[a-z\\\\d\\\\-]+(\\\\.[a-z]+)*\\\\.[a-z]+\\\\z)"
}

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 package could not be found

HTTP 500 Internal Server Error

Name Type Description
internal_server_error Object Something unexpected happened server side