---
title: "Create Subscription"
method: POST
path: "/api/platform/v1/subscriptions"
tags: ["workflows"]
---

# Create Subscription

`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

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.

## Request body

- object
  - `name` string, required: Human label. Each fired Chat is named "{name} — {date}".
  - `source_kind` string, required: Which event source fires this subscription (e.g. "calendar.event_upcoming"). Read subscription://kinds for the catalog + each kind's config fields.
  - `prompt` string, required: The Chat input every fire starts the Master turn with; the triggering event is appended after it automatically.
  - `config` object: Per-kind source config, validated against the kind's schema (for calendar.event_upcoming: connection_id, lead_minutes, optional calendar_id + filters).
  - `agent` string: Optional agent pin the Master turn runs as (library slug/uuid or workspace agent id/slug).
  - `run_config` object: Per-fire Chat config. on_question is always none (headless); every knob defaults conservative (standard depth, no market fan-out).
    - `depth` 'quick' | 'standard' | 'deep': Investigation depth per fire. Defaults to standard (a fire is a reaction).
    - `actions_allowed` string[]: Outbound actions each fired run may invoke. Absent = ALL cataloged actions (default ON); pass a list to narrow, [] to disable.
    - `external_search` boolean: Allow market fan-outs (external_search.execute in the kit). Default false.
    - `include_divergence` boolean: Fuse the divergence map on external_search.execute (else evidence-only). Default false.
  - `enabled` boolean: Whether the subscription fires. Defaults to true.

## Response `201`

Created

- object
  - `data` unknown

## Other responses

- `400`: Invalid input - failed schema validation
- `401`: Authentication required
- `403`: Forbidden - missing scope or role
- `500`: Internal server error

---

[API](https://skmtc.dev/amdahl/apis/amdahl-platform-api.md) · [All operations](https://skmtc.dev/amdahl/apis/amdahl-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/amdahl/apis/amdahl-platform-api/revisions/d4eee33e2472?raw)
