> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ai-call.co/llms.txt
> Use this file to discover all available pages before exploring further.

# エラー

> エラーは HTTP ステータスと、code・message を持つ JSON で返します。

```json theme={null}
{
  "error": {
    "code": "do_not_call",
    "message": "この番号は架電しない設定です。"
  }
}
```

`code` は機械で判断するための英字、`message` は日本語の説明です。処理を分けるときは `code` を見てください。

| ステータス | code | 意味 |
| - | - | - |
| 400 | `invalid_request` `invalid_json` | 入力の形式が正しくない |
| 400 | `invalid_number` | 電話番号の形式が正しくない、または発信できない番号 |
| 400 | `invalid_email` `invalid_url` `invalid_cursor` | メールアドレス・URL・cursor が正しくない |
| 400 | `idempotency_key_required` | `Idempotency-Key` ヘッダーがない |
| 401 | `missing_api_key` `invalid_api_key` | APIキーがない、または無効 |
| 402 | `subscription_required` `payment_method_required` `insufficient_credit` | 契約・カード・残高が足りない |
| 403 | `insufficient_scope` | APIキーに必要な権限がない |
| 404 | `not_found` `call_not_found` `agent_not_found` `webhook_not_found` | 見つからない |
| 409 | `do_not_call` `contact_paused` | 架電しない・一時停止中の連絡先 |
| 409 | `outside_calling_hours` | 発信できる時間帯（日本時間9:00〜20:00）の外 |
| 409 | `agent_not_ready` `phone_number_not_found` | エージェントの会話が未設定、発信元の電話番号がない |
| 409 | `idempotency_in_progress` | 同じ Idempotency-Key のリクエストを処理中 |
| 409 | `too_many_keys` `too_many_webhooks` | 登録できる件数の上限 |
| 422 | `idempotency_key_reused` | その Idempotency-Key は別の内容のリクエストに使われている |
| 429 | `rate_limited` | 回数の上限を超えた |
| 500 | `internal_error` `call_failed` | こちら側の問題。時間をおいて再試行してください |
| 503 | `credit_balance_unavailable` | 残高を確認できない。時間をおいて再試行してください |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.