Skip to main content

Unsubscribe

Ends a subscription on the subscriber's behalf.

POST /api/sp/v1/dcb/subscription/unsubscribe

Request

FieldTypeNotes
msisdnstringThe subscriber's number.
shortCodestringThe short code your credential is bound to.
serviceIdintegerThe service.
spTransactionIdstringYours to generate, unique per attempt. See Idempotency.

What it does

The subscription ends immediately. The already-paid period is not refunded or pro-rated: this is the same ending a subscriber gets by any other route, and it behaves identically.

A DataSync event follows, including to you if you are the registered receiver. That is not an echo to be filtered out: a third party may also be registered, and your own receiver should treat it like any other event.

Response

{
"requestId": "01JB2K9WQ4X7YH3M8N5P6R7T8V",
"code": "OK",
"data": {
"subscriptionId": 4821,
"state": "unsubscribed",
"alreadyUnsubscribed": false,
"unsubscribedAt": "2026-09-13T08:20:11.000000Z"
}
}
FieldNotes
subscriptionIdOurs, not yours.
stateThe state after the call.
alreadyUnsubscribedtrue if the subscription had already ended before your call.
unsubscribedAtISO 8601. When it actually ended, which may predate your request.

alreadyUnsubscribed is the field to read. Both outcomes are a success, because the outcome you asked for holds either way - but they are not the same event. true means the subscription had already ended, whether by your own retry, a STOP keyword from the subscriber, or customer care. Counting those as fresh cancellations in your own reporting will overstate churn.

What can refuse it

NOT_SUBSCRIBED: there is no live subscription to end. Ending an already-ended subscription is not an error; sending the same spTransactionId again replays the original outcome.

What this endpoint is not

It is not the subscriber's only way out. They can always stop by messaging the short code directly, and that route is not something you control or need to implement.