---
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/privacy/reading/get-history

トラッキング設定：読み取り

# Get History

受信者1人のすべての変更を新しい順に：何を選んだか、いつ、誰が変更したか。監査用の同意の記録です。

POST `https://g.sendcorex.com/v1/privacy` command: get_history

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

履歴は設定が存在する限り保存されます。各エントリーは、その変更後の完全な状態です。

## 引数

- `email` string 必須
受信者のアドレス。
例： `"jane.doe@example.com"`
- `limit` number 任意
変更の件数（1〜500）。既定は50です。
例： `50`

## クイックスタート

```
import axios from 'axios';

const response = await axios.post(
  'https://g.sendcorex.com/v1/privacy',
  {
    commands: [
      {
        command: "get_history",
        args: {
          email: "jane.doe@example.com",
          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": "get_history",
      "id": "0",
      "type": "SUCCESS",
      "took_ms": 6,
      "data": {
        "history": [
          {
            "email": "jane.doe@example.com",
            "track_opens": false,
            "track_clicks": true,
            "source": "page",
            "updated_at": "2026-10-24T07:20:12.031Z"
          },
          {
            "email": "jane.doe@example.com",
            "track_opens": true,
            "track_clicks": true,
            "source": "api",
            "updated_at": "2026-09-02T10:05:41.220Z"
          }
        ]
      }
    }
  ]
}
```

### レスポンスの項目

- `history`
変更を新しい順に。受信者が一度も設定を持っていない場合は空です。
- `history[].email`
受信者のアドレス（小文字）。
- `history[].track_opens`
`true`は開封のトラッキングを許可、`false`は拒否、`null`は未選択。
- `history[].track_clicks`
`true`はクリックのトラッキングを許可、`false`は拒否、`null`は未選択。
- `history[].source`
変更した人：`page`（トラッキング設定のページで受信者が）、`api`（あなたがSet Preferencesで）、`dashboard`。
- `history[].updated_at`
変更した日時。ISO 8601、UTC。

## エラー

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にこのコマンドのscopeがありません（読み取りは`privacy:read`、変更は`privacy:write`）。
- CMD`INVALID_ARGS`
引数が無効です：`email`がないか形式が不正、`emails`が100件を超える、`true`/`false`でない`track_opens`、範囲外のlimit…
- CMD`INTERNAL`
サーバーエラー。詳細はサーバーのログにのみ記録されます。
