Set a new password with a reset code
Consumes the code and replaces the password.
POST/api/v3/users/password/reset
Send two credentials: your own, and the customer's.
How authentication works- Yours
x-api-keyorAuthorization: Bearer- The customer's
User-Authorization: BearerorUser-Identifier
Language
Environment
Credentials
Your credential
The customer's credential
Choose an environment first.
cURL request
curl -X POST https://api.btcdirect.eu/api/v3/users/password/reset \ -H "x-api-key: $BTCD_API_KEY" \ -H "User-Authorization: Bearer $BTCD_USER_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "email": "customer@example.com", "code": "123456", "newPassword": "your-new-passphrase" }'Choose an environment to run this.
Response
The password was changed.
{ "message": "The password was changed."}Request
emailemailrequired
Examplecustomer@example.com
codestringrequired
newPasswordstringrequired
Responses
204The password was changed.400Invalid request.401Bad credentials.503`maintenance` — full maintenance is on, and every endpoint refuses every request until it ends (`endsAt`, when it has an end). Nothing is wrong with the request and nothing was done; the same request is accepted afterwards. Told apart from any other 503 by `code`.Every failure answers with a message and a code. Switch on the code — messages are written for people and can change.