Webhooks

Manage your webhook subscriptions with these endpoints.
GET/webhooks
Auth required

Get webhooks

Retrieves all webhooks

Sample request

GET
/webhooks
const headers = {
  'Authorization': 'Bearer YOUR_SECRET_TOKEN',
  'Accept':'application/json'
};

fetch('https://api.bazoom.com/client-api/v1/webhooks',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

Responses

[
  {
    "id": 1337,
    "created_at": "2026-03-10T12:10:25.000000Z",
    "updated_at": "2026-03-10T12:10:25.000000Z",
    "event": "order.link.ready_for_approval",
    "secret": "my-s3cr37",
    "endpoint": "https:example.com/webhooks/bazoom",
    "business_id": 1234,
    "user_id": 1234
  }
]

Responses

POST/webhooks
Auth required

Create a webhook

    Body

    • Name
      event
      Type
      WebhookEventName · enum
      Description

      Possible values

      order.link.published order.link.ready_for_approval media.activated media.deactivated

    • Name
      endpoint
      Type
      string
      Description

      The endpoint the webhook should hit. example: https://example.com

    • Name
      active
      Type
      boolean
      Description

      Whether the webhook should be active. Defaults to true

Sample request

POST
/webhooks
const headers = {
  'Authorization': 'Bearer YOUR_SECRET_TOKEN',
  'Content-Type':'application/json',
  'Accept':'application/json'
};

const inputBody = '{
  "event": "order.link.published",
  "endpoint": "http://example.com",
  "active": true
}';

fetch('https://api.bazoom.com/client-api/v1/webhooks',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

Responses

{
  "id": 1337,
  "created_at": "2026-03-10T12:10:25.000000Z",
  "updated_at": "2026-03-10T12:10:25.000000Z",
  "event": "order.link.ready_for_approval",
  "secret": "my-s3cr37",
  "endpoint": "https:example.com/webhooks/bazoom",
  "business_id": 1234,
  "user_id": 1234
}

Responses

PUT/webhooks/{webhook}
Auth required

Update a webhook

Parameters

  • Name
    webhook
    Type
    integer
    Description

    The webhook ID

  • Body

    • Name
      endpoint
      Type
      string
      Description

      The endpoint the webhook should hit. example: https://example.com

    • Name
      active
      Type
      boolean
      Description

      Whether the webhook should be active

Sample request

PUT
/webhooks/{webhook}
const headers = {
  'Authorization': 'Bearer YOUR_SECRET_TOKEN',
  'Content-Type':'application/json',
  'Accept':'application/json'
};

const inputBody = '{
  "endpoint": "http://example.com",
  "active": true
}';

fetch('https://api.bazoom.com/client-api/v1/webhooks/{webhook}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

Responses

{
  "id": 1337,
  "created_at": "2026-03-10T12:10:25.000000Z",
  "updated_at": "2026-03-10T12:10:25.000000Z",
  "event": "order.link.ready_for_approval",
  "secret": "my-s3cr37",
  "endpoint": "https:example.com/webhooks/bazoom",
  "business_id": 1234,
  "user_id": 1234
}

Responses

DELETE/webhooks/{webhook}
Auth required

Delete a webhook

Parameters

  • Name
    webhook
    Type
    integer
    Description

    The webhook ID

Sample request

DELETE
/webhooks/{webhook}
const headers = {
  'Authorization': 'Bearer YOUR_SECRET_TOKEN',
  'Accept':'application/json'
};

fetch('https://api.bazoom.com/client-api/v1/webhooks/{webhook}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

Responses

{
  "message": "string"
}

Responses

GET/webhooks/trigger/{webhook}
Auth required

Trigger webhook

This endpoint is for testing purposes only. It will trigger the webhook event for the given webhook subscription.

Parameters

  • Name
    webhook
    Type
    integer
    Description

    The webhook ID

Sample request

GET
/webhooks/trigger/{webhook}
const headers = {
  'Authorization': 'Bearer YOUR_SECRET_TOKEN',
  'Accept':'application/json'
};

fetch('https://api.bazoom.com/client-api/v1/webhooks/trigger/{webhook}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

Responses

{
  "message": "string"
}

Responses