Cancel Number Subscription

"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.

Cancel Number Subscription

post
Authorizations
Path parameters
workspaceIdstringRequired
numberIdstringRequired
Responses
200
Updated Number
application/json
post
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-06-30T17:58:41.548Z",
    "updatedAt": "2025-06-30T17:58:41.548Z",
    "cancelledAt": "2025-06-30T17:58:41.548Z"
  },
  "endpointSubscription": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "correlationId": "123e4567-e89b-12d3-a456-426614174000",
    "status": "active",
    "subscribedAt": "2025-06-30T17:58:41.548Z",
    "updatedAt": "2025-06-30T17:58:41.548Z",
    "canceledAt": "2025-06-30T17:58:41.548Z",
    "startAt": "2025-06-30T17:58:41.548Z",
    "endAt": "2025-06-30T17:58:41.548Z"
  },
  "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-06-30T17:58:41.548Z",
  "updatedAt": "2025-06-30T17:58:41.548Z",
  "activatedAt": "2025-06-30T17:58:41.548Z",
  "deactivatedAt": "2025-06-30T17:58:41.548Z",
  "deactivatesAt": "2025-06-30T17:58:41.548Z",
  "requirements": [
    {
      "requirement": {
        "name": "text",
        "type": "kycForm",
        "scope": "number-activation",
        "selector": {
          "scope": "text",
          "numberType": "local",
          "countryCode": "text"
        }
      },
      "status": "ok",
      "reference": "text",
      "notOkSince": "2025-06-30T17:58:41.548Z"
    }
  ],
  "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-06-30T17:58:41.548Z",
    "updatedAt": "2025-06-30T17:58:41.548Z"
  },
  "whatsApp": {
    "whatsAppId": "text",
    "status": "verified",
    "stage": "text",
    "attempt": 1,
    "nextAttemptAt": "2025-06-30T17:58:41.548Z",
    "verificationExpiresAt": "2025-06-30T17:58:41.548Z",
    "requestedCodeAt": "2025-06-30T17:58:41.548Z",
    "createdAt": "2025-06-30T17:58:41.548Z",
    "updatedAt": "2025-06-30T17:58:41.548Z"
  }
}

Last updated

Was this helpful?