Manage webhooks

See, edit, and delete webhooks.


See all webhooks

To get a list of all webhooks in your workspace with their IDs, call the /workspaces/{workspace-id}/webhooks endpoint with your workspace ID as a path parameter.

Request

Response


See response example

JSON

    {
  "data": [
    {
      "id": "1df1ebb0-78a4-55d9-b806-15d22e391bd3",
      "url": "https://my.sample.endpoint.com/",
      "name": "My alert for order statuses",
      "active": true,
      "events": ["order.status"],
      "createdAt": "2022-02-17T08:47:11.377149Z",
      "updatedAt": "2022-02-17T08:47:11.377149Z",
      "secret": "QWZTFnMEXhqZKNmu"
    },
    {
      "id": "3ca2cab0-87b0-66d5-a755-55c13e353ac4",
      "url": "https://my.sample.endpoint.com/",
      "name": "An old alert for order statuses",
      "active": false,
      "events": ["order.status"],
      "createdAt": "2021-02-17T08:47:11.377149Z",
      "updatedAt": "2021-02-17T08:47:11.377149Z",
      "secret": ""
    }
  ],
  "error": null
}
  

ParameterOverview
data.idstring
The webhook ID.
data.urlstring
The URL of the webhook.
data.namestring
The name of the webhook.
data.activeboolean
Whether this webhook is active.
data.eventsarray of strings
A list of events that trigger the webhook.
data.createdAtstring
The timestamp when the webhook was created.
data.updatedAtstring
The timestamp when the webhook was last updated.
data.secretstring
The secret used to generate webhook signatures.

See a particular webhook

To get information about one webhook, call the /workspaces/{workspace-id}/webhooks/{webhook-id} endpoint with your workspace ID and a specific webhook ID as path parameters.

Request

Response


See response example

JSON

    {
  "data": {
    "id": "1df1ebb0-78a4-55d9-b806-15d22e391bd3",
    "url": "https://my.sample.endpoint.com/",
    "name": "My alert for order statuses",
    "active": true,
    "events": ["order.status"],
    "createdAt": "2022-02-17T08:47:11.377149Z",
    "updatedAt": "2022-02-17T08:47:11.377149Z",
    "secret": "QWZTFnMEXhqZKNmu"
  },
  "error": null
}
  

ParameterOverview
data.idstring
The webhook ID.
data.urlstring
The URL of the webhook.
data.namestring
The name of the webhook.
data.activeboolean
Whether this webhook is active.
data.eventsarray of strings
A list of events that trigger the webhook.
data.createdAtstring
The timestamp when the webhook was created.
data.updatedAtstring
The timestamp when the webhook was last updated.
data.secretstring
The secret used to generate webhook signatures.

Edit a webhook

To change parameters of a created webhook, call the /workspaces/{workspace-id}/webhooks/{webhook-id} endpoint with your workspace ID and a specific webhook ID as path parameters.

Request

ParameterOverview
eventsarray of strings / required
A list of events that trigger the webhook.
namestring / required
The name of the webhook.
urlstring / required
The URL of the webhook.
secretstring
The secret used to generate webhook signatures.
activeboolean
Whether this webhook should be active after creation. The default value is false.
See request example

JSON

    {
  "events": ["order.status"],
  "name": "My updated alert for order statuses",
  "url": "https://my.sample.endpoint.com/",
  "secret": "QWZTFnMEXhqZKNmu",
  "active": true
}
  

Response


See response example

JSON

    {
  "data": {
    "id": "1df1ebb0-78a4-55d9-b806-15d22e391bd3",
    "url": "https://my.sample.endpoint.com/",
    "name": "My updated alert for order statuses",
    "active": true,
    "events": ["order.status"],
    "createdAt": "2022-02-17T08:47:11.377149Z",
    "updatedAt": "2022-02-17T08:47:11.377149Z",
    "secret": "QWZTFnMEXhqZKNmu"
  },
  "error": null
}
  

ParameterOverview
data.idstring
The webhook ID.
data.urlstring
The URL of the webhook.
data.namestring
The name of the webhook.
data.activeboolean
Whether this webhook is active.
data.eventsarray of strings
A list of events that trigger the webhook.
data.createdAtstring
The timestamp when the webhook was created.
data.updatedAtstring
The timestamp when the webhook was last updated.
data.secretstring
The secret used to generate webhook signatures.

Delete a webhook

Request

To delete a webhook, call the /workspaces/{workspace-id}/webhooks/{webhook-id} endpoint with your workspace ID and a specific webhook ID as path parameters.

Response

If a webhook is deleted successfully, there will be no response body.