Endpoints to manage config relating to webhooks sent from Trybe
listWebhookConfigsThis endpoint retrieves a list of WebhookConfigs.
The response to a request to list WebhookConfigs
{
"data": [],
"meta": {
"from": 1,
"to": 2,
"total": 2,
"current_page": 1,
"last_page": 2,
"per_page": 15,
"path": "http://example.com/api"
},
"links": {
"first": "http://example.com?page=1",
"next": "https://example.com?page=3",
"prev": "https://example.com?page=1",
"last": "https://example.com?page=4"
}
}createWebhookConfigThis endpoint creates a new WebhookConfig.
nameA name to identify this webhook config, for internal use.
urlAn HTTPS URL where the webhooks should be sent.
methodThe HTTP verb to be used.
Possible values are get and post
secretA secret to be used to generate a signature for each webhook. Must be a minimum of 12 characters.
An array of string identifiers for the webhook events to be subscribed to.
An array of emails which should be sent a notification if the webhook has issues.
Whether this webhook should currently be enabled.
site_idThe ID of the site this config belongs to.
The response to a request a single WebhookConfig
{
"data": {
"id": "69ceac2e81222b01710003c5",
"name": "Default webhooks",
"url": "https://example.com/trybe-webhooks",
"method": "post",
"events": [
"basket.submitted",
"basket.submitted",
"basket.submitted"
],
"notification_emails": [
"jane@example.com",
"jane@example.com",
"jane@example.com",
"jane@example.com",
"jane@example.com"
],
"enabled": false,
"site_id": "c5522956-2a37-11d8-74b7-6b96f85ea333",
"organisation_id": "cb31bb84-24a2-23c9-76d1-f21f5804f125"
},
"meta": {
"events": [
{
"event": "basket.submitted",
"description": "Fired when a basket is submitted"
},
{
"event": "basket.submitted",
"description": "Fired when a basket is submitted"
}
]
}
}getWebhookConfigUse this endpoint to retrieve a WebhookConfig
The unique identifier of the WebhookConfig.
{
"data": {
"id": "69ceac2e81222b017100039a",
"name": "Default webhooks",
"url": "https://example.com/trybe-webhooks",
"method": "post",
"events": [
"basket.submitted",
"basket.submitted",
"basket.submitted",
"basket.submitted",
"basket.submitted"
],
"notification_emails": [
"jane@example.com",
"jane@example.com",
"jane@example.com"
],
"enabled": false,
"site_id": "46526967-cf15-9ec5-c64b-ce65283fc6b9",
"organisation_id": "c4bf6a08-587c-405e-23ff-9d159856f627"
},
"meta": {
"events": []
}
}{
"message": "The requested resource could not be found"
}updateWebhookConfigUse this endpoint to update an existing WebhookConfig.
The unique identifier of the WebhookConfig.
A name to identify this webhook config, for internal use.
urlAn HTTPS URL where the webhooks should be sent.
methodThe HTTP verb to be used. Defaults to `post`` if not set.
Possible values are get and post
secretA secret to be used to generate a signature for each webhook. Must be a minimum of 12 characters.
An array of string identifiers for the webhook events to be subscribed to.
An array of emails which should be sent a notification if the webhook has issues.
Whether this webhook should currently be enabled.
The ID of the site this config belongs to.
{
"data": {
"id": "69ceac2e81222b01710003c6",
"name": "Default webhooks",
"url": "https://example.com/trybe-webhooks",
"method": "get",
"secret": "gldyACJS7uyraHPpuoTV4JIh",
"events": [
"basket.submitted"
],
"notification_emails": [
"jane@example.com",
"jane@example.com",
"jane@example.com",
"jane@example.com",
"jane@example.com"
],
"enabled": true,
"site_id": "e7e9862b-b50f-6a90-559c-23bc1362f64b",
"organisation_id": "5a20528b-86a7-5176-8201-119967ca49e7"
},
"meta": {
"events": [
{
"event": "basket.submitted",
"description": "Fired when a basket is submitted"
},
{
"event": "basket.submitted",
"description": "Fired when a basket is submitted"
},
{
"event": "basket.submitted",
"description": "Fired when a basket is submitted"
}
]
}
}{
"message": "The requested resource could not be found"
}deleteWebhookConfigUse this endpoint to archive a WebhookConfig.
The unique identifier of the WebhookConfig.
Empty response{
"message": "The requested resource could not be found"
}restoreWebhookConfigUse this endpoint to restore an archived WebhookConfig.
The unique identifier of the WebhookConfig.
{
"data": {
"id": "69ceac2e81222b017100039b",
"name": "Default webhooks",
"url": "https://example.com/trybe-webhooks",
"method": "post",
"secret": "gldyACJS7uyraHPpuoTV4JIh",
"events": [
"basket.submitted",
"basket.submitted",
"basket.submitted"
],
"notification_emails": [
"jane@example.com",
"jane@example.com"
],
"enabled": false,
"site_id": "0fc14dff-f0ae-c384-10d4-662c84381bf4",
"organisation_id": "e4cac4b3-e66d-8745-3fdd-d14958893248"
},
"meta": {
"events": [
{
"event": "basket.submitted",
"description": "Fired when a basket is submitted"
},
{
"event": "basket.submitted",
"description": "Fired when a basket is submitted"
}
]
}
}{
"message": "The requested resource could not be found"
}