Service Activation
Many countries have service activation requirements that must be met before any services can be activated on a phone number. Purchase and port orders have been updated accordingly to support “auto-activation” of service as part of the purchase/port order.
This guide is intended to assist you in the event that services need to be activated/deactivated for phone numbers already on an account.
Services can be activated via:
- New Number Orders
If all service activation requirements are met when the new number order is placed, then services will “auto-activate” on the phone numbers in the order. If some activation requirement is not met in the order, the order will complete, but services will not be auto-activated. See how to purchase a phone number for more details. - Port Orders
All service activation requirements must be satisfied before a port order will complete. - Service Activation Orders
To activate service on phone numbers already on the account, submit a service activation order directly. See below for more details.
Check Service Activation Requirements
In order to activate any service(voice, messaging, emergency) on a phone number, the service you'd like to activate must have status READY_TO_ACTIVATE
on the number.
For a service to be READY_TO_ACTIVATE
, you may need to complete one or many of these actions:
To check the activation status of a list of tns:
Request
POST https://api.bandwidth.com/api/v2/accounts/{accountId}/serviceActivationChecker HTTP/1.1
Content-Type: application/json
Authorization: Bearer mySecretToken
{
"phoneNumbers": [
"+19195551212",
"+19195551313"
]
}
Response
{
"data": {
"phoneNumbers": [
{
"phoneNumber": "+19195551212",
"serviceTypes": {
"emergency": {
"status": "IN_SERVICE"
},
"messaging": {
"status": "READY_TO_ACTIVATE"
},
"voice": {
"status": "IN_SERVICE"
}
}
},
{
"phoneNumber": "+19195551313",
"serviceTypes": {
"emergency": {
"reasons": [
{
"code": "20000",
"description": "A requirements package is required to activate services on these numbers"
}
],
"status": "ACTIVATION_REQUIREMENTS_NOT_MET"
},
"messaging": {
"reasons": [
{
"code": "20000",
"description": "A requirements package is required to activate services on these numbers"
}
],
"status": "ACTIVATION_REQUIREMENTS_NOT_MET"
},
"voice": {
"reasons": [
{
"code": "20000",
"description": "A requirements package is required to activate services on these numbers"
},
{
"code": "1002",
"description": "Voice config not defined"
}
],
"status": "ACTIVATION_REQUIREMENTS_NOT_MET"
}
}
}
]
},
"errors": [],
"links": [
{
"href": "https://api.bandwidth.com/api/v2/accounts/{accountId}/serviceActivationChecker",
"method": "POST",
"rel": "self"
}
]
}
For more details, view the API reference here.
Activate Service
If the service type you want to activate is READY_TO_ACTIVATE
, submit a service activation order
Example
Request
POST https://api.bandwidth.com/api/v2/accounts/{accountId}/serviceActivation HTTP/1.1
Content-Type: application/json
Authorization: Bearer mySecretToken
{
"action": "ACTIVATE",
"customerOrderId": "exampleOrder",
"phoneNumbers": [
"+19195551212",
"+19195551313"
],
"serviceTypes": [
"VOICE",
"MESSAGING"
]
}
Response
{
"data": {
"customerOrderId": "exampleOrder",
"orderId": "39348601-8a95-4096-9704-bf8316f218b9",
"orderRequest": {
"action": "ACTIVATE",
"customerOrderId": "exampleOrder",
"phoneNumbers": ["+19195551212", "+19195551313"],
"serviceTypes": ["VOICE", "MESSAGING"]
},
"orderStatus": "RECEIVED",
"phoneNumbers": [
{
"phoneNumber": "+19195551212",
"serviceTypes": {
"messaging": {
"status": "NOT_IN_SERVICE"
},
"voice": {
"status": "NOT_IN_SERVICE"
}
}
},
{
"phoneNumber": "+19195551313",
"serviceTypes": {
"messaging": {
"status": "NOT_IN_SERVICE"
},
"voice": {
"status": "NOT_IN_SERVICE"
}
}
}
]
},
"errors": [],
"links": [
{
"href": "https://api.bandwidth.com/api/v2/accounts/1234/serviceActivation",
"method": "POST",
"rel": "self"
},
{
"href": "https://api.bandwidth.com/api/v2/accounts/1234/serviceActivation/39348601-8a95-4096-9704-bf8316f218b9",
"method": "GET",
"rel": "serviceActivationOrder"
}
]
}