Yay.com loading

Loading

Call us on (917) 9001 YAY

Login to Yay.com

Phone Numbers & Call Routing

API Access

Build custom apps using our JSON API

1st month FREE
Become a Reseller

Phone Numbers

Phone Numbers for incoming calls and outgoing caller ID

Become a Reseller

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" : "2015-01-01",
                "updated_on" : "2018-07-17",
                "emergency_address" : "b6493b1a-b70c-428f-ad55-f9197fec8e01",
                "number_address" : "b9506b62-3230-40bd-aff6-8680a71e6310"
            }
        ],
        "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" : "2015-01-01",
                "updated_on" : "2018-07-17",
                "emergency_address" : "b6493b1a-b70c-428f-ad55-f9197fec8e01",
                "number_address" : "b9506b62-3230-40bd-aff6-8680a71e6310"
            }
        ],
        "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" : "2015-01-01",
            "updated_on" : "2018-07-17",
            "emergency_address" : "b6493b1a-b70c-428f-ad55-f9197fec8e01",
            "number_address" : "b9506b62-3230-40bd-aff6-8680a71e6310"
        },
        "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

      • emergency_address

      • String

      • False

      The UUID of the Emergency Address assigned to this Number

      • name

      • String

      • True

      The name of this Number

      • number

      • String

      • True

      The local number

      • number_address

      • String

      • False

      The UUID of the address used to activate this number where required (EU numbers)

      • 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,
        "emergency_address" : "b6493b1a-b70c-428f-ad55-f9197fec8e01",
        "number_address" : "b9506b62-3230-40bd-aff6-8680a71e6310"
    }

    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" : "2015-01-01",
            "emergency_address" : "b6493b1a-b70c-428f-ad55-f9197fec8e01",
            "number_address" : "b9506b62-3230-40bd-aff6-8680a71e6310"
        },
        "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

      • emergency_address

      • String

      • False

      The UUID of the Emergency Address assigned to this Number

      • name

      • String

      • True

      The name of this Number

      • number

      • String

      • True

      The local number

      • number_address

      • String

      • False

      The UUID of the address used to activate this number where required (EU numbers)

      • 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,
        "emergency_address" : "b6493b1a-b70c-428f-ad55-f9197fec8e01",
        "number_address" : "b9506b62-3230-40bd-aff6-8680a71e6310"
    }

    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" : "2015-01-01",
            "updated_on" : "2018-07-17",
            "emergency_address" : "b6493b1a-b70c-428f-ad55-f9197fec8e01",
            "number_address" : "b9506b62-3230-40bd-aff6-8680a71e6310"
        },
        "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"
    }