Get event types


Beta/Early Access Program

This API is in the Beta/Early Access Program and is still under development. If you are interested in using this API, please contact your Customer Success Manager or Account Manager. Participation in this pilot program is at the discretion of Product Management and not guaranteed.

Use of this API outside of the program is prohibited.

The GET /event-types endpoint can be used to see a list of all currently available webhook event types. The name of each event type can be used to create a subscription, and the JSON schema provides detailed information about the format of the event. As new event types are released they will become available using this endpoint.

You can also find more detailed information about available event types (including examples)

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 event types

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

Responses

Responses to the request return a list of event types.

Successful response

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

Example response

{
    "eventTypes": [
        {
            "name": "agent.presencechanged.v0",
            "description": "Indicates that an agent's presence has been changed.",
            "jsonSchema": {
                "type": "object",
                "title": "agent.presencechanged.v0",
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "required": [
                    "timestamp",
                    "presence",
                    "user"
                ],
                "properties": {
                    "user": {
                        "type": "object",
                        "properties": {
                            "agentId": {
                                "type": "string"
                            }
                        }
                    },
                    "presence": {
                        "type": "object",
                        "properties": {
                            "category": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "enum": [
                                            "loggedOut",
                                            "away",
                                            "extendedAway",
                                            "ready"
                                        ],
                                        "type": "string"
                                    }
                                }
                            },
                            "description": {
                                "type": "string"
                            }
                        }
                    },
                    "timestamp": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "description": "Indicates that an agent's presence has been changed.",
                "x-class-name": "AgentPresenceChangedV0",
                "additionalProperties": true
            },
            "releaseStatus": "Beta",
        },
        {
            "name": "channel.alerting.v0",
            "description": "Indicates that a channel has begun alerting.",
            "jsonSchema": {
                "type": "object",
                "title": "channel.alerting.v0",
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "required": [
                    "timestamp",
                    "channel"
                ],
                "properties": {
                    "channel": {
                        "type": "object",
                        "properties": {
                            "party": {
                                "type": "object",
                                "properties": {
                                    "role": {
                                        "enum": [
                                            "external",
                                            "agent",
                                            "monitor",
                                            "voicemail"
                                        ],
                                        "type": "string",
                                        "description": "The role of the party on the channel"
                                    },
                                    "agentId": {
                                        "type": "string",
                                        "description": "The id for the party if they are an agent or monitor"
                                    }
                                },
                                "description": "The party on the channel"
                            },
                            "channelId": {
                                "type": "string",
                                "format": "uuid",
                                "description": "The unique identifier for the channel"
                            },
                            "interactionId": {
                                "type": "string",
                                "format": "uuid",
                                "description": "The unique identifier for the interaction"
                            }
                        },
                        "description": "The channel that has begun alerting"
                    },
                    "timestamp": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "description": "Indicates that a channel has begun alerting.",
                "x-class-name": "ChannelAlertingV0",
                "additionalProperties": true
            },
            "releaseStatus": "Deprecated",
        }
    ]
}

Each event type contains the following properties:

  • name — The name of the event type. This typically consists of three parts — the entity performing the action, the action, and the version of the event type. The name of the event type can be used to create a new subscription.
  • description — A brief description of what the event type is and when it will be raised.
  • jsonSchema — The schema of the webhook event type. Each event type can have a different schema containing useful information about the event that occurred.
  • releaseStatus — Refers to the current state of an event type. Can be one of the following values:
    • Beta. The event type is part of the Early Access Program.
    • General Availability. The event type is ready for use.
    • Deprecated. The event type is outdated and shouldn't be used.

Try it out

  

For information, see Trying out Vonage Contact Center APIs.