---
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/contacts/activity/list-events

連絡先：アクティビティ

# イベントの一覧

1件の連絡先の履歴（新しい順）：送信、開封、クリック、bounce、苦情、配信停止。

POST `https://g.sendcorex.com/v1/contacts` command: list_events

API keyに`contact:read`スコープが必要です。

イベントは送信とトラッキングによって記録されます。APIは読み取るだけです。

## 引数

- `email` string 必須
連絡先。
例： `"ana@acme.com"`
- `types` string[] 任意
次の種類のみ：`sent`、`open`、`click`、`bounce`、`complaint`、`unsubscribe`。
例： `["open", "click"]`
- `limit` number 任意
ページサイズ（1〜1000）。デフォルトは50。
- `cursor` string 任意
前のページの`next_cursor`。

## クイックスタート

```
import axios from 'axios';

const response = await axios.post(
  'https://g.sendcorex.com/v1/contacts',
  {
    commands: [
      {
        command: "list_events",
        args: {
          email: "ana@acme.com",
          types: [
            "open",
            "click"
          ],
          limit: 50
        }
      }
    ]
  },
  { 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": "list_events",
      "id": "0",
      "type": "SUCCESS",
      "took_ms": 14,
      "data": {
        "events": [
          {
            "event_id": "ev_7c1d02",
            "type": "click",
            "at": "2026-10-14T21:04:10.000Z",
            "campaign_id": "cmp_october",
            "list_id": "customers",
            "url": "https://acme.com/offer",
            "ip": "203.0.113.24",
            "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X)",
            "reason": null,
            "by_proxy": false,
            "hard": null,
            "meta": null
          },
          {
            "event_id": "ev_7c1cf9",
            "type": "open",
            "at": "2026-10-14T21:03:55.000Z",
            "campaign_id": "cmp_october",
            "list_id": "customers",
            "url": null,
            "ip": "203.0.113.24",
            "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X)",
            "reason": null,
            "by_proxy": false,
            "hard": null,
            "meta": null
          }
        ],
        "has_more": true,
        "next_cursor": "eyJ0IjoxNzYwNDc1ODM1fQ"
      }
    }
  ]
}
```

### レスポンスの項目

- `events[].type`
`sent`、`open`、`click`、`bounce`、`complaint`、`unsubscribe`。
- `events[].at`
発生日時。
- `events[].campaign_id / list_id`
わかっている場合、メールが属していたキャンペーンとリスト。
- `events[].url`
`click`イベントのリンク。
- `events[].ip / user_agent`
開封やクリックの発生元。
- `events[].by_proxy`
開封が本人ではなくメールのプライバシープロキシからだった場合は`true`。
- `events[].reason / hard`
`bounce`の場合：理由と、ハードbounceだったかどうか。
- `has_more / next_cursor`
ページネーション。古いイベントを取得するには`next_cursor`を`cursor`として送ります。

## エラー

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にこのコマンドに必要なスコープがありません。リクエスト内のほかのコマンドは実行されます。
- CMD`INVALID_ARGS`
必須の引数がないか不正です：メールアドレス、項目の値、enumの選択肢、whereのキー、リストのid…
- CMD`INVALID_CURSOR`
カーソルが不正か、別のクエリまたはアカウントのものです。
- CMD`INTERNAL`
サーバーエラー。詳細はサーバーのログにのみ記録されます。
