signalwire-node
signalwire-node copied to clipboard
Getting 422 Invalid Attribute when trying to purchase a number
I've verified the number is available and I'm getting below error
curl -L 'https://project.signalwire.com/api/relay/rest/phone_numbers' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic xxx' \
-d '{
"number": "+14809561998"
}'
{
"errors": [
{
"detail": null,
"status": "422",
"title": "Invalid Attribute",
"code": "422"
}
]
}
However, I also tried +19254809561 and got
{
"id": "c1ac439e-8d07-462d-9f07-c3771a55ff56",
"name": null,
"number": "+19254809561",
"capabilities": [
"voice",
"fax",
"sms",
"mms"
],
"number_type": "longcode",
"e911_address_id": null,
"created_at": "2024-02-07T10:21:01Z",
"updated_at": "2024-02-07T10:21:01Z",
"next_billed_at": "2024-02-07T10:21:01Z",
"call_handler": "laml_webhooks",
"call_receive_mode": "voice",
"call_request_url": null,
"call_request_method": null,
"call_fallback_url": null,
"call_fallback_method": null,
"call_status_callback_url": null,
"call_status_callback_method": null,
"call_laml_application_id": null,
"call_dialogflow_agent_id": null,
"call_relay_context": null,
"call_relay_application": null,
"call_relay_connector_id": null,
"call_sip_endpoint_id": null,
"call_verto_resource": null,
"call_video_room_id": null,
"call_relay_script_url": null,
"message_handler": "laml_webhooks",
"message_request_url": null,
"message_request_method": null,
"message_fallback_url": null,
"message_fallback_method": null,
"message_laml_application_id": null,
"message_relay_context": null,
"country_code": "US"
}
When trying to purchase the same number again I got
{
"errors": [
{
"detail": "Number Purchase failed. Number already exists.",
"status": "422",
"title": "Invalid Attribute",
"code": "422"
}
]
}