BrazeEx.Api.EmailListsAddresses (braze_ex v1.0.4)

API calls for all endpoints tagged EmailListsAddresses.

Link to this section Summary

Functions

Blacklist Email Addresses

Blacklisting an email address will unsubscribe the user from email and mark them as hard bounced.

Remove Hard Bounced Emails

This endpoint allows you to remove email addresses from your Braze bounce list. We will also remove them from the bounce list maintained by your email provider.

Query Hard Bounced Emails

This endpoint allows you to pull a list of email addresses that have “hard bounced” your email messages within a certain time frame.

Remove Email Addresses from Spam List

This endpoint allows you to remove email addresses from your Braze spam list. We will also remove them from the spam list maintained by your email provider.

Change Email Subscription Status

This endpoint allows you to set the email subscription state for your users. Users can be opted_in, unsubscribed, or subscribed (not specifically opted in or out).

Query List of Unsubscribed Email Addresses

Use this endpoint to return emails that have unsubscribed during the time period from start_date to end_date. You can use this endpoint to set up a bi-directional sync between Braze and other email systems or your own database.

Link to this section Functions

Link to this function

email_blacklist_post(connection, opts \\ [])

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

blacklist-email-addresses

Blacklist Email Addresses

Blacklisting an email address will unsubscribe the user from email and mark them as hard bounced.

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
emailRequiredString or arrayString email address to blacklist, or an array of up to 50 email addresses to blacklist.

parameters

Parameters

  • connection (BrazeEx.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :content_type (String.t):
    • :authorization (String.t):
    • :body (String.t):

returns

Returns

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

email_bounce_remove_post(connection, opts \\ [])

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

remove-hard-bounced-emails

Remove Hard Bounced Emails

This endpoint allows you to remove email addresses from your Braze bounce list. We will also remove them from the bounce list maintained by your email provider.

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
emailRequiredString or arrayString email address to modify, or an array of up to 50 email addresses to modify.

parameters

Parameters

  • connection (BrazeEx.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :content_type (String.t):
    • :authorization (String.t):
    • :body (String.t):

returns

Returns

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

email_hard_bounces_get(connection, opts \\ [])

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

query-hard-bounced-emails

Query Hard Bounced Emails

This endpoint allows you to pull a list of email addresses that have “hard bounced” your email messages within a certain time frame.

Note: You must provide an end_date, as well as either an email or a start_date. If you provide all three, start_date, end_date, and an email, we prioritize the emails given and disregard the date range.

If your date range has more than limit number of hard bounces, you will need to make multiple API calls, each time increasing the offset 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
{
"emails": [
  {
    "email": "example1@braze.com",
    "hard_bounced_at": "2016-08-25 15:24:32 +0000"
  },
  {
    "email": "example2@braze.com",
    "hard_bounced_at": "2016-08-24 17:41:58 +0000"
  },
  {
    "email": "example3@braze.com",
    "hard_bounced_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 hard bounces, must be earlier than end_date. This is treated as midnight in UTC time by the API. You must provide either an email or a start_date, and an end_date.
    • :end_date (String.t): (Optional) String in YYYY-MM-DD format String in YYYY-MM-DD format. End date of the range to retrieve hard bounces. This is treated as midnight in UTC time by the API. You must provide either an email or a start_date, and an end_date.
    • :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.
    • :email (String.t): (Optional) String If provided, we will return whether or not the user has hard bounced. You must provide either an email or a start_date, and an end_date.

returns

Returns

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

email_spam_remove_post(connection, opts \\ [])

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

remove-email-addresses-from-spam-list

Remove Email Addresses from Spam List

This endpoint allows you to remove email addresses from your Braze spam list. We will also remove them from the spam list maintained by your email provider.

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
emailRequiredString or arrayString email address to modify, or an array of up to 50 email addresses to modify.

parameters

Parameters

  • connection (BrazeEx.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :content_type (String.t):
    • :authorization (String.t):
    • :body (String.t):

returns

Returns

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

email_status_post(connection, opts \\ [])

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

change-email-subscription-status

Change Email Subscription Status

This endpoint allows you to set the email subscription state for your users. Users can be opted_in, unsubscribed, or subscribed (not specifically opted in or out).

You can set the email subscription state for an email address that is not yet associated with any of your users within Braze. When that email address is subsequently associated with a user, the email subscription state that you uploaded will be automatically set.

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
emailRequiredString or arrayString email address to modify, or an array of up to 50 email addresses to modify.
subscription_stateRequiredStringEither “subscribed”, “unsubscribed”, or “opted_in”.

parameters

Parameters

  • connection (BrazeEx.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :content_type (String.t):
    • :authorization (String.t):
    • :body (String.t):

returns

Returns

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

email_unsubscribes_get(connection, opts \\ [])

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

query-list-of-unsubscribed-email-addresses

Query List of Unsubscribed Email Addresses

Use this endpoint to return emails that have unsubscribed during the time period from start_date to end_date. You can use this endpoint to set up a bi-directional sync between Braze and other email systems or your own database.

Note: You must provide an end_date, as well as either an email or a start_date.

If your date range has more than limit number of unsubscribes, you will need to make multiple API calls, each time increasing the offset 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
{
"emails": [
  {
    "email": "example1@braze.com",
    "unsubscribed_at": "2016-08-25 15:24:32 +0000"
  },
  {
    "email": "example2@braze.com",
    "unsubscribed_at": "2016-08-24 17:41:58 +0000"
  },
  {
    "email": "example3@braze.com",
    "unsubscribed_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 unsubscribes, 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 unsubscribes. This is treated as midnight in UTC time by the API.
    • :limit (integer()): (Optional) Integer Optional field to limit the number of results returned. Limit must be greater than 1. Defaults to 100, maximum is 500.
    • :offset (integer()): (Optional) Integer Optional beginning point in the list to retrieve from.
    • :sort_direction (String.t): (Optional) String Pass in the value asc to sort unsubscribes from oldest to newest. Pass in desc to sort from newest to oldest. If sort_direction is not included, the default order is newest to oldest.
    • :email (String.t): (Optional*) String If provided, we will return whether or not the user has unsubscribed.

returns

Returns

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