---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://docs.sendcorex.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://docs.sendcorex.com/llms.txt"
---

Source: https://docs.sendcorex.com/ja/api-reference/feedback/reading/get-email

バウンスと苦情：読み取り

# メールの取得

1通のメールについて戻ってきたすべて：バウンスやブロック、苦情、送信されなかった理由。1回の検索で、スキャンはしません。

POST `https://g.sendcorex.com/v1/feedback` command: get_email

API keyにscope `feedback:read`が必要です。

1通のメールが持つイベントは各グループ最大1件です：バウンス1件（`bounce_hard`、`bounce_soft`、`blocked`）、`complaint`1件、`dropped`1件。

## 引数

- `email_id` string 必須
メールID。送信時に返された`id`です。
例： `"9b7e4c21-0d3a-4e8f-a6b1-5c2d7e9f1a30"`

## クイックスタート

```
import axios from 'axios';

const response = await axios.post(
  'https://g.sendcorex.com/v1/feedback',
  {
    commands: [
      {
        command: "get_email",
        args: {
          email_id: "9b7e4c21-0d3a-4e8f-a6b1-5c2d7e9f1a30"
        }
      }
    ]
  },
  { headers: { Authorization: process.env.SENDCOREX_API_KEY } },
);

const [result] = response.data.results;
if (result.type !== 'SUCCESS') throw new Error(`${result.code}: ${result.message}`);
console.log(result.data);
```

## レスポンス

```
{
  "type": "SUCCESS",
  "results": [
    {
      "command": "get_email",
      "id": "0",
      "type": "SUCCESS",
      "took_ms": 18,
      "data": {
        "events": [
          {
            "email_id": "9b7e4c21-0d3a-4e8f-a6b1-5c2d7e9f1a30",
            "kind": "bounce_hard",
            "source": "smtp",
            "recipient": "old.address@gmail.com",
            "from": "noreply@yourdomain.com",
            "smtp_code": 550,
            "enhanced_code": "5.1.1",
            "diagnostic": "550-5.1.1 The email account that you tried to reach does not exist.",
            "at": "2026-10-17T05:58:44.031Z"
          }
        ]
      }
    }
  ]
}
```

### レスポンスの項目

- `events`
このメールのイベント。何も戻ってこなかった場合（メールが配信された、または90日より古い場合）は空です。
- `events[].email_id`
メールID（UUID）：送信時に返された`id`で、LogsやWebhookと同じidです。
- `events[].kind`
起きたこと：`bounce_hard`、`bounce_soft`、`blocked`、`complaint`、`dropped`。下の「種類」を参照してください。
- `events[].source`
情報の出どころ：SMTPの応答、バウンスメッセージ、フィードバックループ、不正利用の報告など。下の「発生元」を参照してください。
- `events[].recipient`
メールの送信先アドレス。
- `events[].from`
送信者のアドレス。
- `events[].campaign_id`
メールがキャンペーンに属する場合、そのキャンペーン。
- `events[].smtp_code / events[].enhanced_code`
受信側サーバーが応答したコード（例：`550`と`5.1.1`）。バウンスとブロックのときのみ。
- `events[].diagnostic`
受信側サーバーの応答の全文、または不正利用の報告に書かれた理由。
- `events[].reporting_mta`
報告した相手：バウンスメッセージを送ったサーバー、フィードバックループのアドレス、または報告ページの場合は`web`。
- `events[].at`
発生日時。ISO 8601、UTC。

## 「メールが届かなかったのはなぜ？」に答える

1回のリクエストでログとフィードバックを読み取ります：Logsはステータスを、このコマンドは理由と報告者を教えてくれます。

2つのリクエスト、同じid

```
{
  "logs": {
    "commands": [
      {
        "command": "get_logs",
        "args": {
          "id": "9b7e4c21-0d3a-4e8f-a6b1-5c2d7e9f1a30"
        }
      }
    ]
  },
  "feedback": {
    "commands": [
      {
        "command": "get_email",
        "args": {
          "email_id": "9b7e4c21-0d3a-4e8f-a6b1-5c2d7e9f1a30"
        }
      }
    ]
  }
}
```

## エラー

HTTPレベルのエラーは`type`、`code`、`message`を返します。CMDと表示されたエラーは、HTTP 200でコマンドの結果内に返ります。

- 401`INVALID_API_KEY`
API keyが存在しないか、取り消されたか、ダッシュボードで無効化されています。
- 429`RATE_LIMITED`
同じIP + API keyで毎秒15リクエストまたは同時15件を超えました。Retry-Afterの秒数だけ待ってください。
- CMD`MISSING_SCOPE`
API keyに`feedback:read`がありません。
- CMD`INVALID_ARGS`
引数が無効です：不明な種類、RFC 3339でない`since`、範囲外のlimit、`email_id`がない…
- CMD`INTERNAL`
サーバーエラー。詳細はサーバーのログにのみ記録されます。
