Set a new password with a reset code
const url = 'https://api.deploybase.eu/api/v1/api/v1/public/password-reset/confirm';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"code":"example","new_password":"example","user_id":"69629026806489455"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.deploybase.eu/api/v1/api/v1/public/password-reset/confirm \ --header 'Content-Type: application/json' \ --data '{ "code": "example", "new_password": "example", "user_id": "69629026806489455" }'Sets the password with the code from a reset link, then mails a “password changed” notice to the account’s address. No authentication required: the code is the authorisation. Limited to 10 per user and 30 per IP per hour.
Request Body
Section titled “ Request Body ”User id and code from the link, and the new password
object
Example
69629026806489455Responses
Section titled “ Responses ”OK
object
object
object
Example
{ "data": { "status": "done" }}The code did not work (ACCOUNT_CODE_INVALID) or the password was refused (INVALID_INPUT, details.field=password)
object
object
object
The structured outcome (ADR-030, DEP-965). Optional and additive: only the operations endpoints fill them so far, and a client that does not know them reads the rest as before.
object
Example
{ "details": { "reason": "used" }}Too many attempts; see Retry-After
object
object
object
The structured outcome (ADR-030, DEP-965). Optional and additive: only the operations endpoints fill them so far, and a client that does not know them reads the rest as before.
Example generated
{ "code": "example", "details": "example", "docs_url": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }, "next_actions": [ { "action": "example", "cli": "example", "description": "example", "http": "example", "tool": "example" } ], "reason": "example", "who_acts": "example"}Temporarily unavailable
object
object
object
The structured outcome (ADR-030, DEP-965). Optional and additive: only the operations endpoints fill them so far, and a client that does not know them reads the rest as before.
Example generated
{ "code": "example", "details": "example", "docs_url": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }, "next_actions": [ { "action": "example", "cli": "example", "description": "example", "http": "example", "tool": "example" } ], "reason": "example", "who_acts": "example"}Live 582ac705 built