---
title: "Sink Configure"
method: POST
path: "/api/v1.msgs.sink.configure"
tags: ["Msgs"]
---

# Sink Configure

`POST /api/v1.msgs.sink.configure`

Create or update a sink for a topic. Overwrites any existing sink with the same id.

## Request body

- SinkConfigureIn
  - `namespace` string, nullable
  - `topic` string, required — The topic whose messages are forwarded to the sink. Created automatically if it does not exist.
  - `consumer_group` string, required — The consumer group that identifies the sink and tracks its progress through the topic.
  - `default_starting_position` 'earliest' | 'latest'
  - `max_in_flight` integer, nullable — At most how many concurrent requests will be sent to the Sink.
  - `config` SinkConfig, required
    - `type` 'http', required
    - `data` HttpSinkConfig, required — Configuration for an HTTP sink. The `url`, `headers`, and `body` are templates rendered per-message (see [`diom_core::template_str`]).
      - `url` string, required — Destination URL.
      - `method` 'post' | 'put' | 'patch'
      - `headers` object
      - `body` string, nullable — Templated request body. When absent, the raw message value bytes are sent unchanged.

## Response `200`

- SinkConfigureOut
  - `topic` string, required
  - `consumer_group` string, required

## Other responses

- `400`
- `401`
- `403`
- `422`

---

[API](https://skmtc.net/svix/apis/diom-api.md) · [All operations](https://skmtc.net/svix/apis/diom-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/svix/diom-api/versions/e98d7f3a3e10/schema)
