---
title: "Add Source"
method: POST
path: "/v1/workspaces/{workspace}/streams/{stream_id}/sources"
tags: ["v1", "protected", "streams"]
---

# Add Source

`POST /v1/workspaces/{workspace}/streams/{stream_id}/sources`

## Request

- The document declares no server URL.
- Auth: HTTP bearer

Add a webhook or poll source of a catalog entry to the stream.

Credentials are write-only and held by reference; a webhook source's
response carries the public URL to give the provider.

## Path parameters

- `stream_id` string, uuid, required
- `workspace` string, required: Slug of the workspace the request acts in

## Request body

- SourceCreate: A webhook or poll source of a catalog entry on an existing stream.
  - `config` object: The type's plain settings, e.g. shop_id.
  - `credentials` object: The type's credential fields, each a value or {secret_id} of a workspace secret. Write-only: never returned.
  - `event_templates` EventOverrides: What one source may set in place of its entry's templates (a generic webhook's own key).
    - `key` union
      - string
      - string[]
    - `kind` union
      - string
      - string[]
    - `session_key` union
      - string
      - string[]
  - `kind` 'webhook' | 'poll' | 'platform'
  - `source_type` string, required: A slug of GET /streams/source-types.

## Response `201`

Successful Response

- SourceCreated
  - `created_at` string, date-time, required
  - `event_templates` object, nullable: This source's own kind / key / session_key templates.
  - `id` string, uuid, required
  - `issued` object: Credentials generated because they were left out; shown this once only.
  - `kind` string, required: webhook or poll
  - `poll_error` string, nullable
  - `polled_at` string, date-time, nullable
  - `registered` boolean: The provider was pointed at webhook_url (entries with a registration).
  - `source_type` string, nullable, required: The catalog slug of GET /streams/source-types.
  - `webhook_id` string, nullable, required
  - `webhook_url` string, nullable, required: Public URL the provider posts to; null for a poll source.

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-19** `1d8a3995ec6c`: 3 breaking, 4 warning, 9 info
  - added the new required request property `source_type`
  - removed the required property `allowed_methods` from the response with the `201` status
  - removed the required property `webhook_type` from the response with the `201` status
  - removed the request property `webhook_type`
  - …12 more
- **2026-10-08** `c5c2cdeffcbb`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentarea/apis/agentarea-api/changes/v1/workspaces/:workspace/streams/:stream_id/sources/post.md)

---

[API](https://skmtc.dev/agentarea/apis/agentarea-api.md) - [All operations](https://skmtc.dev/agentarea/apis/agentarea-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentarea/apis/agentarea-api/revisions/5b651833a114?raw)
