Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting 422 Invalid Attribute when trying to purchase a number #503

Open
colinmbr opened this issue Feb 7, 2024 · 0 comments
Open

Getting 422 Invalid Attribute when trying to purchase a number #503

colinmbr opened this issue Feb 7, 2024 · 0 comments

Comments

@colinmbr
Copy link

colinmbr commented Feb 7, 2024

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"
        }
    ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant