Cancel Number Subscription
"Cancel Number Subscription" API endpoint is deprecated, we suggest you to use . 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
Cancel Number Subscription
响应载荷
type
string
The type of the number.
Possible values: local, national, tollfree, mobile, shortcode
capabilities
object
The capabilities of the number.
显示子属性
capabilities.sms
object
必填
显示子属性
capabilities.sms.inbound
boolean
必填
Whether the number supports inbound use cases.
capabilities.sms.outbound
boolean
必填
Whether the number supports outbound use cases.
capabilities.voice
object
必填
显示子属性
capabilities.voice.inbound
boolean
必填
Whether the number supports inbound use cases.
capabilities.voice.outbound
boolean
必填
Whether the number supports outbound use cases.
capabilities.mms
object
必填
显示子属性
capabilities.mms.inbound
boolean
必填
Whether the number supports inbound use cases.
capabilities.mms.outbound
boolean
必填
Whether the number supports outbound use cases.
capabilities.fax
object
必填
显示子属性
capabilities.fax.inbound
boolean
必填
Whether the number supports inbound use cases.
capabilities.fax.outbound
boolean
必填
Whether the number supports outbound use cases.
capabilities.whatsapp
object
显示子属性
capabilities.whatsapp.inbound
boolean
必填
Whether the number supports inbound use cases.
capabilities.whatsapp.outbound
boolean
必填
Whether the number supports outbound use cases.
number
string
The phone number in E.164 format.
country
string
monthlyRecurringPrice
object
Money combines an amount of money with its currency.
显示子属性
monthlyRecurringPrice.currencyCode
string
必填
Currency as ISO 4217 code (three digits). An example would be EUR for Euro.
Possible values: EUR, USD, GBP, AUD, SGD, IDR, INR, MXN
monthlyRecurringPrice.amount
integer
必填
monthlyRecurringPrice.exponent
integer
必填
Usually a negative number to specify the exponent for decimal precision. e.g., 1540 * (10^-2) = 15.4
complianceRequirements
array of object
显示子属性
complianceRequirements.name
string
必填
complianceRequirements.type
string
必填
Possible values: kycForm, useCase, whatsappVerification
complianceRequirements.scope
string
必填
Possible values: number-activation, sms-outbound, whatsapp
complianceRequirements.selector
object
显示子属性
complianceRequirements.selector.scope
string
必填
complianceRequirements.selector.numberType
string
必填
The type of the number.
Possible values: local, national, tollfree, mobile, shortcode
complianceRequirements.selector.countryCode
string
必填
The country code in ISO 3166-1 alpha-2 format.
complianceRequirements.inventoryId
string
id
string
必填
The ID of the number.
status
string
必填
The status of the number.
Possible values: active, inactive
subscription
object
Describes status of Number Subscription
显示子属性
subscription.status
string
The status of the accounting subscription. It can be none, active, canceling, canceled, or planned.
Possible values: none, active, inactive, canceling, canceled, planned
subscription.subscribedAt
string
Timestamp (UTC) when the subscription became active.
subscription.updatedAt
string
Timestamp (UTC) when the subscription was last updated.
subscription.cancelledAt
string
Timestamp (UTC) when the subscription was cancelled.
endpointSubscription
object
显示子属性
endpointSubscription.id
string
必填
The subscription unique identifier.
endpointSubscription.correlationId
string
必填
The correlation links the subscription to its number. Hence, the correlationId is the numberId.
endpointSubscription.status
string
必填
The status of the accounting subscription. It can be none, active, canceling, canceled, or planned.
Possible values: none, active, inactive, canceling, canceled, planned
endpointSubscription.subscribedAt
string
The date and time when the subscription was created.
endpointSubscription.updatedAt
string
endpointSubscription.canceledAt
string
The date and time when the subscription was canceled.
endpointSubscription.startAt
string
The date and time when the subscription should start.
endpointSubscription.endAt
string
The date and time when the subscription should end.
configurations
object
显示子属性
configurations.voice
object
显示子属性
configurations.voice.inbound
object
显示子属性
configurations.voice.inbound.connectorId
string
configurations.voice.inbound.connectorTemplateId
string
configurations.voice.inbound.connectorTemplateRef
string
configurations.voice.outbound
object
显示子属性
configurations.voice.outbound.connectorId
string
configurations.voice.outbound.connectorTemplateId
string
configurations.voice.outbound.connectorTemplateRef
string
configurations.sms
object
显示子属性
configurations.sms.inbound
object
显示子属性
configurations.sms.inbound.connectorId
string
configurations.sms.inbound.connectorTemplateId
string
configurations.sms.inbound.connectorTemplateRef
string
configurations.sms.outbound
object
显示子属性
configurations.sms.outbound.connectorId
string
configurations.sms.outbound.connectorTemplateId
string
configurations.sms.outbound.connectorTemplateRef
string
configurations.mms
object
显示子属性
configurations.mms.inbound
object
显示子属性
configurations.mms.inbound.connectorId
string
configurations.mms.inbound.connectorTemplateId
string
configurations.mms.inbound.connectorTemplateRef
string
configurations.mms.outbound
object
显示子属性
configurations.mms.outbound.connectorId
string
configurations.mms.outbound.connectorTemplateId
string
configurations.mms.outbound.connectorTemplateRef
string
configurations.fax
object
显示子属性
configurations.fax.inbound
object
显示子属性
configurations.fax.inbound.connectorId
string
configurations.fax.inbound.connectorTemplateId
string
configurations.fax.inbound.connectorTemplateRef
string
configurations.fax.outbound
object
显示子属性
configurations.fax.outbound.connectorId
string
configurations.fax.outbound.connectorTemplateId
string
configurations.fax.outbound.connectorTemplateRef
string
configurations.whatsapp
object
显示子属性
configurations.whatsapp.connectorId
string
configurations.whatsapp.connectorTemplateId
string
configurations.whatsapp.connectorTemplateRef
string
createdAt
string
必填
Timestamp (UTC) when the number was created.
updatedAt
string
必填
Timestamp (UTC) when the number was last updated.
activatedAt
string
Timestamp (UTC) of the last time the number was activated.
deactivatedAt
string
Timestamp (UTC) of the last time the number was deactivated.
deactivatesAt
string
Timestamp (UTC) when the number will be deactivated.
requirements
array of object
显示子属性
requirements.requirement
object
必填
Compliance requirement for a number. It may be a KYC form, use case, or WhatsApp verification. In some cases, a destination may require multiple compliance requirements to be satisfied to be able to send traffic.
显示子属性
requirements.requirement.name
string
必填
requirements.requirement.type
string
必填
Possible values: kycForm, useCase, whatsappVerification
requirements.requirement.scope
string
必填
Possible values: number-activation, sms-outbound, whatsapp
requirements.requirement.selector
object
显示子属性
requirements.requirement.selector.scope
string
必填
requirements.requirement.selector.numberType
string
必填
The type of the number.
Possible values: local, national, tollfree, mobile, shortcode
requirements.requirement.selector.countryCode
string
必填
The country code in ISO 3166-1 alpha-2 format.
requirements.requirement.inventoryId
string
requirements.status
string
必填
Possible values: ok, pending, not-valid, not-found, error, no-reference
requirements.reference
string
必填
requirements.notOkSince
string
Timestamp (UTC) when the number didn't meet the requirement.
endpoint
object
A representation of an endpoint. It contains details such as the capabilities, dependencies, and more.
显示子属性
endpoint.id
string
必填
The ID of the endpoint.
endpoint.type
string
必填
The type of the endpoint. It can be a long code number, short code number, alpha number, ip pool, or rcs google agent.
Possible values: long-code-number, short-code-number, alpha-number, ip-pool, rcs-google-agent
endpoint.instanceId
string
必填
The unique identifier of the instance.
endpoint.name
string
必填
The name of the endpoint. For some cases it will be the number in international format as string.
endpoint.capabilities
array of object
必填
显示子属性
endpoint.capabilities.name
string
必填
Possible values: sms
endpoint.capabilities.inbound
object
显示子属性
endpoint.capabilities.inbound.status
string
必填
Possible values: active, inactive, available, unavailable
endpoint.capabilities.inbound.issues
array of string
endpoint.capabilities.outbound
object
显示子属性
endpoint.capabilities.outbound.status
string
必填
Possible values: active, inactive, available, unavailable
endpoint.capabilities.outbound.destinationStatuses
object
显示子属性
endpoint.capabilities.outbound.destinationStatuses.active
number
endpoint.capabilities.outbound.destinationStatuses.inactive
number
endpoint.capabilities.outbound.destinationStatuses.available
number
endpoint.capabilities.outbound.destinationStatuses.unavailable
number
endpoint.capabilities.outbound.supportsDestinations
boolean
Whether the number supports destinations
endpoint.capabilities.outbound.issues
array of string
endpoint.capabilities.name
string
必填
Possible values: mms
endpoint.capabilities.inbound
object
显示子属性
endpoint.capabilities.inbound.status
string
必填
Possible values: active, inactive, available, unavailable
endpoint.capabilities.inbound.issues
array of string
endpoint.capabilities.outbound
object
显示子属性
endpoint.capabilities.outbound.status
string
必填
Possible values: active, inactive, available, unavailable
endpoint.capabilities.outbound.destinationStatuses
object
显示子属性
endpoint.capabilities.outbound.destinationStatuses.active
number
endpoint.capabilities.outbound.destinationStatuses.inactive
number
endpoint.capabilities.outbound.destinationStatuses.available
number
endpoint.capabilities.outbound.destinationStatuses.unavailable
number
endpoint.capabilities.outbound.supportsDestinations
boolean
Whether the number supports destinations
endpoint.capabilities.outbound.issues
array of string
endpoint.capabilities.name
string
必填
Possible values: voice
endpoint.capabilities.inbound
object
显示子属性
endpoint.capabilities.inbound.status
string
必填
Possible values: active, inactive, available, unavailable
endpoint.capabilities.inbound.issues
array of string
endpoint.capabilities.outbound
object
显示子属性
endpoint.capabilities.outbound.status
string
必填
Possible values: active, inactive, available, unavailable
endpoint.capabilities.outbound.destinationStatuses
object
显示子属性
endpoint.capabilities.outbound.destinationStatuses.active
number
endpoint.capabilities.outbound.destinationStatuses.inactive
number
endpoint.capabilities.outbound.destinationStatuses.available
number
endpoint.capabilities.outbound.destinationStatuses.unavailable
number
endpoint.capabilities.outbound.supportsDestinations
boolean
Whether the number supports destinations
endpoint.capabilities.outbound.issues
array of string
endpoint.capabilities.useCaseType
string
Possible values: contact-centre
endpoint.capabilities.name
string
必填
Possible values: whatsapp
endpoint.capabilities.inbound
object
显示子属性
endpoint.capabilities.inbound.status
string
必填
Possible values: active, inactive, available, unavailable
endpoint.capabilities.inbound.issues
array of string
endpoint.capabilities.outbound
object
显示子属性
endpoint.capabilities.outbound.status
string
必填
Possible values: active, inactive, available, unavailable
endpoint.capabilities.outbound.destinationStatuses
object
显示子属性
endpoint.capabilities.outbound.destinationStatuses.active
number
endpoint.capabilities.outbound.destinationStatuses.inactive
number
endpoint.capabilities.outbound.destinationStatuses.available
number
endpoint.capabilities.outbound.destinationStatuses.unavailable
number
endpoint.capabilities.outbound.supportsDestinations
boolean
Whether the number supports destinations
endpoint.capabilities.outbound.issues
array of string
endpoint.capabilities.name
string
必填
Possible values: email
endpoint.capabilities.inbound
object
显示子属性
endpoint.capabilities.inbound.status
string
必填
Possible values: active, inactive, available, unavailable
endpoint.capabilities.inbound.issues
array of string
endpoint.capabilities.outbound
object
显示子属性
endpoint.capabilities.outbound.status
string
必填
Possible values: active, inactive, available, unavailable
endpoint.capabilities.outbound.destinationStatuses
object
显示子属性
endpoint.capabilities.outbound.destinationStatuses.active
number
endpoint.capabilities.outbound.destinationStatuses.inactive
number
endpoint.capabilities.outbound.destinationStatuses.available
number
endpoint.capabilities.outbound.destinationStatuses.unavailable
number
endpoint.capabilities.outbound.supportsDestinations
boolean
Whether the number supports destinations
endpoint.capabilities.outbound.issues
array of string
endpoint.capabilities.name
string
必填
Possible values: rcs-google
endpoint.capabilities.inbound
object
显示子属性
endpoint.capabilities.inbound.status
string
必填
Possible values: active, inactive, available, unavailable
endpoint.capabilities.inbound.issues
array of string
endpoint.capabilities.outbound
object
显示子属性
endpoint.capabilities.outbound.status
string
必填
Possible values: active, inactive, available, unavailable
endpoint.capabilities.outbound.destinationStatuses
object
显示子属性
endpoint.capabilities.outbound.destinationStatuses.active
number
endpoint.capabilities.outbound.destinationStatuses.inactive
number
endpoint.capabilities.outbound.destinationStatuses.available
number
endpoint.capabilities.outbound.destinationStatuses.unavailable
number
endpoint.capabilities.outbound.supportsDestinations
boolean
Whether the number supports destinations
endpoint.capabilities.outbound.issues
array of string
endpoint.dependencies
array of object
The dependencies of the endpoint. It shows the connectors that the endpoint is connected to.
显示子属性
endpoint.dependencies.type
string
Possible values: connector
endpoint.dependencies.connectorId
string
必填
endpoint.dependencies.connectorTemplateRef
string
必填
endpoint.dependencies.capabilities
array of string
endpoint.issues
array of string
endpoint.provisioningStatus
string
必填
Possible values: provisioned, provisioning, deprovisioned, deprovisioning
endpoint.whatsApp
object
WhatsApp pre-verification details for this endpoint, if applicable. Only present for long code numbers from WhatsApp-capable providers.
显示子属性
endpoint.whatsApp.whatsAppId
string
endpoint.whatsApp.status
string
WhatsApp number status
Possible values: unknown, already-exists, installed, verified, not-verified, expired
endpoint.whatsApp.stage
string
endpoint.whatsApp.attempt
integer
endpoint.whatsApp.nextAttemptAt
string
endpoint.whatsApp.verificationExpiresAt
string
endpoint.whatsApp.requestedCodeAt
string
endpoint.whatsApp.createdAt
string
endpoint.whatsApp.updatedAt
string
endpoint.createdAt
string
必填
endpoint.updatedAt
string
必填
whatsApp
object
WhatsApp number pre-verification details.
显示子属性
whatsApp.whatsAppId
string
whatsApp.status
string
WhatsApp number status
Possible values: unknown, already-exists, installed, verified, not-verified, expired
whatsApp.stage
string
whatsApp.attempt
integer
whatsApp.nextAttemptAt
string
whatsApp.verificationExpiresAt
string
whatsApp.requestedCodeAt
string
whatsApp.createdAt
string
whatsApp.updatedAt
string
代码示例
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/numbers/{numberId}/cancel-subscription' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'