Request a new phone number batch provisioning

What it does

Requests a new phone number batch provisioning.

Endpoint

POST

/byon/provisioning/v1/

Request Body

Attributes

Description

friendlyName
optional (query)

A filter on the list based on the friendlyName (string) field.

contactId
required (query)

The unique identifier of the contact to request the phone number provision for.

numbers
required (body)

A comma-separated list of phone number details.

  • phoneNumber
  • country (only optional if the phone number already included the country code)

Example body having two entities

[
  {
    "phoneNumber": "02315551337",
    "country": "DE"
  },
  {
    "phoneNumber": "4923142144"
  }
]

Curl

curl -X POST "https://api.tyntec.com/byon/provisioning/v1?contactId=68e5e1bde21a40b1a7b86a0e955d8bcd" -H  "accept: application/json" -H  "apiKey: ds9SomeApiKeyl337" -H  "content-type: application/json" -d "[  {    \"phoneNumber\": \"02315551337\",    \"country\": \"DE\"  },  {    \"phoneNumber\": \"4923142144\"  }]"

 

Responses

Code

Details

200

The phone number provisioning requests
Example Value
{
  "accountId": "string",
  "contactId": "string",
  "friendlyName": "string",
  "requestId": "string",
  "status": "string"
  "dateProvisioningRequest": 0,
  "dateProvisioningUpdated": 0,
  "dateProvisioningCompleted": 0,
  "loaId": "string",
  "loaStatus": "string"
 }

Example

Response body

{
  "accountId": "CPaasAccountName",
  "contactId": "26c99e4d97b44c9aa50bf7fb29801ebe",
  "requestId": "2cfa638e3d9c4da399c4fa70a3698717",
  "friendlyName": "myFrienldyName",
  "status": "LOA_PENDING",
  "dateProvisioningRequest": 1521205266416,
  "dateProvisioningUpdated": 1521205267953,
  "dateProvisioningCompleted": 0,
  "loaId": "313e1006-703a-4720-bf01-1d2b6305f45a",
  "loaStatus": "sent"
}

400

Not valid contact providedExample

Error: Bad Request

Response body

{"message":"The number provided is not valid","code":"PhoneNumberNotValid","timestamp":1521036399010}

401

Unauthorized

403

Forbidden

404

Contact not foundExample

Error: Not Found

Response body

{"message":"Contact not found","code":"ContactNotFound","timestamp":1521202708881}

500

Something went wrong :-(Example Value{  "code": "string",  "message": "string",  "timestamp": 0}