Webhook overview
Overview
Webhooks are a valuable resource that enables automation and improves productivity. You can manage webhooks using the webhook API resource.
Webhooks differ from API resources, which represent static data that can be created, updated, and retrieved as needed. Webhooks represent dynamic resources that can be configured to notify you automatically when specific customer actions occur, such as making a new template or requesting an approval.
The key concepts related to webhooks are events, event types, subscriptions, and queues.
Events
An event is the object delivered to a webhook. For example, when a new project is created within a Marq account, the event would be a JSON object containing all the project details.
Event types
Each event has a specific type. Event types follow the format API_OBJECT.ACTION
, where API_OBJECT
refers to an object defined in our documentation and ACTION
represents an action taken on the object.
An example of this syntax would be the object template
and the action would be created
- resulting in the following event type: template.created
.
Each event type is associated with an API scope. To create a webhook for a particular event type, you need to have a token with the necessary scope granted.
You can find a list of supported event types [here](link to supported event types).
Queues
Webhook events are internally placed in a queue before being sent to your endpoint. As soon as your webhook is created, events start populating the webhook queue, even if your webhook is disabled. Events remain in the queue for approximately 10 days. If your webhook remains disabled for more than 10 days, you may lose webhook events as they expire from the queue.
Webhook Response Timeout
It is important to respond to webhooks as quickly as possible. Responses that take longer than 5 seconds will time out.
Webhooks FAQs
Where can I create webhooks?
You can create webhooks using Marq's webhook API endpoints. To create a webhook for an account, you must have a token granted by a user of that account and have been given the necessary scopes associated with the event types for which you want to receive events.
How can I confirm that a webhook event was sent from Marq?
To verify Marq webhook events, follow the steps outlined in the webhook signature provided by Marq.
Updated over 1 year ago