Access checks
Access checks in the Paycux API: the endpoints, the fields they accept and return, and a working request in three languages.
Overview
The Access checks 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.
| Field | Type | Notes |
|---|---|---|
| id | string | Stable identifier, prefixed per resource type. |
| object | string | The resource name, useful when handling webhook payloads. |
| created_at | timestamp | ISO 8601, always UTC. |
| updated_at | timestamp | ISO 8601, always UTC. |
Endpoints
Every endpoint is authenticated with a bearer token and scoped to the environment the key belongs to.
| Method | Path | What it does |
|---|---|---|
| POST | /authorization/organization_memberships/:organization_membership_id/check | Check authorization |
| GET | /authorization/organization_memberships/:organization_membership_id/resources | List resources for an organization membership |
| GET | /authorization/resources/:resource_id/organization_memberships | List memberships for a resource |
| GET | /authorization/organizations/:organization_id/resources/:resource_type_slug/:external_id/organization_memberships | List memberships for a resource by external ID |
| GET | /authorization/organization_memberships/:organization_membership_id/resources/:resource_id/permissions | List effective permissions for an organization membership on a resource |
| GET | /authorization/organization_memberships/:organization_membership_id/resources/:resource_type_slug/:external_id/permissions | List effective permissions for an organization membership on a resource by external ID |
Check authorization
POST /authorization/organization_memberships/:organization_membership_id/check — check authorization.
1import Paycux from '@paycux/node';23const paycux = new Paycux(process.env.PAYCUX_API_KEY);45const result = await paycux.check_authorization();6console.log(result);
List resources for an organization membership
GET /authorization/organization_memberships/:organization_membership_id/resources — list resources for an organization membership.
1import Paycux from '@paycux/node';23const paycux = new Paycux(process.env.PAYCUX_API_KEY);45const result = await paycux.list_resources_for_an_organization_membership();6console.log(result);
List memberships for a resource
GET /authorization/resources/:resource_id/organization_memberships — list memberships for a resource.
1import Paycux from '@paycux/node';23const paycux = new Paycux(process.env.PAYCUX_API_KEY);45const result = await paycux.list_memberships_for_a_resource();6console.log(result);
List memberships for a resource by external ID
GET /authorization/organizations/:organization_id/resources/:resource_type_slug/:external_id/organization_memberships — list memberships for a resource by external ID.
1import Paycux from '@paycux/node';23const paycux = new Paycux(process.env.PAYCUX_API_KEY);45const result = await paycux.list_memberships_for_a_resource_by_external_id();6console.log(result);
List effective permissions for an organization membership on a resource
GET /authorization/organization_memberships/:organization_membership_id/resources/:resource_id/permissions — list effective permissions for an organization membership on a resource.
1import Paycux from '@paycux/node';23const paycux = new Paycux(process.env.PAYCUX_API_KEY);45const result = await paycux.list_effective_permissions_for_an_organization_membership_on_a_resource();6console.log(result);
List effective permissions for an organization membership on a resource by external ID
List effective permissions for an organization membership on a resource by external ID controls what the credential is allowed to do. Grant the narrowest set that lets the integration work, and widen it deliberately.
Scopes are evaluated at the API boundary, so an over-broad token is a real risk even if your own code never uses the extra capability.
Errors
Errors return a JSON body with a machine-readable code, a human-readable message and, for validation failures, the offending field.
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | A required field is missing or malformed. |
| 401 | unauthorized | The API key is missing, revoked, or from another environment. |
| 404 | not_found | No record with that ID in this environment. |
| 429 | rate_limit_exceeded | Back off and retry after the interval in Retry-After. |