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

# APIリファレンス概要

> AgentWallex REST APIのベースURL、認証、ページネーション、エラー規約。

## ベースURL

```
Sandbox:    https://api-sandbox.agentwallex.com/api/v1
Production: https://api.agentwallex.com/api/v1
```

<Note>
  開発とテストにはサンドボックスURLを使用してください。実際の資金でトランザクションを行う準備ができた場合にのみ本番に切り替えてください。
</Note>

## 認証

すべてのAPIリクエストには以下の認証ヘッダーのいずれかを含める必要があります：

| 方式      | ヘッダー            | 例                                     |
| ------- | --------------- | ------------------------------------- |
| APIキー   | `X-API-Key`     | `X-API-Key: awx_your_api_key`         |
| JWTベアラー | `Authorization` | `Authorization: Bearer eyJhbGciOi...` |

```bash theme={null}
# API key authentication
curl -X GET https://api.agentwallex.com/api/v1/agents \
  -H "X-API-Key: awx_your_api_key"

# JWT authentication
curl -X GET https://api.agentwallex.com/api/v1/agents \
  -H "Authorization: Bearer eyJhbGciOi..."
```

資格情報の取得と管理の詳細については[認証](/ja/introduction/authentication)を参照してください。

## ページネーション

すべてのリストエンドポイントは以下のクエリパラメータでページネーションをサポートします：

| パラメータ       | デフォルト | 最大  | 説明            |
| ----------- | ----- | --- | ------------- |
| `page_num`  | 1     | --  | ページ番号（1始まり）   |
| `page_size` | 20    | 100 | 1ページあたりのアイテム数 |

レスポンス形式：

```json theme={null}
{
  "data": [],
  "total": 42,
  "has_more": true
}
```

## エラー規約

すべてのエラーは一貫した形式に従います：

```json theme={null}
{
  "code": "invalid_request",
  "type": "invalid_request_error",
  "message": "human readable error description"
}
```

### エラータイプ

| タイプ                     | HTTPステータス | 説明                  |
| ----------------------- | --------- | ------------------- |
| `invalid_request_error` | 400       | 無効なリクエストボディまたはパラメータ |
| `authentication_error`  | 401       | 資格情報が不足または無効        |
| `authorization_error`   | 403       | 権限不足                |
| `not_found_error`       | 404       | リソースが存在しません         |
| `rate_limit_error`      | 429       | レート制限超過             |
| `internal_error`        | 500       | サーバーサイドエラー          |

エラー処理の詳細なガイダンスについては[エラーハンドリング](/ja/guides/error-handling)を参照してください。

## APIセクション

<CardGroup cols={2}>
  <Card title="エージェント" icon="robot" href="/ja/api-reference/agents-create">
    AIエージェントウォレットの作成と管理。
  </Card>

  <Card title="トランザクション" icon="arrow-right-arrow-left" href="/ja/api-reference/transactions-create">
    支払いの送信とトランザクション履歴の照会。
  </Card>

  <Card title="ポリシー" icon="shield-check" href="/ja/api-reference/policies">
    支出制限とアクセス制御の設定。
  </Card>

  <Card title="Webhook" icon="bell" href="/ja/api-reference/webhooks">
    Webhookエンドポイントの登録と管理。
  </Card>

  <Card title="x402 Pay" icon="credit-card" href="/ja/api-reference/x402-pay">
    x402マイクロペイメント交渉のトリガー。
  </Card>

  <Card title="x402セッション" icon="clock" href="/ja/api-reference/x402-sessions">
    x402セッション予算の管理。
  </Card>
</CardGroup>
