PlatformXeDocs
Get API Key

Overrides API

Create, list, and remove per-user permission overrides.

Admin overrides grant or deny specific permissions for individual users, bypassing role evaluation.

Scope: permissions:manage

Rate limit: 500/hr

Create an override

POST /api/v1/permissions/overrides

FieldTypeRequiredDescription
adminIdstringYesUser ID to override
pathstringYesPermission path
actionstringYesAction to override
effectstringYesGRANT or DENY
reasonstringYesReason for override (min 10 chars)
expiresAtstringNoISO 8601 UTC expiry timestamp
curl -X POST https://api.platformxe.com/api/v1/permissions/overrides \
  -H "Content-Type: application/json" \
  -H "x-api-key: pxk_live_your_api_key_here" \
  -d '{
    "adminId": "user_xyz789",
    "path": "billing",
    "action": "delete",
    "effect": "DENY",
    "reason": "Temporary block during financial audit period",
    "expiresAt": "2026-06-01T00:00:00.000Z"
  }'
await px.permissions.createOverride({
  adminId: 'user_xyz789',
  path: 'billing',
  action: 'delete',
  effect: 'DENY',
  reason: 'Temporary block during financial audit period',
  expiresAt: '2026-06-01T00:00:00.000Z',
});

List overrides for a user

GET /api/v1/permissions/overrides/:adminId

curl https://api.platformxe.com/api/v1/permissions/overrides/user_xyz789 \
  -H "x-api-key: pxk_live_your_api_key_here"
const overrides = await px.permissions.listOverrides('user_xyz789');

Response

{
  "success": true,
  "data": {
    "overrides": [
      {
        "id": "ovr_abc123",
        "adminId": "user_xyz789",
        "path": "billing",
        "action": "delete",
        "effect": "DENY",
        "reason": "Temporary block during financial audit period",
        "expiresAt": "2026-06-01T00:00:00.000Z",
        "createdAt": "2026-04-01T10:00:00.000Z"
      }
    ]
  }
}

Delete an override

DELETE /api/v1/permissions/overrides/remove/:id

curl -X DELETE https://api.platformxe.com/api/v1/permissions/overrides/remove/ovr_abc123 \
  -H "x-api-key: pxk_live_your_api_key_here"
await px.permissions.deleteOverride('ovr_abc123');

Overrides with an expiresAt timestamp are automatically excluded from evaluation after expiry. You do not need to delete expired overrides — they are cleaned up during the 90-day audit retention cron.

Error responses

CodeDescription
BAD_REQUESTMissing required fields, reason too short, or invalid effect
NOT_FOUNDOverride ID does not exist
FORBIDDENAPI key missing permissions:manage scope