Chief Tools Logo
Socket Chief API v1

App

id
​string · required

App ID, which is also the app key Pusher clients connect with.

Example: 9d8f6a52-3c1e-4b7a-9f2d-5e6c7b8a9d0e
name
​string · required
channel_types
​ChannelType[] · required

Channel types clients may subscribe to.

Enum values:
public
private
presence
cache
encrypted
client_events
​boolean · required

Whether clients may publish client events on private and presence channels.

created_at
​string | null · required
updated_at
​string | null · required
webhooks_count
​integer

Number of webhooks of the app.

​object

The credentials of the app, only included in the response that created it. Use the credentials endpoint to read them again.

AppChannels

app_id
​string · required

ID of the app.

Example: 9d8f6a52-3c1e-4b7a-9f2d-5e6c7b8a9d0e
status
​string · enum · required

available when the WebSocket server answered, unavailable when it could not be reached and error says why.

Enum values:
available
unavailable
error
​string | null · required

The reason the channels are unavailable, null when they are available.

refreshed_at
​string · required

When the WebSocket server was asked for the channels.

​object · required

Totals over every occupied channel of the app, regardless of the filters.

​array · required

The occupied channels, sorted by name.

AppCredentials

app_id
​string · required

App ID for server libraries.

Example: 9d8f6a52-3c1e-4b7a-9f2d-5e6c7b8a9d0e
key
​string · required

App key that clients and server libraries connect with, the same value as the app ID.

Example: 9d8f6a52-3c1e-4b7a-9f2d-5e6c7b8a9d0e
secret
​string · required

App secret that server libraries sign API requests and channel authorizations with. Keep it on the server, never ship it to clients.

host
​string · required

Host to connect to: the wsHost of clients and the host of server libraries.

Example: socket.chieftools.cloud
port
​integer · required

Port to connect to, always with TLS (forceTLS or https).

Example: 443

ChannelType

string · enum
Enum values:
public
private
presence
cache
encrypted

SaveAppRequest

name
​string · maxLength: 255 · required

Display name of the app.

Example: Production
channel_types
​ChannelType[] · unique

Channel types clients may subscribe to. New apps allow private and presence channels when left out.

Enum values:
public
private
presence
cache
encrypted
Example: ["private","presence"]
client_events
​boolean

Whether clients may publish client events on private and presence channels. New apps do not allow them when left out.

SaveWebhookRequest

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"]

Team

slug
​string · required

Team slug, the value of the X-Chief-Team header.

Example: acme
name
​string · required
​object · required

The plan limits of the team. A null limit is unlimited.

UsageHistory

interval
​string · enum · required

The length of each period.

Enum values:
day
hour
​array · required

One entry per period, oldest first.

UsageSummary

from
​string · required

First day of the period, the totals run until now.

connected_now
​integer | null · required

Connections of all apps right now, null when the WebSocket server cannot be reached.

peak_connections
​integer · required

Highest concurrent connections of the team in the period, the sum of the hourly app peaks.

last_recorded_at
​string | null · required

Start of the most recent minute with recorded usage, null when no usage was recorded yet.

​object · required

Totals of all apps in the period.

​array · required

Usage per app in the period, the apps with the most delivered messages first.

Webhook

id
​string · required

Webhook ID.

Example: 01jbqv2k8m4n6p8r0t2v4x6z8a
app_id
​string · required

ID of the app the webhook belongs to.

Example: 9d8f6a52-3c1e-4b7a-9f2d-5e6c7b8a9d0e
url
​string · required
enabled
​boolean · required

Whether the webhook has events and receives deliveries.

events
​WebhookEvent[] · required

Events delivered to the URL.

Enum values:
channel_occupied
channel_vacated
member_added
member_removed
client_event
​object · required

HTTP headers sent with every delivery.

​object · required

Query parameters added to the URL of every delivery.

channel_prefixes
​string[] · required

Only events of channels whose name starts with one of these prefixes are delivered, empty for every channel.

channel_suffixes
​string[] · required

Only events of channels whose name ends with one of these suffixes are delivered, empty for every channel.

created_at
​string · required
updated_at
​string · required

WebhookEvent

string · enum
Enum values:
channel_occupied
channel_vacated
member_added
member_removed
client_event