Cancel Number Subscription
Last updated
Was this helpful?
Last updated
Was this helpful?
"Cancel Number Subscription" API endpoint is deprecated, we suggest you to use Manage Endpoint Subscriptions APIs to cancel the subscription. You can use numberId
as endpointId
parameter and use main
as a subscription name to achieve identical behavior.
POST /workspaces/{workspaceId}/numbers/{numberId}/cancel-subscription HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
{
"type": "local",
"capabilities": {
"sms": {
"inbound": true,
"outbound": true
},
"voice": {
"inbound": true,
"outbound": true
},
"mms": {
"inbound": true,
"outbound": true
},
"fax": {
"inbound": true,
"outbound": true
}
},
"number": "text",
"country": "text",
"monthlyRecurringPrice": {
"currencyCode": "EUR",
"amount": 1,
"exponent": 1
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "active",
"subscription": {
"status": "active",
"subscribedAt": "2025-04-19T15:06:02.765Z",
"updatedAt": "2025-04-19T15:06:02.765Z",
"cancelledAt": "2025-04-19T15:06:02.765Z"
},
"endpointSubscription": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"correlationId": "123e4567-e89b-12d3-a456-426614174000",
"status": "active",
"subscribedAt": "2025-04-19T15:06:02.765Z",
"updatedAt": "2025-04-19T15:06:02.765Z",
"canceledAt": "2025-04-19T15:06:02.765Z",
"startAt": "2025-04-19T15:06:02.765Z",
"endAt": "2025-04-19T15:06:02.765Z"
},
"configurations": {
"voice": {
"inbound": {
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateRef": "text"
},
"outbound": {
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateRef": "text"
}
},
"sms": {
"inbound": {
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateRef": "text"
},
"outbound": {
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateRef": "text"
}
},
"mms": {
"inbound": {
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateRef": "text"
},
"outbound": {
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateRef": "text"
}
},
"fax": {
"inbound": {
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateRef": "text"
},
"outbound": {
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateRef": "text"
}
},
"whatsapp": {
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateRef": "text"
}
},
"createdAt": "2025-04-19T15:06:02.765Z",
"updatedAt": "2025-04-19T15:06:02.765Z",
"activatedAt": "2025-04-19T15:06:02.765Z",
"deactivatedAt": "2025-04-19T15:06:02.765Z",
"deactivatesAt": "2025-04-19T15:06:02.765Z",
"requirements": [
{
"requirement": {
"name": "text",
"type": "kycForm",
"scope": "number-activation",
"selector": {
"scope": "text",
"numberType": "local",
"countryCode": "text"
}
},
"status": "ok",
"reference": "text",
"notOkSince": "2025-04-19T15:06:02.765Z"
}
],
"endpoint": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "long-code-number",
"instanceId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"capabilities": [
{
"name": "sms",
"inbound": {
"status": "active",
"issues": [
"subscription-is-not-active"
]
},
"outbound": {
"status": "active",
"destinationStatuses": {
"active": 1,
"inactive": 1,
"available": 1,
"unavailable": 1
},
"supportsDestinations": true,
"issues": [
"subscription-is-not-active"
]
}
}
],
"dependencies": [
{
"type": "connector",
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateRef": "text",
"capabilities": [
"voice"
]
}
],
"issues": [
"subscription-is-not-active"
],
"provisioningStatus": "provisioned",
"createdAt": "2025-04-19T15:06:02.765Z",
"updatedAt": "2025-04-19T15:06:02.765Z"
},
"whatsApp": {
"whatsAppId": "text",
"status": "verified",
"stage": "text",
"attempt": 1,
"nextAttemptAt": "2025-04-19T15:06:02.765Z",
"verificationExpiresAt": "2025-04-19T15:06:02.765Z",
"requestedCodeAt": "2025-04-19T15:06:02.765Z",
"createdAt": "2025-04-19T15:06:02.765Z",
"updatedAt": "2025-04-19T15:06:02.765Z"
}
}