POST
/
import-number
curl --request POST \
  --url https://app.phonely.ai/api/import-number \
  --header 'Content-Type: application/json' \
  --header 'X-Authorization: <api-key>' \
  --data '{
  "uid": "<string>",
  "agentId": "<string>",
  "source": "<string>",
  "twilioAccountSid": "<string>",
  "twilioAuthToken": "<string>",
  "phoneNumber": "<string>",
  "countryCode": "<string>"
}'
{
  "message": "<string>"
}

Authorizations

X-Authorization
string
header
required

Body

application/json
uid
string
required

User ID

agentId
string
required

Agent ID (agent should not have a phone number assigned yet)

source
string
required

Phone number source (currently only supports 'twilio')

twilioAccountSid
string
required

Twilio account SID

twilioAuthToken
string
required

Twilio auth token

phoneNumber
string
required

Phone number to import, includes country code. i.e +10123456789

countryCode
string
required

Country code of the phone number, ISO 3166-1 alpha-2 format

Response

200
application/json
Successful response
message
string

Message indicating the result of the operation