WayloAIWaylo Docs
APIReferenceTelephony connections

Create connection

POST
/telephony-connections

Connect a carrier account. provider decides the shape of config, and an unknown config key is refused. The credentials are checked against the carrier before anything is stored (422 when refused), then the Waylo trunk is provisioned in the account. Answers with the connection, active or failed with a statusReason — a failure is its state, not a failed request, retried with a resync. 503 when telephony is not configured.

Access: tenant_admin · API key telephony:write

Authorization

api-key
headerAuthorizationBearer <sk_waylo_<lookup><secret><checksum>>

Header Parameters

Authorization*string

Your API key.

Request Body

application/json
  1. body
name*string
Length1 <= length <= 100
provider*"twilio"
Value in"twilio"
config*

Response Body

Created

application/json
  1. response
id*string
name*string
status*string
Value in"activating""active""failed"
statusReason*string|null
active*boolean
numberCount*number
createdByUserId*|
Formatuuid
createdByUserName*string|null
updatedByUserId*|
Formatuuid
updatedByUserName*string|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
provider*"twilio"
Value in"twilio"
config*
Example Request
curl -X POST 'https://api.poc.app.waylovoice.ai/telephony-connections' \  -H 'Authorization: Bearer sk_waylo_...' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "provider": "twilio",  "config": {    "accountSid": "AC0123456789abcdef0123456789abcdef",    "apiKeySid": "SK0123456789abcdef0123456789abcdef",    "apiKeySecret": "string"  }}'
Example Response
{  "id": "string",  "name": "string",  "status": "activating",  "statusReason": "string",  "active": true,  "numberCount": 0,  "createdByUserId": "4d2aef9a-17b0-44e6-902e-616812033620",  "createdByUserName": "string",  "updatedByUserId": "b38eaad7-8efa-49e7-b0aa-619916a3821e",  "updatedByUserName": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "provider": "twilio",  "config": {    "accountSid": "string",    "apiKeySid": "string",    "trunkSid": "string"  }}