Skip to content

API errors

Use the HTTP status and error details to determine whether to correct the request or retry it. Error bodies vary by endpoint. Most successful API responses wrap data in response. The Questionnaire API endpoints under /api/v1/tests/ return the document directly.

Status or failure Action
401 Missing, invalid, or expired bearer token. Obtain a token and retry once.
403 The request was refused. Verify the endpoint and company API key. Contact Support if the request still fails.
404 The record does not exist or is unavailable to your company’s application. Verify that the environment and the ID are correct.
400 The request is malformed, including invalid JSON.
409 when sending responses or a participant A key points at a conflicting record or definition. Correct the document before retrying.
422 A field, selected answer, type, or import entry failed validation. Read the returned details.
413 when sending responses The body exceeds 1 MiB. Each request carries one participant’s responses to one questionnaire.
415 when sending responses or a participant Send Content-Type: application/json.
Network timeout The server may have processed the request. Use the endpoint’s retry rules before sending again.

Errors from sending responses or a participant include error, message, and, when available, path:

{
"error": "invalid_request",
"message": "Unsupported question type.",
"path": "questionnaire.questions.type"
}

Unknown fields are rejected. A question type you declared cannot change. Removed options can remain in collected responses; they are not restored to the question’s current options. See the field reference.

Problem Action
An unexpected participant was created Reuse the same participant.key. Omitting identity creates an anonymous participant.
An unexpected test or question was created Compare keys exactly, including case.
A repetition was duplicated Send questionnaire.repetition.key on the first request, and reuse it when you retry.
A request that creates a test returns 422 for owner_email Send context.test.owner_email with the email address of an active RedJade user in your company.
Option names are missing Include question definitions. Responses cannot tell RedJade which options nobody selected.
Text sent to a question returns 422 The question was created as choice from a one-word response. Define a free-text question as text in its first request, or send the text under a new question key.
Problem Action
A participant upload returns 404 Check the event’s configured External ID. external_event_id does not accept its numeric RedJade ID.
A participant import never finished Apply the staged import with a separate request, then poll the action’s status. Uploading alone does not add participants.
An export has a download URL but no file Wait for the document’s status to become completed.
An export document returns 404 Use the API application that created the export.
A study download is empty or inaccessible Confirm the test ID and company, then check that the test has collected responses.

Keep import IDs, import-action IDs, document IDs, and test IDs separate. Each identifies a different resource.

Include the endpoint, HTTP status, approximate request time, and a payload with credentials and personal data removed when contacting RedJade Support.