Subscription Lists
Subscription Lists are lists of channels that can be used to target messages to specific groups of users.
Contact Subscription List object
A list of subscription list items associated with the specified contact. Each item consists of a list of list IDs and an optional scope.
OBJECT PROPERTIES- list_ids arrayREQUIRED
A list of subscription lists associated to the specified scope. If no scope is specified these subscription lists are not scoped.
- scope object<Scopes>
The channel types where membership applies. The
appscope includesiOS,Android, andAmazonchannels.
Used in:
Examples
Example contact Subscription Lists object
{
"list_ids": ["example_listId-2", "example_listId-4"],
"scope": "app"
}
Named User scoped batch item
Contains scope and subscription_lists.
- scope arrayREQUIRED
Defines the Subscription List changes.
Examples
Example scoped batch item
{
"scope": ["app"],
"subscription_lists": {
"subscribe": ["stickers", "gifs"],
"unsubscribe": ["cookies"]
}
}
Named User Subscription List object
Defines the Subscription List changes.
OBJECT PROPERTIES- subscribe array[string]
Subscribe to the specified Subscription List identifier.
- unsubscribe array[string]
Unsubscribe the specified Subscription List identifier.
Examples
Example Subscription Lists object
{
"subscribe": ["stickers", "gifs"],
"unsubscribe": ["cookies"]
}
Subscription List action
A string representing the membership mutation action to be taken for a given list.
Subscription List item object
An item consisting of a list of list IDs and scope.
OBJECT PROPERTIES- list_ids arrayREQUIRED
A list of subscription lists associated to the specified scope. If no scope is specified these subscription lists are not scoped.
- scope string
Scope as a string.
Possible values:
app,email,sms,web
Examples
Example Subscription List item
{
"list_ids": ["example_listId-2", "example_listId-3"],
"scope": "app"
}
Subscription List object
OBJECT PROPERTIES- action objectREQUIREDOne of
- Channel Subscription List action object
Alters Subscription List membership for a channel.
OBJECT PROPERTIESA string representing the membership mutation action to be taken for a given list.
A list ID that contains only alphanumeric characters, underscores, or hyphens.
- type stringREQUIRED
Possible values:
channel
- Contact subscription list action object
Alters subscription list membership for a contact.
OBJECT PROPERTIESA string representing the membership mutation action to be taken for a given list.
A list ID that contains only alphanumeric characters, underscores, or hyphens.
The channel types where membership applies. The
appscope includesiOS,Android, andAmazonchannels.- type stringREQUIRED
Possible values:
contact
A list ID that contains only alphanumeric characters, underscores, or hyphens.
- timestamp string
The date-time when the attribute changed. Server time is used when not present.
Used in:
- Channel listing
- Channel lookup
- Look up an email address
- SMS channel lookup
- Subscribe or unsubscribe channels to/from subscription lists
Examples
Example Subscription List object
{
"action": "subscribe",
"list_id": "exciting_news"
}
Subscription List result object
Defines the subscription list result object.
OBJECT PROPERTIES- default_opted_in booleanREQUIRED
Trueif the audience defined byscopesare opted in by default, otherwisefalse. - description object
Description of the subscription list.
A list ID that contains only alphanumeric characters, underscores, or hyphens.
- message_type string
The message type.
Possible values:
transactional,commercial - name string
Human readable name.
- scopes arrayREQUIRED
An array of scopes applicable to the subscription list. Valid scopes are
app,web,email, andsms.
Used in:
Examples
Example Subscription List result object
{
"list_id": "example_listId-2",
"name": "A nice readable name 2",
"description": "A very nice description for you.",
"scopes": ["app", "web"],
"default_opted_in": true
}