Skip to content
API Reference

Invitation

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

Overview

The Invitation 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/invitations/:idGet an invitation
GET/user_management/invitations/by_token/:tokenFind an invitation by token
GET/user_management/invitationsList invitations
GET/user_management/invitations/:id/resendResend an invitation
GET/user_management/invitations/:id/acceptAccept an invitation
POST/user_management/invitations/:id/revokeRevoke an invitation

Get an invitation

GET /user_management/invitations/:id — get an invitation.

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

Find an invitation by token

GET /user_management/invitations/by_token/:token — find an invitation by token.

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

List invitations

GET /user_management/invitations — list invitations.

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

Resend an invitation

GET /user_management/invitations/:id/resend — resend an invitation.

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

Accept an invitation

GET /user_management/invitations/:id/accept — accept an invitation.

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

Revoke an invitation

POST /user_management/invitations/:id/revoke — revoke an invitation.

1import Paycux from '@paycux/node';
2
3const paycux = new Paycux(process.env.PAYCUX_API_KEY);
4
5const result = await paycux.revoke_an_invitation();
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.