Skip to main content
POST
Add Source

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

stream_id
string<uuid>
required
workspace
string
required

Slug of the workspace the request acts in

Maximum string length: 120
Pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$

Body

application/json

A webhook or poll source of a catalog entry on an existing stream.

source_type
string
required

A slug of GET /streams/source-types.

Required string length: 1 - 50
config
Config · object

The type's plain settings, e.g. shop_id.

credentials
Credentials · object

The type's credential fields, each a value or {secret_id} of a workspace secret. Write-only: never returned.

event_templates
EventOverrides · object | null

This source's own kind, key and session_key templates ({body:a.b}, {header:x}, {first_key:a|b}), in place of the type's. Without a key nothing is deduplicated.

kind
enum<string>
default:webhook

webhook: the provider posts to the source's URL; poll: the platform fetches.

Available options:
webhook,
poll,
platform
senders
Senders · object | null

Who may write, for a type that admits senders (Telegram): owner, the one adding it (the default); members, linked people who may run the agent; ids, these account ids. Other types take none.

Response

Successful Response

created_at
string<date-time>
required
id
string<uuid>
required
kind
string
required

webhook or poll

source_type
string | null
required

The catalog slug of GET /streams/source-types.

webhook_id
string | null
required
webhook_url
string | null
required

Public URL the provider posts to; null for a poll source.

event_templates
Event Templates · object | null

This source's own kind / key / session_key templates.

issued
Issued · object

Credentials generated because they were left out; shown this once only.

poll_error
string | null
polled_at
string<date-time> | null
registered
boolean
default:false

The provider was pointed at webhook_url (entries with a registration).

senders
Senders · object | null

Who may write, on a type that admits senders; null there means members (added before it could be chosen), and null on every other type.

senders_set_by
string | null

The user who chose senders: 'owner' admits them, listed senders run as them.

stopped_at
string<date-time> | null

When removing the member who added it stopped it: it polls no more and refuses webhooks.