---
title: "Create a source"
method: POST
path: "/workspaces/{ws_id}/sources"
tags: ["Source"]
---

# Create a source

`POST /workspaces/{ws_id}/sources`

## Request body

- Source
  - `id` string
  - `name` string, nullable
  - `enabled` boolean
  - `type` 'http'
  - `config` object, required
    - `http` HTTPSourceConfig, required
      - `path` string
      - `methods` string[]
      - `response` object, nullable
        - `code` integer, required
        - `content_type` string, required
        - `body` string
  - `async` boolean — Whether to ingest events asynchronously through the queue
  - `metadata` Metadata
  - `rate_limit` RateLimit, nullable — The rate limit that uses GCRA algorithm (a variant of the leaky bucket algorithm that supports bursts).
    - `quota` integer, required — Rate limiting quota that allowed in every period.
    - `period` integer, required — Rate limiting period in seconds.
  - `created_at` integer
  - `updated_at` integer

## Response `200`

OK

- Source
  - `id` string
  - `name` string, nullable
  - `enabled` boolean
  - `type` 'http'
  - `config` object, required
    - `http` HTTPSourceConfig, required
      - `path` string
      - `methods` string[]
      - `response` object, nullable
        - `code` integer, required
        - `content_type` string, required
        - `body` string
  - `async` boolean — Whether to ingest events asynchronously through the queue
  - `metadata` Metadata
  - `rate_limit` RateLimit, nullable — The rate limit that uses GCRA algorithm (a variant of the leaky bucket algorithm that supports bursts).
    - `quota` integer, required — Rate limiting quota that allowed in every period.
    - `period` integer, required — Rate limiting period in seconds.
  - `created_at` integer
  - `updated_at` integer

## Changes

- **2025-11-17** `3a66f430a761` — 3 breaking, 4 warning, 3 info
  - added the new required request property `config`
  - removed the required property `methods` from the response with the `200` status
  - removed the required property `path` from the response with the `200` status
  - removed the request property `methods`
  - …6 more
- **2025-09-12** `a69667e09d64` — 2 info
  - added the new optional request property `rate_limit`
  - added the optional property `rate_limit` to the response with the `200` status
- **2025-07-29** `232f34fd9749` — 7 breaking, 7 warning, 19 info
  - request property `methods/items/` was restricted to a list of enum values
  - the request property `response/code` became required
  - the request property `response/content_type` became required
  - the `methods` request property's minItems was increased to `1`
  - …29 more
- **2025-07-04** `52cf706a43db` — 2 info
  - added the new optional request property `metadata`
  - added the optional property `metadata` to the response with the `200` status
- **2024-10-06** `394b3a9521a1` — 2 info
  - added the new optional request property `async`
  - added the optional property `async` to the response with the `200` status

[Full history](https://skmtc.dev/webhookx-io/apis/webhookx-admin-api/changes/workspaces/:ws_id/sources/post.md)

---

[API](https://skmtc.dev/webhookx-io/apis/webhookx-admin-api.md) · [All operations](https://skmtc.dev/webhookx-io/apis/webhookx-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/webhookx-io/webhookx-admin-api/revisions/0afb563ce365/schema)
