Error handling
Standard error response structure of the Perpetuus API.
The Perpetuus API uses standard HTTP status codes to indicate the success or failure of an API request. On error, the API returns a structured JSON payload with details about the problem to make diagnosis easier.
JSON error structure
Errors returned by the API follow this envelope (the Error schema in the OpenAPI document):
{
"data": null,
"error": {
"status": 404,
"name": "NotFoundError",
"message": "Board not found",
"details": {}
}
}status: The corresponding HTTP status code.name: The error class or category (for example:ValidationError,UnauthorizedError,ForbiddenError,NotFoundError).message: A clear, human-readable description of the error.details: Additional, case-specific details (such as missing-field validation or rate-limit data on429). May be absent.
HTTP status code table
| Code | Error name | Common cause | How to resolve |
|---|---|---|---|
| 400 | Bad Request | Invalid parameters, incorrect payloads, or, with a JWT, a missing x-tenant-id header | Check the payload. With an API key (ppt_…) or an OAuth token, x-tenant-id is optional; with a JWT, send the organization slug. |
| 401 | Unauthorized | Invalid, expired, or revoked token in the Authorization header | Create a new API key in Configurações → API Tokens e MCP and confirm validity with GET /auth/token-info. |
| 403 | Forbidden | Request without Authorization on an authenticated route; key missing the route scope; user without permission; inactive organization; x-tenant-id for a different organization; or the plan does not include the feature | Send Authorization: Bearer ppt_…, check the key scopes and the user's roles, or talk to the administrator about the plan. |
| 404 | Not Found | The record with the specified documentId does not exist, or the URL is incorrect | Confirm that the documentId (for example, of a card or board) was typed correctly and has not been deleted. |
| 422 | Unprocessable Entity | A business validation failed (for example, trying to move a card to a blocked phase, or a price below the minimum) | Review the board rules or automation flow to see which business validation blocked the action. |
| 429 | Too Many Requests | The per-minute limit of the API key, OAuth connection, or organization was reached (see Rate limits) | Wait the seconds in Retry-After and reduce the frequency; for volume, use the bulk endpoints. |
| 500 | Internal Server Error | An unexpected error on Perpetuus servers | Try again in a few seconds. If it persists, contact technical support. |
Validation error example (400)
When trying to create a card without filling in the required dynamic fields defined for the entry phase (Phase 0):
{
"data": null,
"error": {
"status": 400,
"name": "ValidationError",
"message": "Fields validation failed",
"details": {
"errors": [
{
"path": ["name"],
"message": "O campo 'name' é obrigatório no formulário de entrada deste Board."
}
]
}
}
}