Skip to content

Errors ​

Every error response is JSON in the format below. The API does not return text to show to people: use the stable code to decide what to do and translate it in your own system.

json
{
  "code": "VALIDATION_FAILED",
  "fields": { "email": "invalid" }
}
FieldWhen presentMeaning
codealwaysStable error code (table below).
fieldsin VALIDATION_FAILED and per-field CONFLICTMap of field → problem code (required, invalid, too_short, too_long, out_of_range, taken, weak, reused, too_soon, wrong_password, locked).
retryAfterSegin RATE_LIMITEDSeconds until you can try again (the same value goes in the Retry-After header).
excecoes, falhasin specific attendance errorsDetails of the request; see the ErroApi model.
requestIdmay be presentIdentifier to quote when talking to support.

HTTP status and codes ​

StatuscodeWhat to do
400VALIDATION_FAILEDInvalid body, parameter or query; fields points to where. Fix and send again.
401UNAUTHENTICATEDMissing, expired or invalid token. Renew or sign in again.
403FORBIDDENThe account has no permission in this scope. On scoped routes (class, discipline, institution), an identifier that does not exist also results in 403. Retrying will not help.
404NOT_FOUNDThe resource does not exist.
409CONFLICTConflict with the current state: for example fields: { "sigla": "taken" } when creating a discipline with an existing code. Also on a partial aplicar without the right hashConteudo.
413PAYLOAD_TOO_LARGEBody larger than the limit (100 KB). Split it.
422UNPROCESSABLEReserved for valid requests that cannot be processed; rare on current routes.
429RATE_LIMITEDToo many calls. Wait retryAfterSeg and try again.
500INTERNALServer failure. Try again later, with growing waits.

There are also business-rule codes (for example ALREADY_CONFIRMED, FEEDBACK_CLOSED, LAST_ADMIN, LAST_CURATOR); all are listed in the ErroApi model.

Which errors to retry ​

SituationRetry?
429, 500, network failureYes, with a wait (respect Retry-After; without it, start at 1 s and double up to 60 s).
401Once, after renewing the token.
400, 403, 404, 409, 413, 422No: the result will be the same until the request or the state changes.

Import operations (.../importacoes/...) are idempotent: repeating the same file duplicates nothing. A single-create POST (for example POST /turmas/{turmaId}/atividades), on the other hand, is not idempotent: repeating it creates another activity. See the journeys.

contato@presente.app.br