Get all subscriptions

The GET /subscriptions endpoint can be used to see a list of all subscriptions for the account.

In this page


Most URLs in the example code use the following values:

Headers

Header parameters in Requests (Webhooks API) apply to this endpoint.

Authorization scopes required:

Scope
admin:read

Requests

Request a list of all available subscriptions

curl -L -X GET "https://***.api.newvoicemedia.com/webhooks/subscriptions" \
-H "Authorization: bearer <ACCESS_TOKEN>" \
-H "Accept: application/vnd.newvoicemedia.v1+json"

Responses

A response to a request returns a list of subscriptions.

Successful response

Success response code and parameters in Requests (Webhooks API) apply to a successful response.

Example response

{
    "subscriptions": [
        {
            "subscriptionId": "2V1EhIxvsBPpnqf6Hqv9mtPZx1a",
            "name": "My App",
            "url": "https://your-application.com/webhooks/events",
            "events": [
                "agent.presencechanged.v1"
            ],
            "enabled": true
        },
        {
            "subscriptionId": "2V1EhIxvsguygqf6Hqv9mtPZx5s",
            "name": "Middleware App",
            "url": "https://another-application.com/webhooks/events",
            "events": [
                "channel.connected.v1"
            ],
            "enabled": true
        }
    ]
}

Each subscription contains the following parameters:

  • subscriptionId — The unique identifier for the subscription. This ID can be used to edit or delete the subscription.
  • name — The name for the subscription, specified during the creation of the subscription. The name is unique.
  • url — The URL that the webhook events are sent to. It is a fully qualified https URL.
  • events — A list of the event types that are subscribed to and are sent to the URL. Each item in the list is the name of an event type.
  • enabled — Indicates whether the subscription is enabled. Notifications are only sent to the URL if the subscription is enabled.

Try it out

  

For information, see Trying out Vonage Contact Center APIs.