Skip to content

Create a channel

POST
/v1/channels
curl --request POST \
--url http://api.disclosebot.localdev:3000/v1/channels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "data": { "type": "channel", "attributes": { "name": "example", "short_description": "example", "enabled": true, "prefilter_query": { "q": { "additionalProperty": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }, "results": { "additionalProperty": { "additionalProperty": "example" } } }, "prefilter_saved_search_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "definition": { "steps": { "additionalProperty": { "kind": "triage", "needs": [ "example" ], "task": "summary", "engine": "ai", "scale": "standard", "instructions": "example", "method": "prompt", "lookback_days": 1, "public_key_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "integration": { "type": "Webhook", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }, "cloaked": "send", "only_when": { "additionalProperty": [ "example" ] } } } } } } }'

Creates the channel with its pre-filter (a saved search reference or a custom query, never both), records the definition as workflow version 1, and enables it when enabled is true.

Media type application/json
object
data
required
object
type
required
string
Allowed values: channel
attributes
required
object
name
required
string
short_description
string
enabled

Enable on create; default false

boolean
prefilter_query

A custom pre-filter; not with prefilter_saved_search_id

object
q
object
key
additional properties
One of:
string
results
object
key
additional properties
object
key
additional properties
string
prefilter_saved_search_id

A saved search the pre-filter reads live; not with prefilter_query

string format: uuid
nullable
definition

The flat workflow definition: one entry per step keyed by name

object
steps
required
object
key
additional properties

One step of a workflow definition; the fields depend on kind

object
kind
required
string
Allowed values: triage transmit
needs

Names of the steps this step runs after

Array<string>
task

Triage only

string
Allowed values: summary scope duplicate validity severity
engine

Triage only; rule is available for scope and duplicate

string
Allowed values: ai rule
scale

Triage, severity only

string
Allowed values: standard custom
instructions

Triage, severity with the custom scale

string
<= 2000 characters
method

Triage, duplicate with the ai engine

string
Allowed values: prompt embeddings
lookback_days

Triage, duplicate only

integer
>= 1 <= 365
public_key_id

Transmit only; the body is encrypted to this key before delivery, and sent as it stands without one

string format: uuid
integration

Transmit only

object
type
required
string
Allowed values: Webhook LocalApp
id
required
string format: uuid
cloaked

Transmit only; what to do with a report the reporter encrypted in the browser: send its ciphertext as it stands, or send no body

string
default: send
Allowed values: send drop
only_when

Transmit only; result key to the allowed values

object
key
additional properties
Array<string>

Referencing a saved search, with the search included

Media type application/json
object
data
required
object
id
required
string format: uuid
type
required
string
Allowed values: channel
attributes
required
object
name
required
string
short_description
string
nullable
enabled
required
boolean
enabled_at
string format: date-time
nullable
prefilter_query

The custom pre-filter; null when the pre-filter references a saved search or there is none

object
q
object
key
additional properties
One of:
string
results
object
key
additional properties
object
key
additional properties
string
prefilter_saved_search_id

The saved search the pre-filter reads; its query applies as it is now. Never set together with prefilter_query

string format: uuid
nullable
running_version_number
integer
nullable
steps_summary
Array<string>
created_at
required
string format: date-time
updated_at
required
string format: date-time
relationships
object
organization
object
workflow
object
prefilter_saved_search
object
Example
{
"data": {
"type": "channel"
}
}

Unauthorized

Channels not available for the account

Name taken