Skip to content

Create Password Reset

/accounts/create_password_request

Target audience: Developers

Request password reset

Introduction

This endpoint is used to create a password reset for an existing account. This is to be used when you wish to deal with the confirmation flow entirely on the side of the implementing application. No e-mails will be triggered from Payway when this happens. You must finish up the password reset by calling the complete_password_reset-endpoint.

URI

Environment URI
Stage https://payway-api.stage.adeprimo.se/external/api/v1/accounts/create_password_reset
Production https://backend.worldoftulo.com/external/api/v1/accounts/create_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"

Curl Example

1
2
3
4
5
6
7
8
curl --request POST \
  --url https://payway-api.stage.adeprimo.se/external/api/v1/accounts/create_password_reset \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <insert token here>' \
  --header 'Content-Type: application/json' \
  --data '{
    "email": "test@example.com"
}'

Response

Example Response

1
2
3
4
5
6
7
HTTP 200 OK
{
  "item": {
    "account_id": "606c2e1295cfeb8cc3b9ade4",
    "confirmation_code": "a2c62b62-0d38-4999-b008-6133197ba232"
  }
}

Errors

Example error response

1
2
3
4
5
6
HTTP 404 Not Found
{
  "code": "not_found",
  "field": "contact_email",
  "message": "contact_email could not be found"
}

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