Skip to content
API Reference

Password reset

Password reset in the Paycux API: the endpoints, the fields they accept and return, and a working request in three languages.

Overview

The Password reset resource is part of the Paycux API. Every field below is returned on every representation of the object, so you can rely on its shape across list, read and write calls.

FieldTypeNotes
idstringStable identifier, prefixed per resource type.
objectstringThe resource name, useful when handling webhook payloads.
created_attimestampISO 8601, always UTC.
updated_attimestampISO 8601, always UTC.

Endpoints

Every endpoint is authenticated with a bearer token and scoped to the environment the key belongs to.

MethodPathWhat it does
GET/user_management/password_reset/:idGet a password reset token
POST/user_management/password_resetCreate a password reset token
POST/user_management/password_reset/confirmReset the password

Get a password reset token

GET /user_management/password_reset/:id — get a password reset token.

1import Paycux from '@paycux/node';
2
3const paycux = new Paycux(process.env.PAYCUX_API_KEY);
4
5const result = await paycux.get_a_password_reset_token();
6console.log(result);

Create a password reset token

POST /user_management/password_reset — create a password reset token.

1import Paycux from '@paycux/node';
2
3const paycux = new Paycux(process.env.PAYCUX_API_KEY);
4
5const result = await paycux.create_a_password_reset_token();
6console.log(result);

Reset the password

POST /user_management/password_reset/confirm — reset the password.

1import Paycux from '@paycux/node';
2
3const paycux = new Paycux(process.env.PAYCUX_API_KEY);
4
5const result = await paycux.reset_the_password();
6console.log(result);

Errors

Errors return a JSON body with a machine-readable code, a human-readable message and, for validation failures, the offending field.

StatusCodeMeaning
400invalid_requestA required field is missing or malformed.
401unauthorizedThe API key is missing, revoked, or from another environment.
404not_foundNo record with that ID in this environment.
429rate_limit_exceededBack off and retry after the interval in Retry-After.