Errors and Support
The Platica API uses standard HTTP status codes to indicate whether a request succeeded or failed. This section describes the error formats, common codes, and how to get help.
Error Format
Every error response follows a consistent JSON format:
{
"code": 404,
"error": "Not Found - El recurso no existe",
"details": "Agent not found"
} | Field | Type | Description |
|---|---|---|
code | number | HTTP status code |
error | string | Descriptive error message |
details | string | Additional information about the error (optional) |
Common Error Codes
| Code | Status | Description |
|---|---|---|
400 | Bad Request | The request has validation errors or an incorrect format |
401 | Unauthorized | API key invalid, expired, or not provided |
403 | Forbidden | You do not have permission to access this resource |
404 | Not Found | The requested resource does not exist |
422 | Unprocessable Entity | The request is valid but could not be processed |
429 | Too Many Requests | You have exceeded the request limit |
500 | Internal Server Error | Internal server error |
503 | Service Unavailable | Service temporarily unavailable |
400 - Bad Request:
{
"code": 400,
"error": "Bad Request - Validation error",
"details": "El campo 'name' es requerido"
} 401 - Unauthorized:
{
"code": 401,
"error": "Unauthorized - Invalid API key",
"details": "La API key proporcionada no es válida"
} 403 - Forbidden:
{
"code": 403,
"error": "Forbidden - Access denied",
"details": "No tienes permisos para acceder a este workspace"
} 404 - Not Found:
{
"code": 404,
"error": "Not Found - Resource not found",
"details": "Agent not found"
} 429 - Too Many Requests:
{
"code": 429,
"error": "Too Many Requests - Rate limit exceeded",
"details": "Has excedido el límite de 30 peticiones por segundo"
} Rate Limiting
The API enforces request limits to guarantee a stable service for everyone.
| Limit | Value |
|---|---|
| Requests per second | 30 per API key |
If you need higher limits for your integration, contact the team at integraciones@platica.mx to evaluate your case.
Rate Limiting Headers
Responses include headers that help you monitor your usage:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum number of requests allowed |
X-RateLimit-Remaining | Remaining requests in the current window |
X-RateLimit-Reset | Timestamp when the limit resets |
When you get a 429 error, wait for the time indicated in X-RateLimit-Reset before retrying. Implementing exponential backoff is a good practice.
Best Practices
To handle errors effectively:
- Always check the status code before processing the response
- Implement retries with exponential backoff for
5xxerrors - Do not retry
4xxerrors without correcting the request - Monitor the rate limiting headers to avoid exceeding limits
- Log errors with the
detailsfield for debugging
Technical Support
If you need help with your integration or have questions:
| Channel | Contact |
|---|---|
| Integrations and API | integraciones@platica.mx |
| General Support | soporte@platica.mx |
For faster resolution, include in your request: the endpoint used, the request body, the response received, and your API key (only the last 4 characters for security).