Sign inGet started

Manage Endpoint Subscriptions

Manage your Number/ Sender ID subscription status, all sender types are considered "endpoints".
GET
/workspaces/{workspaceId}/endpoints/{endpointId}/subscriptions
This route returns all associated subscriptions of a given endpoint.
Treść odpowiedzi
results
array of object
wymagane
Pokaż atrybuty podrzędne
results.name
string
wymagane
The name of the subscription. For long codes, this value will be main. For alpha and short code numbers, this value will be the destination country code.
results.status
string
wymagane
The status of the endpoint subscription. It can be active or inactive.
Possible values: active, inactive
results.price
object
Money combines an amount of money with its currency.
Pokaż atrybuty podrzędne
results.price.currencyCode
string
wymagane
Currency as ISO 4217 code (three digits). An example would be EUR for Euro.
Possible values: EUR, USD, GBP, AUD, SGD, IDR, INR, MXN
results.price.amount
integer
wymagane
results.price.exponent
integer
wymagane
Usually a negative number to specify the exponent for decimal precision. e.g., 1540 * (10^-2) = 15.4
results.subscription
object
Pokaż atrybuty podrzędne
results.subscription.id
string
wymagane
The subscription unique identifier.
results.subscription.correlationId
string
wymagane
The correlation links the subscription to its number. Hence, the correlationId is the numberId.
results.subscription.status
string
wymagane
The status of the accounting subscription. It can be none, active, canceling, canceled, or planned.
Possible values: none, active, inactive, canceling, canceled, planned
results.subscription.subscribedAt
string
The date and time when the subscription was created.
results.subscription.updatedAt
string
results.subscription.canceledAt
string
The date and time when the subscription was canceled.
results.subscription.startAt
string
The date and time when the subscription should start.
results.subscription.endAt
string
The date and time when the subscription should end.
Przykład kodu
curl -X GET 'https://api.bird.com/workspaces/{workspaceId}/endpoints/{endpointId}/subscriptions' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'
GET
/workspaces/{workspaceId}/endpoints/{endpointId}/subscriptions/{subscriptionName}
This route returns a specific subscription for a specific endpoint.
Treść odpowiedzi
name
string
wymagane
The name of the subscription. For long codes, this value will be main. For alpha and short code numbers, this value will be the destination country code.
status
string
wymagane
The status of the endpoint subscription. It can be active or inactive.
Possible values: active, inactive
price
object
Money combines an amount of money with its currency.
Pokaż atrybuty podrzędne
price.currencyCode
string
wymagane
Currency as ISO 4217 code (three digits). An example would be EUR for Euro.
Possible values: EUR, USD, GBP, AUD, SGD, IDR, INR, MXN
price.amount
integer
wymagane
price.exponent
integer
wymagane
Usually a negative number to specify the exponent for decimal precision. e.g., 1540 * (10^-2) = 15.4
subscription
object
Pokaż atrybuty podrzędne
subscription.id
string
wymagane
The subscription unique identifier.
subscription.correlationId
string
wymagane
The correlation links the subscription to its number. Hence, the correlationId is the numberId.
subscription.status
string
wymagane
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
The date and time when the subscription was created.
subscription.updatedAt
string
subscription.canceledAt
string
The date and time when the subscription was canceled.
subscription.startAt
string
The date and time when the subscription should start.
subscription.endAt
string
The date and time when the subscription should end.
Przykład kodu
curl -X GET 'https://api.bird.com/workspaces/{workspaceId}/endpoints/{endpointId}/subscriptions/{subscriptionName}' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'
POST
/workspaces/{workspaceId}/endpoints/{endpointId}/subscriptions/{subscriptionName}/activate
Use this endpoint to active a subscription to be able to send messages and be compliant with requirements. There may be charges associated with the subscription for certain destinations.
Treść żądania
quantity
integer
wymagane
Treść odpowiedzi
name
string
wymagane
The name of the subscription. For long codes, this value will be main. For alpha and short code numbers, this value will be the destination country code.
status
string
wymagane
The status of the endpoint subscription. It can be active or inactive.
Possible values: active, inactive
price
object
Money combines an amount of money with its currency.
Pokaż atrybuty podrzędne
price.currencyCode
string
wymagane
Currency as ISO 4217 code (three digits). An example would be EUR for Euro.
Possible values: EUR, USD, GBP, AUD, SGD, IDR, INR, MXN
price.amount
integer
wymagane
price.exponent
integer
wymagane
Usually a negative number to specify the exponent for decimal precision. e.g., 1540 * (10^-2) = 15.4
subscription
object
Pokaż atrybuty podrzędne
subscription.id
string
wymagane
The subscription unique identifier.
subscription.correlationId
string
wymagane
The correlation links the subscription to its number. Hence, the correlationId is the numberId.
subscription.status
string
wymagane
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
The date and time when the subscription was created.
subscription.updatedAt
string
subscription.canceledAt
string
The date and time when the subscription was canceled.
subscription.startAt
string
The date and time when the subscription should start.
subscription.endAt
string
The date and time when the subscription should end.
Przykład kodu
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/endpoints/{endpointId}/subscriptions/{subscriptionName}/activate' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'
POST
/workspaces/{workspaceId}/endpoints/{endpointId}/subscriptions/{subscriptionName}/cancel
Use this endpoint to deactivate a subscription. That will stop charges and messages from being sent.
Treść odpowiedzi
name
string
wymagane
The name of the subscription. For long codes, this value will be main. For alpha and short code numbers, this value will be the destination country code.
status
string
wymagane
The status of the endpoint subscription. It can be active or inactive.
Possible values: active, inactive
price
object
Money combines an amount of money with its currency.
Pokaż atrybuty podrzędne
price.currencyCode
string
wymagane
Currency as ISO 4217 code (three digits). An example would be EUR for Euro.
Possible values: EUR, USD, GBP, AUD, SGD, IDR, INR, MXN
price.amount
integer
wymagane
price.exponent
integer
wymagane
Usually a negative number to specify the exponent for decimal precision. e.g., 1540 * (10^-2) = 15.4
subscription
object
Pokaż atrybuty podrzędne
subscription.id
string
wymagane
The subscription unique identifier.
subscription.correlationId
string
wymagane
The correlation links the subscription to its number. Hence, the correlationId is the numberId.
subscription.status
string
wymagane
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
The date and time when the subscription was created.
subscription.updatedAt
string
subscription.canceledAt
string
The date and time when the subscription was canceled.
subscription.startAt
string
The date and time when the subscription should start.
subscription.endAt
string
The date and time when the subscription should end.
Przykład kodu
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/endpoints/{endpointId}/subscriptions/{subscriptionName}/cancel' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'