配信停止メールアドレスのクエリーリスト
get
/email/unsubscribes
このエンドポイントを使用して、
start_dateからend_dateまでの期間に配信停止された最新のメールを返します。サブスクリプションの完全な状態履歴については、Currentsを使用してこのデータを追跡してください。
このエンドポイントを使用して、Brazeと他のメールシステムまたは独自のデータベースとの双方向同期を設定できます。
前提条件
このエンドポイントを使用するには、email.unsubscribe パーミッションを持つAPI キーが必要です。
レート制限
We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in API rate limits.
リクエストパラメータ
| パラメータ|必須|データ型|説明 | |||
|---|---|---|---|
start_date | 
      オプション  (注を参照)  | 
      YYYY-MM-DD形式の文字列 | 配信停止を検索する範囲の開始日。これは、APIによってUTC時間の真夜中として扱われる。 | 
end_date | 
      オプション  (注を参照)|YYYY-MM-DD形式の文字列|配信停止を検索する範囲の終了日。これは、APIによってUTC時間の真夜中として扱われる。  | 
      ||
limit |任意|整数|返される結果の数を制限するためのオプション・フィールド。デフォルトは100、最大は500。 | 
      |||
offset |任意|整数|取得するリストの開始点。 | 
      |||
sort_direction |オプション|文字列|配信停止を古いものから新しいものへとソートするには、値asc を渡す。desc 、新しいものから古いものへとソートする。sort_direction が含まれていない場合、デフォルトの順序は新しいものから古いものへとなる。 | 
      |||
email | 
      オプション  (注を参照)  | 
      String | 提供された場合、ユーザーが購読を解除したかどうかを返します。 | 
 note: 
end_date のほか、email またはstart_date のいずれかを提示しなければならない。
日付範囲にlimit を超える配信停止件数がある場合は、複数回の API 呼び出しを行う必要があります。その都度、offset を増やし、limit を下回るか、結果がゼロになるまで呼び出します。
リクエスト例
1
2
curl --location --request GET 'https://rest.iad-01.braze.com/email/unsubscribes?start_date=2020-01-01&end_date=2020-02-01&limit=1&offset=1&sort_direction=desc&email=example@braze.com' \
--header 'Authorization: Bearer YOUR-API-KEY-HERE'
応答
エントリーは降順で表示される。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Content-Type: application/json
Authorization: Bearer YOUR-REST-API-KEY
{
  "emails": [
    {
      "email": (string) an email that has been unsubscribed,
      "unsubscribed_at": (string) the time the email was unsubscribed in ISO 8601
    },
    {
      "email": (string) an email that has been unsubscribed,
      "unsubscribed_at": (string) the time the email was unsubscribed in ISO 8601
    },
    {
      "email": (string) an email that has been unsubscribed,
      "unsubscribed_at": (string) the time the email was unsubscribed in ISO 8601
    }
  ],
  "message": "success"
}
   Edit this page on GitHub