Dashboard

Errors

The API uses HTTP status codes and returns the same JSON body for every error. Read the name in your code and show the message to people.

Error Body

{
  "name": "validation_error",
  "status": 400,
  "message": "Either html or text is required",
  "errors": [
    { "message": "Either html or text is required", "location": "html" }
  ],
  "request_id": "…"
}

A validation error lists each problem in errors. The location is a dot path to the field, such as attachments.0.filename.

Status Codes

StatusNameCause
400validation_error, bad_requestThe request is not valid.
401unauthorizedThe API key is missing, wrong, expired or revoked.
403forbiddenThe key cannot do this, or sending is paused.
404not_foundThe resource does not exist.
409conflictThe resource is in the wrong state, such as a sent email.
429rate_limit_exceededToo many requests, or the daily limit is reached.
500internal_server_errorSomething went wrong on our side.

Rate Limits

Each response carries ratelimit-limit, ratelimit-remaining and ratelimit-reset. A 429 also carries retry-after, the number of seconds to wait before you try again.

Idempotency

Routes that change data take an optional Idempotency-Key header of 1 to 256 printable ASCII characters. A retry with the same key and request returns the first response with Idempotent-Replayed: true, so the email is sent only once.

curl -X POST https://api.inboxjot.com/v1/emails \
  -H "Authorization: Bearer $INBOXJOT_API_KEY" \
  -H "Idempotency-Key: order-1042-receipt" \
  -H "Content-Type: application/json" \
  -d '{ … }'
StatusNameCause
400invalid_idempotency_keyThe key is empty, too long or not printable ASCII.
409concurrent_idempotent_requestsA request with this key is still running. Retry after 1 second.
422invalid_idempotent_requestThe key was already used with a different request.

Keys last 24 hours. Only a 2xx response is stored, so after an error you can fix the request and retry with the same key.