# service_unavailable

- HTTP status: 503
- Retry: After Retry-After
- Execution: not started
- Admin needed: no

**Service temporarily unavailable.** A dependency the API needs to authorize or process the request is not available right now, so the request was refused before it ran. The API fails closed: it never skips a check because a dependency is down. Nothing was done and nothing is stored under the Idempotency-Key: a retry with the same key after `Retry-After` runs the request normally.

## What it means

The API returns HTTP 503 with `error.code` set to `service_unavailable`. The default message is: "The service is temporarily unavailable. Retry after the number of seconds in the Retry-After header."

## Common causes

- A brief infrastructure outage or a deploy in progress.

## How to identify it

Check the response status (`503`) and `error.code` (`service_unavailable`). Branch on `error.code`, not on the message text: messages can be reworded, codes do not change within v1. Log `error.request_id` (also sent as the `X-Request-Id` header) so support can find the request.

## How to fix it

- Wait `Retry-After` seconds and retry (with the same Idempotency-Key if you sent one).

## Retry guidance

Wait for the number of seconds in the `Retry-After` response header, then retry.

## Did anything happen?

This request was refused before any call was placed and before anything was charged.

## Idempotency

Nothing was done and nothing is stored. Retry after Retry-After (with the same key if you sent one); the retry runs the request normally.

## Who can fix it

The developer who sends the request can fix it; no administrator action is normally needed.

## When to contact support

If it lasts more than a few minutes, write to [support@relationsai.com](mailto:support@relationsai.com) with the request_id. See [Support](/resources/support) for what to include (the `request_id`, the time in UTC, the operation, and whether you used a test or live key) and what never to send (API keys, Authorization headers, webhook signing secrets, recording links, transcripts or customer data).

## Example error response

```json
{
  "error": {
    "code": "service_unavailable",
    "message": "The service is temporarily unavailable. Retry after the number of seconds in the Retry-After header.",
    "details": {},
    "request_id": "req_24w77nwppt27d3v6wwptvl47",
    "retry": "after",
    "doc_url": "https://docs.relationsai.com/errors/service_unavailable"
  }
}
```

See all codes in the [error-code reference](/fundamentals/error-codes).
