Yay.com loading

Loading

  • My Shopping Cart (0) £0.00

  • Register

Phone Numbers & Call Routing

API Access

Build custom apps using our JSON API

FREE
Get your free API Key

Phone Numbers

Phone Numbers for incoming calls and outgoing caller ID

Get your free API Key

Filter:

  • All
  • GET
  • POST
  • PUT
  • DELETE
  • Chargeable *

* You will be charged every time this command is run.

  • GET/voip/number

    Gets all phone numbers on an account

    Back to top

    Request Details

    Response Details

    Request Details

    This command has no URL/Query String parameters

    Response Details

    200 Response

    {
        "result" : [
            {
                "name" : "Pete's Direct Dial",
                "price_category" : 1,
                "number" : "505505",
                "country_code" : "44",
                "call_flow" : "b6493b1a-b70c-428f-ad55-f9197fec8e01",
                "out_of_hours" : "026fc253-d2d2-4c66-8275-235610de2bf6",
                "trunk" : "aa432e40-6c55-4f19-8407-adf9ca66b652",
                "can_invite_anonymously" : true,
                "uuid" : "31347d42-00bd-44a5-9b5c-20dc4197a2f6",
                "created_on" : "2017-09-23",
                "updated_on" : "2017-09-23"
            }
        ],
        "status_code" : 200,
        "status_message" : "OK"
    }
  • GET/voip/number/pending

    Gets all pending activation phone numbers on an account

    Back to top

    Request Details

    Response Details

    Request Details

    This command has no URL/Query String parameters

    Response Details

    200 Response

    {
        "result" : [
            {
                "name" : "Pete's Direct Dial",
                "price_category" : 1,
                "number" : "505505",
                "country_code" : "44",
                "call_flow" : "b6493b1a-b70c-428f-ad55-f9197fec8e01",
                "out_of_hours" : "026fc253-d2d2-4c66-8275-235610de2bf6",
                "trunk" : "aa432e40-6c55-4f19-8407-adf9ca66b652",
                "can_invite_anonymously" : true,
                "uuid" : "31347d42-00bd-44a5-9b5c-20dc4197a2f6",
                "created_on" : "2017-09-23",
                "updated_on" : "2017-09-23"
            }
        ],
        "status_code" : 200,
        "status_message" : "OK"
    }
  • GET/voip/number/{uuid}

    Gets the details for a specific number on an account

    Back to top

    Request Details

    Response Details

    Request Details

    URL and Query String Parameters

    • Name

    • Type

    • Required

      • uuid

      • String

      • True

      The UUID of the Number to be queried

    Response Details

    200 Response

    {
        "result" : {
            "name" : "Pete's Direct Dial",
            "price_category" : 1,
            "number" : "505505",
            "country_code" : "44",
            "call_flow" : "b6493b1a-b70c-428f-ad55-f9197fec8e01",
            "out_of_hours" : "026fc253-d2d2-4c66-8275-235610de2bf6",
            "trunk" : "aa432e40-6c55-4f19-8407-adf9ca66b652",
            "can_invite_anonymously" : true,
            "uuid" : "31347d42-00bd-44a5-9b5c-20dc4197a2f6",
            "created_on" : "2017-09-23",
            "updated_on" : "2017-09-23"
        },
        "status_code" : 200,
        "status_message" : "OK"
    }

    404 Response

    {
        "result" : {},
        "status_code" : 404,
        "status_message" : "Not Found"
    }
  • Chargeable *

    POST/voip/number

    Allocate a phone number to an account

    Back to top

    Request Details

    Response Details

    Request Details

    This command has no URL/Query String parameters

    POST body

    • Name

    • Type

    • Required

      • area_code

      • String

      • True

      The area code of this Number

      • call_flow

      • String

      • False

      The UUID of the Call Flow assigned to this Number. A Number can have either a Call Flow or a Trunk

      • can_invite_anonymously

      • boolean

      • True

      Whether or not this Number accepts invites from unknown sources

      • country_code

      • String

      • True

      The country dialling code of this Number

      • name

      • String

      • True

      The name of this Number

      • number

      • String

      • True

      The local number

      • out_of_hours

      • String

      • False

      The UUID of the Out of Hours diary assigned to this Number

      • trunk

      • String

      • False

      The UUID of the Trunk assigned to this Number. A Number can have either a Call Flow or a Trunk

    JSON all-fields example:

    {
        "name" : "Pete's Direct Dial",
        "number" : "505505",
        "country_code" : "44",
        "area_code" : "1947",
        "call_flow" : "b6493b1a-b70c-428f-ad55-f9197fec8e01",
        "out_of_hours" : "026fc253-d2d2-4c66-8275-235610de2bf6",
        "trunk" : "aa432e40-6c55-4f19-8407-adf9ca66b652",
        "can_invite_anonymously" : true
    }

    Response Details

    201 Response

    {
        "result" : {
            "name" : "Pete's Direct Dial",
            "price_category" : 1,
            "number" : "505505",
            "country_code" : "44",
            "call_flow" : "b6493b1a-b70c-428f-ad55-f9197fec8e01",
            "out_of_hours" : "026fc253-d2d2-4c66-8275-235610de2bf6",
            "trunk" : "aa432e40-6c55-4f19-8407-adf9ca66b652",
            "can_invite_anonymously" : true,
            "uuid" : "31347d42-00bd-44a5-9b5c-20dc4197a2f6",
            "created_on" : "2017-09-23"
        },
        "status_code" : 201,
        "status_message" : "Created"
    }

    400 Response

    {
        "result" : {},
        "status_code" : 400,
        "status_message" : "Bad Request"
    }
  • PUT/voip/number/{uuid}

    Update an allocated phone number

    Back to top

    Request Details

    Response Details

    Request Details

    URL and Query String Parameters

    • Name

    • Type

    • Required

      • uuid

      • String

      • True

      The UUID of the number to be updated

    PUT body

    • Name

    • Type

    • Required

      • area_code

      • String

      • True

      The area code of this Number

      • call_flow

      • String

      • False

      The UUID of the Call Flow assigned to this Number. A Number can have either a Call Flow or a Trunk

      • can_invite_anonymously

      • boolean

      • True

      Whether or not this Number accepts invites from unknown sources

      • country_code

      • String

      • True

      The country dialling code of this Number

      • name

      • String

      • True

      The name of this Number

      • number

      • String

      • True

      The local number

      • out_of_hours

      • String

      • False

      The UUID of the Out of Hours diary assigned to this Number

      • trunk

      • String

      • False

      The UUID of the Trunk assigned to this Number. A Number can have either a Call Flow or a Trunk

    JSON all-fields example:

    {
        "name" : "Pete's Direct Dial",
        "call_flow" : "b6493b1a-b70c-428f-ad55-f9197fec8e01",
        "out_of_hours" : "026fc253-d2d2-4c66-8275-235610de2bf6",
        "trunk" : "aa432e40-6c55-4f19-8407-adf9ca66b652",
        "can_invite_anonymously" : true
    }

    Response Details

    200 Response

    {
        "result" : {
            "name" : "Pete's Direct Dial",
            "price_category" : 1,
            "number" : "505505",
            "country_code" : "44",
            "call_flow" : "b6493b1a-b70c-428f-ad55-f9197fec8e01",
            "out_of_hours" : "026fc253-d2d2-4c66-8275-235610de2bf6",
            "trunk" : "aa432e40-6c55-4f19-8407-adf9ca66b652",
            "can_invite_anonymously" : true,
            "uuid" : "31347d42-00bd-44a5-9b5c-20dc4197a2f6",
            "created_on" : "2017-09-23",
            "updated_on" : "2017-09-23"
        },
        "status_code" : 200,
        "status_message" : "OK"
    }

    400 Response

    {
        "result" : {},
        "status_code" : 400,
        "status_message" : "Bad Request"
    }

    404 Response

    {
        "result" : {},
        "status_code" : 404,
        "status_message" : "Not Found"
    }
  • DELETE/voip/number/{uuid}?policy={policy}

    Delete an allocate number from an account

    Back to top

    Request Details

    Response Details

    Request Details

    URL and Query String Parameters

    • Name

    • Type

    • Required

      • uuid

      • String

      • True

      The UUID of the number to be deleted

    Response Details

    204 Response

    {
        "result" : {},
        "status_code" : 204,
        "status_message" : "No Content"
    }

    404 Response

    {
        "result" : {},
        "status_code" : 404,
        "status_message" : "Not Found"
    }
View Desktop Site