Groups Bulk Add/Delete Subscribers
Bulk endpoints can be used to add or delete up to 1,000 subscriber records in a group in a single request.
Bulk Add Subscribers to Group
The POST
groups/{groupId}/subscribers/bulk-create
endpoint can be used to add up to 1,000 subscribers to a single group in a single request.
When adding subscribers to a group you will need the subscriberId
of each of the subscribers to add and the groupId
of the group that these subscribers will be added to. The subscriberIds
parameter in the body of the request accepts an array of subscriberId
values, while the groupId
is specified as a path parameter.
Example Request
In the below example we are adding subscriberId
:108767117
and 108767118
to groupId
: 187561
.
curl -L \
--request POST \
--url 'https://api.mobile-text-alerts.com/v3/groups/187561/subscribers/bulk-create' \
--header 'Authorization: Bearer 3098eebf-7661-5858-890e-65cd054a0b03' \
--header 'Content-Type: application/json' \
--data '{
"subscriberIds": [
108767117,
108767118
]
}'
Successful response: {"message":"Added 2 subscribers to group 187561."
Record Limit
This endpoint will accept a maximum of 1,000
records in a single request.
Rate Limiting
This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to 5
requests every 15
seconds
POST /v3/groups/{groupId}/subscribers/bulk-create HTTP/1.1
Host: api.mobile-text-alerts.com
Authorization: Bearer apiKey
Content-Type: application/json
Accept: */*
Content-Length: 21
{
"subscriberIds": [
1
]
}
{
"statusCode": "MTANoLinkedAccountError",
"success": true,
"error": "text",
"message": "text",
"data": null
}
Bulk Remove Subscribers from Group
The POST
groups/{groupId}/subscribers/bulk-delete
endpoint can be used to remove up to 1,000 subscribers from a single group in a single request.
When removing subscribers from a group you will need the subscriberId
of each of the subscribers to be removed and the groupId
of the group that these subscribers will be deleted from. The subscriberIds
parameter in the body of the request accepts an array of subscriberId
values, while the groupId
is specified as a path parameter.
Example Request
In the below example we are removing subscriberId
:108767117
and 108767118
from groupId
: 187561
.
curl -L \
--request POST \
--url 'https://api.mobile-text-alerts.com/v3/groups/{groupId}/subscribers/bulk-delete' \
--header 'Authorization: Bearer 3098eebf-7661-5858-890e-65cd054a0b03' \
--header 'Content-Type: application/json' \
--data '{
"subscriberIds": [
108767117,
108767118
]
}'
Successful response: {"message": "Removed 2 subscribers from group 187561."}
Record Limit
This endpoint will accept a maximum of 1,000
records in a single request.
Rate Limiting
This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to 5
requests every 15
seconds
POST /v3/groups/{groupId}/subscribers/bulk-delete HTTP/1.1
Host: api.mobile-text-alerts.com
Authorization: Bearer apiKey
Content-Type: application/json
Accept: */*
Content-Length: 21
{
"subscriberIds": [
1
]
}
{
"statusCode": "MTANoLinkedAccountError",
"success": true,
"error": "text",
"message": "text",
"data": null
}
Last updated
Was this helpful?