staqlydocs
REST APIAPI referenceChannels

A link someone without access to Staqly opens to connect a channel to this workspace

A link someone without access to Staqly opens to connect a channel to this workspace (channels:manage)

Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.

POST
/v1/channel-links

The answer carries url and token once; the token is in the URL fragment. The page shows the workspace's name, note and the platforms in providers (empty: every platform this server can connect; your own automation is never offered). Connected channels join group_id (empty: Default). A link works for expires_in_hours (default 168, at most 720) and max_uses channels (default 1, at most 50); revoke it with DELETE. The plan's channel limit applies when someone connects.

Authorization

headerAuthorizationBearer <token>

API key (stk_...), or in the Community Edition the access token (stk_local_...)

Header Parameters

Idempotency-Key?string

Replays the stored response when the same key is repeated with the same method, path, query string and body within 24 hours (422 idempotency_mismatch with a different request, 409 idempotency_in_progress while the first one runs). Not applied to multipart uploads or to responses that carry a secret.

Lengthlength <= 200

Request Body

application/json
  1. body
note?string

Shown to the person who opens the link

Lengthlength <= 300
providers?array<string>

Platform ids to offer; empty offers every available one

group_id?string

The channel group connected channels join (empty is Default)

expires_in_hours?integer

0 is 7 days

Range0 <= value <= 720
max_uses?integer

How many channels may be connected; 0 is 1

Range0 <= value <= 50

Response Body

Created

application/json
  1. response
id*string
note*string
providers*array<string>

Empty offers every available platform

group_id*string

The channel group connected channels join (empty is Default)

max_uses*integer
uses*integer
status*string
Value in"open""used""expired""revoked"
created_by*string

Who made the link

created_at*string
Formatdate-time
expires_at*string
Formatdate-time
revoked_at?string
Formatdate-time
url?string

Only when created

token?string

Only when created

curl -X POST 'https://staqly.example.com/v1/channel-links' \  -H 'Content-Type: application/json' \  -d '{}'
{  "id": "string",  "note": "string",  "providers": [    "string"  ],  "group_id": "string",  "max_uses": 0,  "uses": 0,  "status": "open",  "created_by": "string",  "created_at": "2019-08-24T14:15:22Z",  "expires_at": "2019-08-24T14:15:22Z",  "revoked_at": "2019-08-24T14:15:22Z",  "url": "string",  "token": "string"}