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"
}
FieldTypeDescription
codenumberHTTP status code
errorstringDescriptive error message
detailsstringAdditional information about the error (optional)

Common Error Codes

CodeStatusDescription
400Bad RequestThe request has validation errors or an incorrect format
401UnauthorizedAPI key invalid, expired, or not provided
403ForbiddenYou do not have permission to access this resource
404Not FoundThe requested resource does not exist
422Unprocessable EntityThe request is valid but could not be processed
429Too Many RequestsYou have exceeded the request limit
500Internal Server ErrorInternal server error
503Service UnavailableService 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.

LimitValue
Requests per second30 per API key

Rate Limiting Headers

Responses include headers that help you monitor your usage:

HeaderDescription
X-RateLimit-LimitMaximum number of requests allowed
X-RateLimit-RemainingRemaining requests in the current window
X-RateLimit-ResetTimestamp when the limit resets

Best Practices

To handle errors effectively:

  1. Always check the status code before processing the response
  2. Implement retries with exponential backoff for 5xx errors
  3. Do not retry 4xx errors without correcting the request
  4. Monitor the rate limiting headers to avoid exceeding limits
  5. Log errors with the details field for debugging

Technical Support

If you need help with your integration or have questions:

ChannelContact
Integrations and APIintegraciones@platica.mx
General Supportsoporte@platica.mx