Yay.com loading

Loading

Call us on 0330 122 6000

Login to Yay.com

SIP Trunks

API Access

Build custom apps using our JSON API

FREE
Get your free API Key

Trunk Authentication

A Trunk Authentication is a method of authorizing calls into the system. This can either be by IP, or username/password

Get your free API Key

Filter:

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

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

  • GET/voip/trunk/{uuid}/auth

    Gets a list of all of the authentication methods for the given trunk

    Back to top

    Request Details

    Response Details

    Request Details

    URL and Query String Parameters

    • Name

    • Type

    • Required

      • uuid

      • String

      • True

      The UUID of the Trunk to be queried

    Response Details

    200 Response

    {
        "result" : [
            {
                "type" : "ip",
                "ip" : "255.255.255.255",
                "username" : "pete_plumber1",
                "password" : "secret",
                "uuid" : "31347d42-00bd-44a5-9b5c-20dc4197a2f6",
                "created_on" : "2018-01-17",
                "updated_on" : "2018-01-17"
            }
        ],
        "status_code" : 200,
        "status_message" : "OK"
    }

    404 Response

    {
        "result" : {},
        "status_code" : 404,
        "status_message" : "Not Found"
    }
  • POST/voip/trunk/{uuid}/auth

    Creates a new authentication method for the given trunk

    Back to top

    Request Details

    Response Details

    Request Details

    URL and Query String Parameters

    • Name

    • Type

    • Required

      • uuid

      • String

      • True

      The UUID of the Trunk to be updated

    POST body

    • Name

    • Type

    • Required

      • ip

      • String

      • True

      If type is 'ip', this is the IP Address we will use to authenticate incoming calls.

      • password

      • String

      • True

      If type is 'sipuser', this is the SIP Password we will use to authenticate incoming calls.

      • type

      • String

      • True

      The type of authentication method. Either 'ip' or 'sipuser'.

      • username

      • String

      • True

      If type is 'sipuser', this is the SIP Username we will use to authenticate incoming calls.

    JSON all-fields example:

    {
        "type" : "ip",
        "ip" : "255.255.255.255",
        "username" : "pete_plumber1",
        "password" : "secret"
    }

    Response Details

    201 Response

    {
        "result" : {
            "type" : "ip",
            "ip" : "255.255.255.255",
            "username" : "pete_plumber1",
            "password" : "secret",
            "uuid" : "31347d42-00bd-44a5-9b5c-20dc4197a2f6",
            "created_on" : "2018-01-17"
        },
        "status_code" : 201,
        "status_message" : "Created"
    }

    400 Response

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

    404 Response

    {
        "result" : {},
        "status_code" : 404,
        "status_message" : "Not Found"
    }

    409 Response

    {
        "result" : {},
        "status_code" : 409,
        "status_message" : "Conflict"
    }
  • GET/voip/trunk/{uuid}/auth/{auth_uuid}

    Gets the details of a specific authentication method for the given trunk

    Back to top

    Request Details

    Response Details

    Request Details

    URL and Query String Parameters

    • Name

    • Type

    • Required

      • uuid

      • String

      • True

      The UUID of the Trunk to be updated

      • auth_uuid

      • String

      • True

      The UUID of the Trunk Authentication method to be updated

    Response Details

    200 Response

    {
        "result" : {
            "type" : "ip",
            "ip" : "255.255.255.255",
            "username" : "pete_plumber1",
            "password" : "secret",
            "uuid" : "31347d42-00bd-44a5-9b5c-20dc4197a2f6",
            "created_on" : "2018-01-17",
            "updated_on" : "2018-01-17"
        },
        "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"
    }

    409 Response

    {
        "result" : {},
        "status_code" : 409,
        "status_message" : "Conflict"
    }
View Desktop Site