curl --request PUT \
--url https://app2.freyavoice.ai/api/v2/phone-numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phoneNumbers": [
{
"id": "<string>",
"number": "<string>",
"friendlyName": "<string>",
"config": {
"capabilities": {
"voice": "<string>",
"sms": true
},
"voiceConfig": "<string>",
"messagingConfig": "<string>",
"emergencyCalls": true,
"configType": "agents",
"inboundAgentId": "<string>",
"outboundAgentId": "<string>",
"inboundWorkflowId": "<string>",
"outboundWorkflowId": "<string>",
"originationUri": "<string>",
"sipInbound": {
"enabled": true
},
"sipOutbound": {
"enabled": true,
"endpoint": "<string>",
"port": 123,
"username": "<string>",
"password": "<string>",
"transportProtocol": "UDP",
"secureMedia": true,
"headers": [
{
"key": "<string>",
"value": "<string>"
}
]
}
}
}
]
}
'{
"success": true,
"data": {
"message": "<string>",
"result": {
"updated": [
{
"id": "<string>",
"number": "<string>",
"workspaceId": "<string>",
"userId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"friendlyName": "<string>",
"config": {
"capabilities": {
"voice": "<string>",
"sms": true
},
"voiceConfig": "<string>",
"messagingConfig": "<string>",
"emergencyCalls": true,
"configType": "agents",
"inboundAgentId": "<string>",
"outboundAgentId": "<string>",
"inboundWorkflowId": "<string>",
"outboundWorkflowId": "<string>",
"originationUri": "<string>",
"sipInbound": {
"enabled": true
},
"sipOutbound": {
"enabled": true,
"endpoint": "<string>",
"port": 123,
"username": "<string>",
"password": "<string>",
"transportProtocol": "UDP",
"secureMedia": true,
"headers": [
{
"key": "<string>",
"value": "<string>"
}
]
}
},
"inboundAgentName": "<string>",
"outboundAgentName": "<string>",
"inboundWorkflowName": "<string>",
"outboundWorkflowName": "<string>"
}
],
"errors": [
{
"id": "<string>",
"error": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
]
}
}
}Updates one or more phone numbers. Returns updated records and any validation errors.
curl --request PUT \
--url https://app2.freyavoice.ai/api/v2/phone-numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phoneNumbers": [
{
"id": "<string>",
"number": "<string>",
"friendlyName": "<string>",
"config": {
"capabilities": {
"voice": "<string>",
"sms": true
},
"voiceConfig": "<string>",
"messagingConfig": "<string>",
"emergencyCalls": true,
"configType": "agents",
"inboundAgentId": "<string>",
"outboundAgentId": "<string>",
"inboundWorkflowId": "<string>",
"outboundWorkflowId": "<string>",
"originationUri": "<string>",
"sipInbound": {
"enabled": true
},
"sipOutbound": {
"enabled": true,
"endpoint": "<string>",
"port": 123,
"username": "<string>",
"password": "<string>",
"transportProtocol": "UDP",
"secureMedia": true,
"headers": [
{
"key": "<string>",
"value": "<string>"
}
]
}
}
}
]
}
'{
"success": true,
"data": {
"message": "<string>",
"result": {
"updated": [
{
"id": "<string>",
"number": "<string>",
"workspaceId": "<string>",
"userId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"friendlyName": "<string>",
"config": {
"capabilities": {
"voice": "<string>",
"sms": true
},
"voiceConfig": "<string>",
"messagingConfig": "<string>",
"emergencyCalls": true,
"configType": "agents",
"inboundAgentId": "<string>",
"outboundAgentId": "<string>",
"inboundWorkflowId": "<string>",
"outboundWorkflowId": "<string>",
"originationUri": "<string>",
"sipInbound": {
"enabled": true
},
"sipOutbound": {
"enabled": true,
"endpoint": "<string>",
"port": 123,
"username": "<string>",
"password": "<string>",
"transportProtocol": "UDP",
"secureMedia": true,
"headers": [
{
"key": "<string>",
"value": "<string>"
}
]
}
},
"inboundAgentName": "<string>",
"outboundAgentName": "<string>",
"inboundWorkflowName": "<string>",
"outboundWorkflowName": "<string>"
}
],
"errors": [
{
"id": "<string>",
"error": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
]
}
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.