Update Users’ Subscription Group Status

post

/subscription/status/set

Use the endpoints below 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.

If you want to see examples or test this endpoint for Email Subscription Groups:

If you want to see examples or test this endpoint for SMS Subscription Groups:

Request Body

1
Content-Type: application/json
1
2
3
4
5
6
7
8
9
10
11
{
   "api_key": (required, string) your App Group REST API Key,
   "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*, string) the external_id of the user,
   "email": (required*, string) the email address of the user
   //one of external_id or email is required
   //can be passed as an array of string with a max of 50
   //endpoint only accepts email or phone value, not both
   "phone": (optional, string in E.164 format) The phone number of the user (must include at least one phone number and at most 50 phone numbers).
 }

* SMS subscription groups: Only external_id or phone is accepted.
* Email subscription groups: Either email or external_id is required.

Example Requests

Using Email

1
2
3
4
5
6
{
  "api_key": "12345",
  "subscription_group_id": "111-222-333",
  "subscription_state": "unsubscribed",
  "email": "john@braze.com"
  }

Using Phone Number

1
2
3
4
5
6
{
  "api_key": "12345",
  "subscription_group_id": "111-222-333",
  "subscription_state": "unsubscribed",
  "phone": "+14152342671"
  }

Example Successful Response

Response: (status 201)

1
2
3
{
    "message": "success"
}
WAS THIS PAGE HELPFUL?
New Stuff!