Chief Tools Logo
Socket Chief API v1

Endpoints for the apps of the team. Each app has its own credentials that Pusher compatible clients and server libraries connect with.


List apps

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

List the team's apps by name.

List apps › 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 apps › Responses

Paginated set of App

​App[] · required
​object · required
​object · required

Create an app

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

Create an app with its own credentials. The response includes the credentials, which can be read again with the credentials endpoint.

Create an app › Request Body

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.

Create an app › Responses

The app was created.

​App · required

Get an app

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

Get one of the team's apps. The secret is not included, read it with the credentials endpoint.

Get an app › path Parameters

app
​string · required

Get an app › Responses

App

​App · required

Update an app

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

Rename an app or change the channel types and client events it allows. Fields left out keep their value.

Update an app › path Parameters

app
​string · required

Update an app › Request Body

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.

Update an app › Responses

App

​App · required

Delete an app

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

Delete an app with its webhooks and usage history. Its credentials stop working and its webhooks stop receiving deliveries. This cannot be undone.

Delete an app › path Parameters

app
​string · required

Delete an app › Responses

The app was deleted.

string

Get the app credentials

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

Get the app ID, key and secret with the host and port to connect to. The secret signs server API requests and channel authorizations, so this requires the apps write scope.

Get the app credentials › path Parameters

app
​string · required

Get the app credentials › Responses

AppCredentials

​AppCredentials · required

List live channels

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

List the channels of the app that have subscribers right now, with their subscription and presence user counts. The WebSocket server is asked at most every few seconds, pass fresh to skip the cached snapshot. When the server cannot be reached the status is unavailable and the channel list is empty.

List live channels › path Parameters

app
​string · required

List live channels › query Parameters

query
​string | null · maxLength: 255

Only return channels whose name contains this text, case-insensitive.

type
​

Only return channels of this type, or with this cache or encrypted modifier.

fresh
​boolean

Read the channels from the WebSocket server instead of the snapshot cached for a few seconds.

List live channels › Responses

AppChannels

​AppChannels · required