curl --request PUT \
--url https://app.freyavoice.ai/api/v2/phone-numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phoneNumbers": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "<string>",
"friendlyName": "<string>",
"config": {
"capabilities": {
"voice": "<string>",
"sms": true
},
"voiceConfig": "<string>",
"messagingConfig": "<string>",
"emergencyCalls": true,
"inboundAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outboundAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"originationUri": "<string>",
"sipOutbound": {
"enabled": true,
"endpoint": "<string>",
"port": 123,
"username": "<string>",
"password": "<string>",
"fromDomain": "<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,
"inboundAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outboundAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"originationUri": "<string>",
"sipInbound": {
"enabled": true
},
"sipOutbound": {
"enabled": true,
"endpoint": "<string>",
"port": 123,
"username": "<string>",
"password": "<string>",
"fromDomain": "<string>",
"transportProtocol": "UDP",
"secureMedia": true,
"headers": [
{
"key": "<string>",
"value": "<string>"
}
]
}
},
"inboundAgentName": "<string>",
"outboundAgentName": "<string>",
"inboundAgentEntityType": "<string>",
"outboundAgentEntityType": "<string>",
"inboundAgentWorkflowId": "<string>",
"outboundAgentWorkflowId": "<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://app.freyavoice.ai/api/v2/phone-numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phoneNumbers": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "<string>",
"friendlyName": "<string>",
"config": {
"capabilities": {
"voice": "<string>",
"sms": true
},
"voiceConfig": "<string>",
"messagingConfig": "<string>",
"emergencyCalls": true,
"inboundAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outboundAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"originationUri": "<string>",
"sipOutbound": {
"enabled": true,
"endpoint": "<string>",
"port": 123,
"username": "<string>",
"password": "<string>",
"fromDomain": "<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,
"inboundAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outboundAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"originationUri": "<string>",
"sipInbound": {
"enabled": true
},
"sipOutbound": {
"enabled": true,
"endpoint": "<string>",
"port": 123,
"username": "<string>",
"password": "<string>",
"fromDomain": "<string>",
"transportProtocol": "UDP",
"secureMedia": true,
"headers": [
{
"key": "<string>",
"value": "<string>"
}
]
}
},
"inboundAgentName": "<string>",
"outboundAgentName": "<string>",
"inboundAgentEntityType": "<string>",
"outboundAgentEntityType": "<string>",
"inboundAgentWorkflowId": "<string>",
"outboundAgentWorkflowId": "<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.