Yay.com loading

Loading

  • My Shopping Cart (0) £0.00

  • Register

Audio Management

API Access

Build custom apps using our JSON API

FREE
Get your free API Key

Sounds

A Sound represents an audio file used by the system for prompts, greetings and hold music

Get your free API Key

Filter:

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

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

  • GET/voip/sound

    Gets a list of all sounds 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" : "Track 1",
                "shared" : false,
                "file_name" : "hold_track_1.mp3",
                "tag" : "Hold Music",
                "uuid" : "31347d42-00bd-44a5-9b5c-20dc4197a2f6",
                "created_on" : "2017-03-28",
                "updated_on" : "2017-03-28"
            }
        ],
        "status_code" : 200,
        "status_message" : "OK"
    }
  • GET/voip/sound/{uuid}

    Gets the details for a specific sound 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 Sound to be queried

    Response Details

    200 Response

    {
        "result" : {
            "name" : "Track 1",
            "shared" : false,
            "file_name" : "hold_track_1.mp3",
            "tag" : "Hold Music",
            "uuid" : "31347d42-00bd-44a5-9b5c-20dc4197a2f6",
            "created_on" : "2017-03-28",
            "updated_on" : "2017-03-28"
        },
        "status_code" : 200,
        "status_message" : "OK"
    }

    404 Response

    {
        "result" : {},
        "status_code" : 404,
        "status_message" : "Not Found"
    }
  • GET/voip/sound/{uuid}/content

    Generates a temporary URL to the sound's audio content

    Back to top

    Request Details

    Response Details

    Request Details

    URL and Query String Parameters

    • Name

    • Type

    • Required

      • uuid

      • String

      • True

      The UUID of the Sound to be queried

    Response Details

    200 Response

    {
        "result" : {
            "content_url" : "content.yay.com/40c6614b-8c5d-48a0-ab6d-cdc4d47f914d"
        },
        "status_code" : 200,
        "status_message" : "OK"
    }

    404 Response

    {
        "result" : {},
        "status_code" : 404,
        "status_message" : "Not Found"
    }
  • POST/voip/sound

    Creates a new sound on an account

    Back to top

    Request Details

    Response Details

    Request Details

    This command has no URL/Query String parameters

    POST body

    • Name

    • Type

    • Required

      • content

      • String

      • True

      The Base64 encoded sound content

      • file_name

      • String

      • True

      The file name of the Sound

      • name

      • String

      • True

      The name of this Sound

      • tag

      • String

      • False

      A tag for this Sound file

    JSON all-fields example:

    {
        "name" : "Track 1",
        "content" : "VEhJUyBJUyBURVNUIFRFWFQgRk9SIEFVRElPIEZJTEUgQ09OVEVOVA==",
        "file_name" : "hold_track_1.mp3",
        "tag" : "Hold Music"
    }

    Response Details

    201 Response

    {
        "result" : {
            "name" : "Track 1",
            "shared" : false,
            "file_name" : "hold_track_1.mp3",
            "tag" : "Hold Music",
            "uuid" : "31347d42-00bd-44a5-9b5c-20dc4197a2f6",
            "created_on" : "2017-03-28"
        },
        "status_code" : 201,
        "status_message" : "Created"
    }

    400 Response

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

    Updates the specified sound 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 Sound to be updated

    PUT body

    • Name

    • Type

    • Required

      • content

      • String

      • True

      The Base64 encoded sound content

      • file_name

      • String

      • True

      The file name of the Sound

      • name

      • String

      • True

      The name of this Sound

      • tag

      • String

      • False

      A tag for this Sound file

    JSON all-fields example:

    {
        "name" : "Track 1",
        "content" : "VEhJUyBJUyBURVNUIFRFWFQgRk9SIEFVRElPIEZJTEUgQ09OVEVOVA==",
        "file_name" : "hold_track_1.mp3",
        "tag" : "Hold Music"
    }

    Response Details

    200 Response

    {
        "result" : {
            "name" : "Track 1",
            "shared" : false,
            "file_name" : "hold_track_1.mp3",
            "tag" : "Hold Music",
            "uuid" : "31347d42-00bd-44a5-9b5c-20dc4197a2f6",
            "created_on" : "2017-03-28",
            "updated_on" : "2017-03-28"
        },
        "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/sound/{uuid}

    Deletes the specified sound 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 Sound 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