Webhooks

Overview

This set of endpoints allows you to do all kinds of operations on your community webhooks. Learn more about how webhooks work and which events are available on our product documentation.

API Reference

List all webhooks of your community

GEThttps://api-v2.zealy.io/public/communities/{subdomain}/webhooks
Path parameters
subdomain*string
Header parameters
Response

200

Body
items*array of object
Request
const response = await fetch('https://api-v2.zealy.io/public/communities/{subdomain}/webhooks', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "uri": "https://example.com",
      "communityId": "123e4567-e89b-12d3-a456-426614174000",
      "createdAt": "2024-05-02T07:42:02.654Z",
      "updatedAt": "2024-05-02T07:42:02.654Z",
      "active": false,
      "secret": "text",
      "events": [
        "JOINED_COMMUNITY"
      ],
      "success": 0,
      "failed": 0,
      "exhausted": 0
    }
  ]
}

Create a new webhook

POSThttps://api-v2.zealy.io/public/communities/{subdomain}/webhooks
Path parameters
subdomain*string
Header parameters
Body

Body

name*string
uri*string (uri)
active*boolean
events*array of enum
Response

200

Body
id*string (uuid)
Request
const response = await fetch('https://api-v2.zealy.io/public/communities/{subdomain}/webhooks', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "text",
      "uri": "https://example.com",
      "active": false,
      "events": [
        "JOINED_COMMUNITY"
      ]
    }),
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000"
}

Delete a webhook

DELETEhttps://api-v2.zealy.io/public/communities/{subdomain}/webhooks/{webhookId}
Path parameters
webhookId*string (uuid)
subdomain*string
Header parameters
Response

200

Request
const response = await fetch('https://api-v2.zealy.io/public/communities/{subdomain}/webhooks/{webhookId}', {
    method: 'DELETE',
    headers: {},
});
const data = await response.json();

Update a webhook

PATCHhttps://api-v2.zealy.io/public/communities/{subdomain}/webhooks/{webhookId}
Path parameters
webhookId*string (uuid)
subdomain*string
Header parameters
Body

Body

namestring
activeboolean
eventsarray of enum
Response

200

Request
const response = await fetch('https://api-v2.zealy.io/public/communities/{subdomain}/webhooks/{webhookId}', {
    method: 'PATCH',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();

List available event types a webhook can subscribe to

GEThttps://api-v2.zealy.io/public/communities/{subdomain}/webhooks-event-types
Path parameters
subdomain*string
Header parameters
Response

200

Body
itemsenum
JOINED_COMMUNITYLEFT_COMMUNITYQUEST_SUCCEEDEDSPRINT_STARTEDSPRINT_ENDED
Request
const response = await fetch('https://api-v2.zealy.io/public/communities/{subdomain}/webhooks-event-types', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  "JOINED_COMMUNITY"
]

List events a webhook is subscribed to

GEThttps://api-v2.zealy.io/public/communities/{subdomain}/webhooks/{webhookId}/events
Path parameters
subdomain*string
webhookId*string (uuid)
Query parameters
Header parameters
Response

200

Body
items*array of object
page*number
Request
const response = await fetch('https://api-v2.zealy.io/public/communities/{subdomain}/webhooks/{webhookId}/events', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "webhookId": "123e4567-e89b-12d3-a456-426614174000",
      "status": "success",
      "createdAt": "2024-05-02T07:42:02.654Z",
      "updatedAt": "2024-05-02T07:42:02.654Z",
      "retryAt": "2024-05-02T07:42:02.654Z",
      "eventType": "text",
      "tries": 0
    }
  ],
  "page": 0
}

Last updated