BrazeEx.Api.SubscriptionGroupsSMS (braze_ex v1.0.1)
API calls for all endpoints tagged SubscriptionGroupsSMS
.
Link to this section Summary
Functions
List User's Subscription Group Status - SMS
Use this endpoint to get the subscription state of a user in a subscription group. These groups will be available on the Subscription Group page. The response from this endpoint will include the external ID and either subscribed, unsubscribed, or unknown for the specific subscription group requested in the API call. This can be used to update the subscription group state in subsequent API calls or to be displayed on a hosted web page.
Update User's Subscription Group Status - SMS
Use this endpoint to update the subscription state of a user on the Braze dashboard. You can access a subscription groups subscription_group_id
by navigating to it on the Subscription Group page.
List User's Subscription Group - SMS
Use this endpoint to list and get the subscription groups of a certain user.
Link to this section Functions
subscription_status_get_get(connection, opts \\ [])
@spec subscription_status_get_get( Tesla.Env.client(), keyword() ) :: {:ok, nil} | {:error, Tesla.Env.t()}
list-user-s-subscription-group-status-sms
List User's Subscription Group Status - SMS
Use this endpoint to get the subscription state of a user in a subscription group. These groups will be available on the Subscription Group page. The response from this endpoint will include the external ID and either subscribed, unsubscribed, or unknown for the specific subscription group requested in the API call. This can be used to update the subscription group state in subsequent API calls or to be displayed on a hosted web page.
*Either
external_id
or
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
All successful responses will return subscribed
, unsubscribed
, or unknown
depending on status and user history with the subscription group.
Content-Type: application/json
Authorization: Bearer YOUR-REST-API-KEY
{
"status": {
"1": "Unsubscribed",
"2": "Subscribed"
},
"message": "success"
}
parameters
Parameters
connection
(BrazeEx.Connection): Connection to serveropts
(keyword): Optional parameters:authorization
(String.t)::subscription_group_id
(String.t): (Required) String Theid
of your subscription group.:external_id
(String.t): (Required*) String Theexternal_id
of the user (must include at least one and at most 50external_ids
). When both anexternal_id
andphone
are submitted, only the external_id(s) provided will be applied to the result query.:phone
(float()): (Required*) String in E.164 format The phone number of the user (must include at least one phone number and at most 50 phone numbers).
returns
Returns
{:ok, nil}
on success{:error, Tesla.Env.t}
on failure
subscription_status_set_post(connection, opts \\ [])
@spec subscription_status_set_post( Tesla.Env.client(), keyword() ) :: {:ok, nil} | {:error, Tesla.Env.t()}
update-user-s-subscription-group-status-sms
Update User's Subscription Group Status - SMS
Use this endpoint to update the subscription state of a user on the Braze dashboard. You can access a subscription groups subscription_group_id
by navigating to it on the Subscription Group page.
*Only
external_id
orphone
is accepted for SMS subscription groups.This property should not be used for updating a user’s profile information. Use the /users/track property instead.
When creating new users via the /users/track endpoint, you should leave a delay of around 2 minutes before adding users to the relevant Subscription Group to allow Braze time to fully create the user profile.
rate-limit
Rate limit
For customers who onboarded with Braze on or after January 6, 2022, we apply a rate limit of 5,000 requests per minute to this endpoint as documented in API rate limits.
request-parameters
Request parameters
Parameter | Required | Data Type | Description |
---|---|---|---|
subscription_group_id | Required | String | The id of your subscription group. |
subscription_state | Required | String | Available values are unsubscribed (not in subscription group) or subscribed (in subscription group). |
external_id | Required* | Array of strings | The external_id of the user or users, may include up to 50 id s. |
phone | Required* | String in E.164 format | The phone number of the user, can be passed as an array of strings. Must include at least one phone number (with a max of 50). |
example-successful-response
Example successful response
Response: (status 201)
{
"message": "success"
}
parameters
Parameters
connection
(BrazeEx.Connection): Connection to serveropts
(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
subscription_user_status_get(connection, opts \\ [])
@spec subscription_user_status_get( Tesla.Env.client(), keyword() ) :: {:ok, nil} | {:error, Tesla.Env.t()}
list-user-s-subscription-group-sms
List User's Subscription Group - SMS
Use this endpoint to list and get the subscription groups of a certain user.
If there are multiple users (multiple external ids) who share the same email address, all users will be returned as a separate user (even if they have the same email address or subscription group).
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.
parameters
Parameters
connection
(BrazeEx.Connection): Connection to serveropts
(keyword): Optional parameters:authorization
(String.t)::external_id
(String.t): (Required*) String Theexternal_id
of the user (must include at least one and at most 50external_ids
).:limit
(integer()): (Optional) Integer The limit on the maximum number of results returned. Default (and max) limit is 100.:offset
(integer()): (Optional) Integer Number of templates to skip before returning the rest of the templates that fit the search criteria.:phone
(float()): (Required*) String in E.164 format The phone number of the user. Must include at least one phone number (with a max of 50).
returns
Returns
{:ok, nil}
on success{:error, Tesla.Env.t}
on failure