BrazeEx.Api.SMS (braze_ex v1.0.22)

API calls for all endpoints tagged SMS.

Link to this section Summary

Functions

Query Invalid Phone Numbers

Use this endpoint to pull a list of phone numbers that have been deemed “invalid” within a certain time frame.

Remove Invalid Phone Numbers

Use this endpoint to remove “invalid” phone numbers from Braze’s invalid list.

Link to this section Functions

Link to this function

sms_invalid_phone_numbers_get(connection, opts \\ [])

@spec sms_invalid_phone_numbers_get(
  Tesla.Env.client(),
  keyword()
) :: {:ok, nil} | {:error, Tesla.Env.t()}

query-invalid-phone-numbers

Query Invalid Phone Numbers

Use this endpoint to pull a list of phone numbers that have been deemed “invalid” within a certain time frame.

To use this endpoint, you’ll need to generate an API key with the sms.invalid_phone_numbers permission.

  • If you provide a start_date, an end_date, and phone_numbers, we prioritize the given phone numbers and disregard the date range.
  • If your date range has more than the limit number of invalid phone numbers, you will need to make multiple API calls with increasing the offset each time until a call returns either fewer than limit or zero results.

rate-limit

Rate limit

We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in API rate limits.

response

Response

Entries are listed in descending order.

Content-Type: application/json
Authorization: Bearer YOUR-REST-API-KEY
{
"sms": [
  {
    "phone": "12345678900",
    "invalid_detected_at": "2016-08-25 15:24:32 +0000"
  },
  {
    "phone": "12345678901",
    "invalid_detected_at": "2016-08-24 17:41:58 +0000"
  },
  {
    "phone": "12345678902",
    "invalid_detected_at": "2016-08-24 12:01:13 +0000"
  }
],
"message": "success"
}

parameters

Parameters

  • connection (BrazeEx.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :Authorization (String.t):
    • :start_date (String.t): (Optional*) String in YYYY-MM-DD format Start date of the range to retrieve invalid phone numbers, must be earlier than end_date. This is treated as midnight in UTC time by the API.
    • :end_date (String.t): (Optional*) String in YYYY-MM-DD format End date of the range to retrieve invalid phone numbers. This is treated as midnight in UTC time by the API.
    • :limit (integer()): (Optional) Integer Optional field to limit the number of results returned. Defaults to 100, maximum is 500.
    • :offset (integer()): (Optional) Integer Optional beginning point in the list to retrieve from.
    • :phone_numbers (integer()): (Optional*) Array of Strings in e.164 format If provided, we will return the phone number if it has been found to be invalid.

returns

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

sms_invalid_phone_numbers_remove_post(connection, opts \\ [])

@spec sms_invalid_phone_numbers_remove_post(
  Tesla.Env.client(),
  keyword()
) :: {:ok, nil} | {:error, Tesla.Env.t()}

remove-invalid-phone-numbers

Remove Invalid Phone Numbers

Use this endpoint to remove “invalid” phone numbers from Braze’s invalid list.

To use this endpoint, you’ll need to generate an API key with the sms.invalid_phone_numbers.remove permission.

This can be used to re-validate phone numbers after they have been marked as invalid.

rate-limit

Rate limit

We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in API rate limits.

request-parameters

Request parameters

ParameterRequiredData TypeDescription
phone_numberRequiredArray of strings in e.164 formatAn array of up to 50 phone numbers to modify.

parameters

Parameters

  • connection (BrazeEx.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :Authorization (String.t):
    • :"Content-Type" (String.t):
    • :body (String.t):

returns

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure