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: {
      "x-api-key": "text"
    },
});
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-11-21T06:36:24.224Z",
      "updatedAt": "2024-11-21T06:36:24.224Z",
      "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: {
      "x-api-key": "text",
      "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: {
      "x-api-key": "text"
    },
});
const data = await response.json();
Response
{
  "message": "text",
  "code": "BAD_REQUEST",
  "issues": [
    {
      "message": "text",
      "validation": "text",
      "code": "text",
      "location": "text",
      "path": [
        "text"
      ]
    }
  ]
}

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
uristring (uri)
eventsarray of enum
Response

200

Request
const response = await fetch('https://api-v2.zealy.io/public/communities/{subdomain}/webhooks/{webhookId}', {
    method: 'PATCH',
    headers: {
      "x-api-key": "text",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "message": "text",
  "code": "BAD_REQUEST",
  "issues": [
    {
      "message": "text",
      "validation": "text",
      "code": "text",
      "location": "text",
      "path": [
        "text"
      ]
    }
  ]
}

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_SUCCEEDEDQUEST_CLAIMEDQUEST_FAILEDQUEST_CLAIM_STATUS_UPDATEDSPRINT_STARTEDSPRINT_ENDEDUSER_BANNED
Request
const response = await fetch('https://api-v2.zealy.io/public/communities/{subdomain}/webhooks-event-types', {
    method: 'GET',
    headers: {
      "x-api-key": "text"
    },
});
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?statusFilter=success', {
    method: 'GET',
    headers: {
      "x-api-key": "text"
    },
});
const data = await response.json();
Response
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "webhookId": "123e4567-e89b-12d3-a456-426614174000",
      "status": "success",
      "createdAt": "2024-11-21T06:36:24.224Z",
      "updatedAt": "2024-11-21T06:36:24.224Z",
      "retryAt": "2024-11-21T06:36:24.224Z",
      "eventType": "text",
      "tries": 0
    }
  ],
  "page": 0
}

Last updated