Subscribe to a webhook

Related guide: Webhooks.

Headers

AuthorizationstringRequired

Bearer authentication of the form Bearer <token>, where token is your auth token.

x-monite-versionstringRequired

Request

This endpoint expects an object.
object_typeenumRequired

The object type to whose events you want to subscribe.

To subscribe to events from multiple object types, create a separate subscription for each object type.

urlstringRequiredformat: "uri">=1 character<=2083 characters
An HTTPS URL to which Monite will send webhooks. This URL must be accessible over the public Internet, accept POST requests, and respond with a 2xx status code. The same URL can be used by multiple webhook subscriptions.
event_typeslist of stringsOptional

A list of events to subscribe to. If set to an empty array, the subscription includes all events triggered by the specified object_type.

Response

Successful Response
idstringformat: "uuid"

A unique URL assigned to this webhook subscription. This ID is also included in the webhook data as the webhook_subscription_id field.

event_typeslist of strings

Events included in this webhook subscription. An empty array means the subscription includes all events triggered by the specified object_type.

object_typeenum
The object type associated with this webhook subscription.
secretstring

The webhook signing secret for this subscriptions. You can use it to verify webhook signatures.

statusenum
Allowed values:
urlstringformat: "uri">=1 character<=2083 characters
URL to which the webhooks are sent. The same URL can be used by multiple webhook subscriptions.

Errors