Documentation menu

Errors and states

For AI agents: the docs index is at /llms.txt, and every page is also served as markdown at its URL plus .md.

What inbox statuses and activity outcomes mean, why a request can answer 503 unavailable, and what to do next in each case.

This page lists the states and messages you can run into, what each one means, and what to do. It covers inbox statuses, activity outcomes, the answer a service gives when it is not set up, and the error codes the API returns.

Inbox statuses

StatusWhat it meansWhat to do
activeThe inbox is connected and the patrol runs for it about every five minutes.Nothing. This is the normal state.
reauth_requiredGoogle reports that the grant is no longer valid, for example because access was revoked. The patrol skips this inbox. Nothing is deleted.Connect the inbox again. See Connect Gmail.
paused_planThe account has no active plan, so Night Shift is not running. The inbox is paused. It is not patrolled but still counts as a seat while a subscription lasts.Start or renew Night Shift to turn it back on, or disconnect the inbox. See Plans and limits.
disconnectedYou disconnected the inbox. The grant was revoked and the stored token deleted.Connect it again if you want it back. It does not count as a seat.

Activity outcomes

The activity log shows what happened to each message. Most outcomes are ordinary: a rule action, a label, a second look or no match. A skipped entry means InboxNight did not act, and always states the reason.

Skipped becauseWhat it meansWhat to do
A service is unavailableA needed service, such as the AI model or Gmail access, cannot be reached. Nothing is applied and nothing is counted against you.Wait, or write to hello@inboxnight.com if it persists.
The AI could not read the messageThe model declined or could not read this message, so it was left alone.Nothing. Open the message yourself, or write a rule that covers it.

Failures and retries

If InboxNight fails partway through a message, that message is marked as failed and a later pass tries it again. A message that is already done is never processed twice.

The 503 provider_unavailable answer

When something InboxNight depends on cannot be reached, the request answers 503 provider_unavailable with a plain reason instead of pretending to work. When the answer says it is not retryable, trying again will not help. For example:

  • Connecting a Gmail inbox, when Google access or secure token storage is not set up.
  • Parsing or previewing a rule, when the AI model is not available.
  • Sync now, when Gmail cannot be reached.

You are never charged for work that did not happen.

Other refusals

  • A Google account that cannot connect is refused with 403 forbidden and a message. See Connect Gmail.
  • An account with no active plan is refused with 402 subscription_required when it tries to connect an inbox or write a rule: Night Shift is paid up front, so start it first.
  • A Google account that another InboxNight account already has connected is refused with 409 conflict.
  • A label cannot be deleted while a rule uses it. The request answers 400 invalid_input and names the label.

Error codes

API errors use one envelope, {"error": {"code", "message", "fix", "docs_url", "retryable", "request_id"}}, with stable codes you can branch on. Branch on code, never on the message. See API for the routes. These are the codes it can return:

CodeHTTP statusRetryWhat it meansWhat to do
unauthorized401NoThe API key is missing, malformed, revoked or unknown.Send a valid key in the Authorization header as "Bearer <key>". If the key was revoked, create a new one and retry.
forbidden403NoThis request is not allowed for this key or account, for example a Google account that cannot be connected.Use a key that belongs to the account, or connect an allowed Google account. See Connect Gmail.
plan_limit402NoThe account has reached a limit of its plan, for example the number of connected inboxes it allows.Reduce usage to stay within the plan, or write to hello@inboxnight.com. Nothing was changed by the refused request.
subscription_required402NoThe account has no active Night Shift plan.Write to hello@inboxnight.com to start Night Shift, then retry.
rate_limited429Yes, with backoffToo many requests for this API key.Wait the number of seconds in the Retry-After header, then retry. Spread requests out to stay under the X-RateLimit-Limit value.
invalid_input400NoThe request input is invalid.Correct the field named in the message and resend. The routes and their fields are on the API page.
not_found404NoNothing exists at this address.Check the path and any ids in it against the API reference, then retry.
method_not_allowed405NoThis route does not accept that HTTP method.Use the method named in the Allow response header, or the method listed for the route on the API page.
payload_too_large413NoThe request body is too large.Keep the JSON body under 64 KB and send a smaller request.
conflict409NoThe request conflicts with the current state of the resource.Fetch the resource again, check its current state, then resend if the change still applies.
provider_unavailable503Yes, with backoffA service InboxNight depends on, such as Gmail access or the AI model, is unavailable right now.If retryable is true, retry later with exponential backoff. If it is false, retrying will not help right now.
internal_error500Yes, with backoffAn unexpected error occurred.Retry once after a short wait. If it fails again, report the request_id to support. Nothing was charged.

The messages in the last two columns are the general text for each code. The message inside a real response is specific to the request, and retryable in the response is the value to trust. A 429 comes with a Retry-After header.