ReferenceCampaigns API
Add a stoplist entry
POST
Adds a manual opt-out entry to a channel's stoplist.
- Body requires
channelIdand at least one ofphone(E.164) orbsuid. - Emits a
stoplist.updatedwebhook event withaction: "added"andsource: "api".
bearerheader
AuthorizationBearer <API key>Key issued in Settings → Developer → API key. Inbox methods need the Inbox scope. Campaigns methods need the Campaigns scope.
application/json- body
channelId*stringChannel that owns the stoplist.
phone?stringE.164 phone. Required when bsuid is omitted.
bsuid?stringProvider BSUID. Required when phone is omitted.
application/json- response
id*stringchannelId*stringphone*string|nullbsuid*string|nullsource*stringValue in
"keyword""api""opt_in_clear"matchedKeyword*string|nullcreatedAt*stringFormat
date-timeupdatedAt*stringFormat
date-timecurl -X POST 'https://api.1msg.io/api/v1/campaigns/stoplist' \ -H 'Content-Type: application/json' \ -d '{ "channelId": "string"}'Example Response
{ "id": "string", "channelId": "string", "phone": "string", "bsuid": "string", "source": "keyword", "matchedKeyword": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}