WayloAIWaylo Docs
APIReferencePhone numbers

Import phone number

POST
/phone-numbers

Import a number the connected account already owns and attach it to the Waylo trunk. Importing replaces the number's current call routing at the carrier. Refused when the account does not own it (422), when another workspace or tenant has it active (409), or when the agent is not in the workspace (422). Answers with the number, active or failed with a statusReason — a failure is its state, not a failed request, retried with provision.

Access: workspace_admin · API key phone_numbers:write

Authorization

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

Header Parameters

Authorization*string

Your API key.

Request Body

application/json
  1. body
provider*"twilio"
Value in"twilio"
connectionId*string
Formatuuid
workspaceId*string
Formatuuid
e164*string
Match^\+[1-9]\d{1,14}$
name?|
Length1 <= length <= 100
agentId?|
Formatuuid

Response Body

Created

application/json
  1. response
id*string
workspaceId*string
connectionId*string
connectionName*string
provider*"twilio"
Value in"twilio"
e164*string
providerNumberId*string
name*string|null
agentId*|
Formatuuid
agentName*string|null
status*string
Value in"activating""active""failed"
statusReason*string|null
active*boolean
createdByUserId*|
Formatuuid
createdByUserName*string|null
updatedByUserId*|
Formatuuid
updatedByUserName*string|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X POST 'https://api.poc.app.waylovoice.ai/phone-numbers' \  -H 'Authorization: Bearer sk_waylo_...' \  -H 'Content-Type: application/json' \  -d '{  "provider": "twilio",  "connectionId": "84b500d7-71c8-4b1f-adf4-f1eb0000973d",  "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c",  "e164": "+15005550006"}'
Example Response
{  "id": "string",  "workspaceId": "string",  "connectionId": "string",  "connectionName": "string",  "provider": "twilio",  "e164": "string",  "providerNumberId": "string",  "name": "string",  "agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2",  "agentName": "string",  "status": "activating",  "statusReason": "string",  "active": true,  "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"}