Skip to main content
POST
/
v1
/
event-sources
/
{sourceID}
/
subscribe
Subscribe to an event source
curl --request POST \
  --url https://api.strait.dev/v1/event-sources/{sourceID}/subscribe \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "target_id": "<string>",
  "target_type": "<string>",
  "enabled": true,
  "filter_expr": "<unknown>"
}
'
{
  "created_at": "2023-11-07T05:31:56Z",
  "enabled": true,
  "id": "<string>",
  "source_id": "<string>",
  "target_id": "<string>",
  "target_type": "<string>",
  "$schema": "<string>",
  "filter_expr": "<unknown>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.strait.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key passed as Bearer token

Path Parameters

sourceID
string
required

Body

application/json
target_id
string
required
target_type
string
required
enabled
boolean
filter_expr
any

Response

OK

created_at
string<date-time>
required
enabled
boolean
required
id
string
required
source_id
string
required
target_id
string
required
target_type
string
required
$schema
string<uri>
read-only

A URL to the JSON Schema for this object.

Example:

"https://api.strait.dev/schemas/EventSubscription.json"

filter_expr
any