staqlydocs
REST APIAPI referenceChannels

Connect a channel on a token platform, or your own automation

Connect a channel on a token platform, or your own automation (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/channels

fields carries the provider's credential_fields (a bot token, an instance URL...); the platform is asked for the account's profile before the channel is saved, and the credentials are stored sealed. Provider custom (your own automation) takes no fields. OAuth platforms connect through GET /v1/channels/oauth/{provider}/start instead (422 here).

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
provider*string

Provider id from GET /v1/providers (custom, telegram, bluesky, ...)

name?string

What to call the channel; defaults to the account's name

Lengthlength <= 100
fields?

The provider's credential_fields by key (token platforms)

settings?
group_id?string

Channel group to put it in (grp_...); default: the Default group

Response Body

Connected

application/json
  1. response

A connected account. Credentials are stored sealed and never returned.

id*string
provider*string

Provider id (see GET /v1/providers)

name*string
handle*string

The account's handle on the platform (@name, a channel id)

avatar_url*string
profile_url*string
status*ChannelStatus

connected (works), needs_reconnect (the platform refused the credentials), disabled (turned off; targets on it fail without trying)

Value in"connected""needs_reconnect""disabled"
settings*

Provider-level defaults for new targets, and links (one of the provider's limits.link_modes) to choose what the channel does with links

links*LinksMode

What this channel does with the links in a post's text: settings.links, else the provider's limits.links

Value in"keep""remove""defang"
group_id*string

The channel group it belongs to (every channel is in exactly one; the Default group unless moved)

last_error*string
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
activity?

Read from the channel's targets. Only GET /v1/channels and GET /v1/channels/{id} include it (not webhook payloads).

curl -X POST 'https://staqly.example.com/v1/channels' \  -H 'Content-Type: application/json' \  -d '{}'
{  "id": "string",  "provider": "string",  "name": "string",  "handle": "string",  "avatar_url": "string",  "profile_url": "string",  "status": "connected",  "settings": {},  "links": "keep",  "group_id": "string",  "last_error": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "activity": {    "last_published_at": "2019-08-24T14:15:22Z",    "last_post_id": "string",    "next_publish_at": "2019-08-24T14:15:22Z",    "published_30d": 0  }}