workflows

Create Subscription

Create a Subscription: an event trigger that starts a headless Master agent turn in a fresh Chat when its source fires — e.g. a set lead time before each Google Calendar event. Use when the user wants an agent to react to something happening rather than to a clock. Provide name, source_kind, prompt, and the per-kind config; discover kinds and their config fields via subscription://kinds.

post/api/platform/v1/subscriptions

Request

  • Base URL: https://docs.amdahl.ai
  • URL: https://docs.amdahl.ai/api/platform/v1/subscriptions
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer

Request body

namestring required

Human label. Each fired Chat is named "{name} — {date}".

source_kindstring required

Which event source fires this subscription (e.g. "calendar.event_upcoming"). Read subscription://kinds for the catalog + each kind's config fields.

promptstring required

The Chat input every fire starts the Master turn with; the triggering event is appended after it automatically.

configobject

Per-kind source config, validated against the kind's schema (for calendar.event_upcoming: connection_id, lead_minutes, optional calendar_id + filters).

agentstring

Optional agent pin the Master turn runs as (library slug/uuid or workspace agent id/slug).

enabledboolean

Whether the subscription fires. Defaults to true.

Response

Created

dataunknown

Changes

No recorded changes to this operation across all 1 revision of this API.