無効な電話番号の照会
get
/sms/invalid_phone_numbers
このエンドポイントを使用して、一定期間内に「無効」とされた電話番号のリストを取り出します。詳しくは「無効な電話番号の処理」のドキュメントをご覧ください。
前提条件
このエンドポイントを使用するには、sms.invalid_phone_numbers パーミッションを持つ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形式の文字列 | 無効な電話番号を検索する範囲の開始日、end_date より前でなければならない。これは、APIによってUTC時間の真夜中として扱われる。 | 
    
end_date | 
      オプション  (注を参照)|YYYY-MM-DD形式の文字列|無効な電話番号を検索する範囲の終了日。これは、APIによってUTC時間の真夜中として扱われる。  | 
      ||
limit |任意|整数|返される結果の数を制限するためのオプション・フィールド。デフォルトは100、最大は500。 | 
      |||
offset |任意|整数|取得するリストの開始点。 | 
      |||
phone_numbers | 
      オプション  (注を参照)|e.164形式の文字列の配列|提供された場合、それが無効であることが判明した場合、電話番号を返します。  | 
      ||
reason | 
      オプション  (注を参照)  | 
      String | 利用可能な値は、”provider_error”(プロバイダーエラーで電話がSMSを受信できないことを示す)または “deactivated”(電話番号が無効化された)。省略された場合は、すべての理由が返される。 | 
 note: 
start_date とend_date またはphone_numbers のいずれかを提示しなければならない。start_date 、end_date 、phone_numbers の3つすべてを入力された場合、入力された電話番号を優先し、日付の範囲は無視します。
日付範囲にlimit を超える無効な電話番号がある場合は、limit より少ないかゼロの結果が返されるまで、毎回offset を増やしながら複数のAPIコールを行う必要があります。
リクエスト例
1
2
curl --location --request GET 'https://rest.iad-01.braze.com/sms/invalid_phone_numbers?start_date=2019-01-01&end_date=2019-02-01&limit=100&offset=1&phone_numbers[]=12345678901' \
--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
20
21
22
Content-Type: application/json
Authorization: Bearer YOUR-REST-API-KEY
{
  "sms": [
    {
      "phone": (string) phone number in e.164 format,
      "invalid_detected_at": (string) the time the invalid number was detected in ISO 8601
      "reason" : "provider_error"
    },
    {
      "phone": (string) phone number in e.164 format,
      "invalid_detected_at": (string) the time the invalid number was detected in ISO 8601
      "reason" : "deactivated"
    },
    {
      "phone": (string) phone number in e.164 format,
      "invalid_detected_at": (string) the time the invalid number was detected in ISO 8601
      "reason" : "provider_error"
    }
  ],
  "message": "success"
}
   Edit this page on GitHub