Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Insert excerpt_ExcerptBetaAPI_ExcerptBetaAPInopaneltrueThe POST /subscriptions endpoint can be used to create a new subscription.

Insert excerpt
_ExcerptSubscriptionChangeDelay
_ExcerptSubscriptionChangeDelay
nopaneltrue

Panel
borderColor#eeeeee
bgColorwhite
titleColorwhite
borderWidth1
titleBGColor#D6219C
borderStylesolid
titleIn this page

Table of Contents

...

Code Block
languagejs
themeMidnight
{
    "name": "WebhookTest1",
    "url": "https://your-application.com/abc/123",
    "events": [
        "agent.presencechanged.v0v1"
    ],
    "enabled": true,
    "secret": "OFd4WHqXISxMAgoYneiFhgdGrOgYeToYPN3HjIO4xAxDvWd/oIKTW1P4A6GLXN0McDGlLtnTn1KCGCa+W5Gu="
}

...

  • name — The name of the subscription. The name must be unique.
  • url — The URL that the webhook events are sent to. It must be a fully qualified http or https URL.
  • events — A list of the event types you wish to receive webhook notifications for. Each item in the list must be the name of an event type. You can get a list of event types to discover their names. You can subscribe to sets of event types using a wildcard.

...

  • enabled — Notifications will only be sent to the URL if the subscription is enabled. If not specified, the subscription will be enabled when it is created.
  • secret — The secret used to sign notifications. If not specified, a secret will be automatically generated and returned in the response.

    Info

    For security, a signing secret should be at least 32 bytes.


Requests

Creates a new subscription

...

Code Block
languagejs
themeMidnight
{
    "subscriptionId": "2V1lVz6FeKOuVLEpSU6M0aqkM9b",
    "name": "WebhookTest1",
    "url": "https://your-application.com/webhooks/events",
    "events": [
        "agent.presencechanged.v0v1"
    ],
    "enabled": true,
    "secret": "OFd4WHqXISxMAgoYneiFhgdGrOgYeToYPN3HjIO4xAxDvWd/oIKTW1P4A6GLXN0McDGlLtnTn1KCGCa+W5Gu="
}

The subscription contains the following parameters:

Insert excerpt
_ExcerptAPISubscriptionWebhooksObject
_ExcerptAPISubscriptionWebhooksObject
nopaneltrue
Insert excerpt
_ExcerptRunInPostman
_ExcerptRunInPostman
nopaneltrue