Chief Tools Logo
Socket Chief API v1

Endpoints for the webhooks of an app. Socket Chief delivers channel, presence and client events to their URL, signed with the app secret like Pusher webhooks.


List webhooks

GET
https://socket.chief.app/api/v1
/apps/{app}/webhooks
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

List the webhooks of an app by URL.

List webhooks › path Parameters

app
​string · required

List webhooks › query Parameters

query
​string | null · maxLength: 255

Search results by name.

per_page
​integer · min: 1 · max: 100

Number of results per page.

Default: 50
page
​integer · min: 1

Page number to return.

Default: 1

List webhooks › Responses

Paginated set of Webhook

​Webhook[] · required
​object · required
​object · required

Create a webhook

POST
https://socket.chief.app/api/v1
/apps/{app}/webhooks
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Add a webhook to an app. It only receives deliveries once it has at least one event.

Create a webhook › path Parameters

app
​string · required

Create a webhook › Request Body

url
​string · uri · maxLength: 255 · required

HTTPS URL the webhook is delivered to.

Example: https://example.com/webhooks/pusher
events
​array | null · unique

Events delivered to the URL. A webhook without events receives nothing.

Enum values:
channel_occupied
channel_vacated
member_added
member_removed
client_event
Example: ["channel_occupied","channel_vacated"]
headers
​array | null · maxItems: 50

HTTP headers sent with every delivery, as an object of header names to values.

Example: {"Authorization":"Bearer my-webhook-token"}
query_params
​array | null · maxItems: 50

Query parameters added to the URL of every delivery, as an object of names to values.

Example: {"source":"socketchief"}
channel_prefixes
​array | null · maxItems: 50 · unique

Only deliver events of channels whose name starts with one of these prefixes. Empty delivers events of every channel.

Example: ["private-orders."]
channel_suffixes
​array | null · maxItems: 50 · unique

Only deliver events of channels whose name ends with one of these suffixes. Empty delivers events of every channel.

Example: [".updates"]

Create a webhook › Responses

The webhook was created.

​Webhook · required

Get a webhook

GET
https://socket.chief.app/api/v1
/apps/{app}/webhooks/{webhook}
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Get one of the webhooks of an app.

Get a webhook › path Parameters

app
​string · required
webhook
​string · required

Get a webhook › Responses

Webhook

​Webhook · required

Update a webhook

PATCH
https://socket.chief.app/api/v1
/apps/{app}/webhooks/{webhook}
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Change the URL, events, headers, query parameters or channel filters of a webhook. Fields left out keep their value, a given field replaces the current value entirely: send the complete headers object to change one header. Send null or an empty value to clear a field.

Update a webhook › path Parameters

app
​string · required
webhook
​string · required

Update a webhook › Request Body

url
​string · uri · maxLength: 255 · required

HTTPS URL the webhook is delivered to.

Example: https://example.com/webhooks/pusher
events
​array | null · unique

Events delivered to the URL. A webhook without events receives nothing.

Enum values:
channel_occupied
channel_vacated
member_added
member_removed
client_event
Example: ["channel_occupied","channel_vacated"]
headers
​array | null · maxItems: 50

HTTP headers sent with every delivery, as an object of header names to values.

Example: {"Authorization":"Bearer my-webhook-token"}
query_params
​array | null · maxItems: 50

Query parameters added to the URL of every delivery, as an object of names to values.

Example: {"source":"socketchief"}
channel_prefixes
​array | null · maxItems: 50 · unique

Only deliver events of channels whose name starts with one of these prefixes. Empty delivers events of every channel.

Example: ["private-orders."]
channel_suffixes
​array | null · maxItems: 50 · unique

Only deliver events of channels whose name ends with one of these suffixes. Empty delivers events of every channel.

Example: [".updates"]

Update a webhook › Responses

Webhook

​Webhook · required

Delete a webhook

DELETE
https://socket.chief.app/api/v1
/apps/{app}/webhooks/{webhook}
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Delete a webhook of an app, it stops receiving deliveries.

Delete a webhook › path Parameters

app
​string · required
webhook
​string · required

Delete a webhook › Responses

The webhook was deleted.

string