curl --request DELETE \
--url https://api.omni.z-api.io/v1/channels/{channelId}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cancelReason": "Customer closed the company"
}
'{
"error": 400,
"message": "cancel query param is required"
}{
"error": 401,
"message": "Unauthorized"
}{
"error": 404,
"message": "Channel not found"
}{
"error": 422,
"message": "This action requires ENTERPRISE role"
}Channels
Cancel subscription
Cancel a channel subscription programmatically
DELETE
/
v1
/
channels
/
{channelId}
/
cancel
curl --request DELETE \
--url https://api.omni.z-api.io/v1/channels/{channelId}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cancelReason": "Customer closed the company"
}
'{
"error": 400,
"message": "cancel query param is required"
}{
"error": 401,
"message": "Unauthorized"
}{
"error": 404,
"message": "Channel not found"
}{
"error": 422,
"message": "This action requires ENTERPRISE role"
}Overview
Requests the cancellation of a channel subscription. Cancellation is not immediate — the channel entersCANCELLATION_PROCESS status and remains active until the end of the already-paid period. After that period, the status changes to CANCELED.
The cancel=true query parameter is required as an explicit cancellation confirmation.
The cancelReason field in the body is optional, but recommended for auditing purposes.
Status after cancellation
| Status | Description |
|---|---|
CANCELLATION_PROCESS | Cancellation requested, channel still active until end of period |
CANCELED | Channel effectively cancelled and deactivated |
Cancellation cannot be undone via API. To reactivate the channel, a new subscription must be initiated via Subscribe channel.
The
channelId is obtained from the Create channel endpoint.Authorizations
Secret Key generated in the Omni Z-API Security panel
Path Parameters
Channel ID (obtained via Create channel)
Example:
"019E4C54B1B375A28970B605CA9B03C3"
Query Parameters
Must be true to confirm the cancellation
Example:
true
Body
application/json
Cancellation reason (optional, but recommended for auditing)
Example:
"Customer closed the company"
Response
Cancellation requested successfully. No content returned.