> ## Documentation Index
> Fetch the complete documentation index at: https://sequinstream.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create sink consumer

Creates a new sink consumer.

## Request fields

<ParamField body="name" type="string" required>
  The name of the sink consumer
</ParamField>

<ParamField body="status" type="string" required>
  The initial status of the sink consumer (active, disabled, paused)
</ParamField>

<ParamField body="source" type="object" required>
  The source configuration for the sink consumer

  <Expandable title="source properties">
    <ParamField body="include_schemas" type="array">
      List of schemas to include, or null to include all
    </ParamField>

    <ParamField body="exclude_schemas" type="array">
      List of schemas to exclude, or null to exclude none
    </ParamField>

    <ParamField body="include_tables" type="array">
      List of tables to include, or null to include all

      A table name can be specified with schema (e.g. `my-schema.my-table`) or without (e.g. `my-table`) which defaults to schema `public`.
    </ParamField>

    <ParamField body="exclude_tables" type="array">
      List of tables to exclude, or null to exclude none

      A table name can be specified with schema (e.g. `my-schema.my-table`) or without (e.g. `my-table`) which defaults to schema `public`.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="tables" type="array">
  Additional configuration for individual tables.

  To configure which tables are consumed, see the `source` field.

  <Expandable title="tables properties">
    <ParamField body="name" type="string" required>
      The name of the table.

      A table name can be specified with schema (e.g. `my-schema.my-table`) or without (e.g. `my-table`) which defaults to schema `public`.
    </ParamField>

    <ParamField body="group_column_names" type="array">
      The column names to group by or `null` to disable grouping
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="actions" type="array" required>
  The database actions to include in the sink (insert, update, delete)
</ParamField>

<ParamField body="destination" type="object" required>
  The destination configuration for the sink consumer. The shape varies by destination type.

  <Expandable title="Kafka">
    <ParamField body="type" type="string" required>
      Must be "kafka"
    </ParamField>

    <ParamField body="hosts" type="string" required>
      Comma-separated list of Kafka hosts
    </ParamField>

    <ParamField body="tls" type="boolean">
      Whether to use TLS
    </ParamField>

    <ParamField body="topic" type="string" required>
      Kafka topic name
    </ParamField>

    <ParamField body="username" type="string">
      Optional username for authentication
    </ParamField>

    <ParamField body="password" type="string">
      Optional password for authentication
    </ParamField>

    <ParamField body="sasl_mechanism" type="string">
      Optional SASL mechanism (PLAIN, SCRAM-SHA-256, SCRAM-SHA-512, AWS\_MSK\_IAM)
    </ParamField>

    <ParamField body="aws_region" type="string">
      AWS region (required for AWS\_MSK\_IAM)
    </ParamField>

    <ParamField body="aws_access_key_id" type="string">
      AWS access key ID (required for AWS\_MSK\_IAM)
    </ParamField>

    <ParamField body="aws_secret_access_key" type="string">
      AWS secret access key (required for AWS\_MSK\_IAM)
    </ParamField>
  </Expandable>

  <Expandable title="SQS">
    <ParamField body="type" type="string" required>
      Must be "sqs"
    </ParamField>

    <ParamField body="queue_url" type="string" required>
      SQS queue URL
    </ParamField>

    <ParamField body="region" type="string" required>
      AWS region
    </ParamField>

    <ParamField body="access_key_id" type="string" required>
      AWS access key ID
    </ParamField>

    <ParamField body="secret_access_key" type="string" required>
      AWS secret access key
    </ParamField>

    <ParamField body="is_fifo" type="boolean">
      Whether the queue is a FIFO queue
    </ParamField>
  </Expandable>

  <Expandable title="Kinesis">
    <ParamField body="type" type="string" required>
      Must be "kinesis"
    </ParamField>

    <ParamField body="stream_arn" type="string" required>
      Kinesis stream ARN
    </ParamField>

    <ParamField body="access_key_id" type="string" required>
      AWS access key ID
    </ParamField>

    <ParamField body="secret_access_key" type="string" required>
      AWS secret access key
    </ParamField>
  </Expandable>

  <Expandable title="RabbitMQ">
    <ParamField body="type" type="string" required>
      Must be "rabbitmq"
    </ParamField>

    <ParamField body="host" type="string" required>
      RabbitMQ host
    </ParamField>

    <ParamField body="port" type="integer" required>
      RabbitMQ port
    </ParamField>

    <ParamField body="username" type="string" required>
      Username for authentication
    </ParamField>

    <ParamField body="password" type="string" required>
      Password for authentication
    </ParamField>

    <ParamField body="virtual_host" type="string" required>
      Virtual host name (default: "/")
    </ParamField>

    <ParamField body="tls" type="boolean">
      Whether to use TLS
    </ParamField>

    <ParamField body="exchange" type="string" required>
      Exchange name
    </ParamField>
  </Expandable>

  <Expandable title="Redis Stream">
    <ParamField body="type" type="string" required>
      Must be "redis\_stream"
    </ParamField>

    <ParamField body="host" type="string" required>
      Redis host
    </ParamField>

    <ParamField body="port" type="integer" required>
      Redis port
    </ParamField>

    <ParamField body="stream_key" type="string" required>
      Redis stream key
    </ParamField>

    <ParamField body="database" type="integer">
      Redis database number (default: 0)
    </ParamField>

    <ParamField body="tls" type="boolean">
      Whether to use TLS
    </ParamField>

    <ParamField body="username" type="string">
      Optional username for authentication
    </ParamField>

    <ParamField body="password" type="string">
      Optional password for authentication
    </ParamField>
  </Expandable>

  <Expandable title="Redis String">
    <ParamField body="type" type="string" required>
      Must be "redis\_string"
    </ParamField>

    <ParamField body="host" type="string" required>
      Redis host
    </ParamField>

    <ParamField body="port" type="integer" required>
      Redis port
    </ParamField>

    <ParamField body="database" type="integer">
      Redis database number (default: 0)
    </ParamField>

    <ParamField body="tls" type="boolean">
      Whether to use TLS
    </ParamField>

    <ParamField body="username" type="string">
      Optional username for authentication
    </ParamField>

    <ParamField body="password" type="string">
      Optional password for authentication
    </ParamField>

    <ParamField body="expire_ms" type="integer">
      Optional TTL in milliseconds for the keys
    </ParamField>

    <ParamField body="mode" type="string">
      Mode of operation (static or dynamic, default: static)
    </ParamField>
  </Expandable>

  <Expandable title="Azure Event Hub">
    <ParamField body="type" type="string" required>
      Must be "azure\_event\_hub"
    </ParamField>

    <ParamField body="namespace" type="string" required>
      Event Hub namespace
    </ParamField>

    <ParamField body="event_hub_name" type="string" required>
      Event Hub name
    </ParamField>

    <ParamField body="shared_access_key_name" type="string" required>
      Shared access key name
    </ParamField>

    <ParamField body="shared_access_key" type="string" required>
      Shared access key
    </ParamField>
  </Expandable>

  <Expandable title="NATS">
    <ParamField body="type" type="string" required>
      Must be "nats"
    </ParamField>

    <ParamField body="host" type="string" required>
      NATS host
    </ParamField>

    <ParamField body="port" type="integer" required>
      NATS port
    </ParamField>

    <ParamField body="username" type="string">
      Optional username for authentication
    </ParamField>

    <ParamField body="password" type="string">
      Optional password for authentication
    </ParamField>

    <ParamField body="jwt" type="string">
      Optional JWT for authentication
    </ParamField>

    <ParamField body="nkey_seed" type="string">
      Optional NKey seed for authentication
    </ParamField>

    <ParamField body="tls" type="boolean">
      Whether to use TLS
    </ParamField>
  </Expandable>

  <Expandable title="GCP PubSub">
    <ParamField body="type" type="string" required>
      Must be "gcp\_pubsub"
    </ParamField>

    <ParamField body="project_id" type="string" required>
      GCP project ID
    </ParamField>

    <ParamField body="topic_id" type="string" required>
      PubSub topic ID
    </ParamField>

    <ParamField body="credentials" type="string" required>
      Base64-encoded credentials
    </ParamField>

    <ParamField body="use_emulator" type="boolean">
      Whether to use the emulator
    </ParamField>

    <ParamField body="emulator_base_url" type="string">
      Emulator base URL if using emulator
    </ParamField>
  </Expandable>

  <Expandable title="Elasticsearch">
    <ParamField body="type" type="string" required>
      Must be "elasticsearch"
    </ParamField>

    <ParamField body="endpoint_url" type="string" required>
      Elasticsearch endpoint URL
    </ParamField>

    <ParamField body="index_name" type="string" required>
      Elasticsearch index name
    </ParamField>

    <ParamField body="auth_type" type="string" required>
      Authentication type (api\_key, basic, bearer)
    </ParamField>

    <ParamField body="auth_value" type="string" required>
      Authentication value, either an API key or a base64-encoded string of a username and password
    </ParamField>

    <ParamField body="batch_size" type="integer">
      Number of documents to batch together (default: 100)
    </ParamField>
  </Expandable>

  <Expandable title="Meilisearch">
    <ParamField body="type" type="string" required>
      Must be "meilisearch"
    </ParamField>

    <ParamField body="endpoint_url" type="string" required>
      Meilisearch endpoint URL
    </ParamField>

    <ParamField body="index_name" type="string" required>
      Meilisearch index name
    </ParamField>

    <ParamField body="primary_key" type="string">
      Primary key field name (default: "id")
    </ParamField>

    <ParamField body="api_key" type="string" required>
      Meilisearch API key
    </ParamField>

    <ParamField body="batch_size" type="integer">
      Number of documents to batch together (default: 100)
    </ParamField>

    <ParamField body="timeout_seconds" type="integer">
      Request timeout in seconds (default: 5)
    </ParamField>
  </Expandable>

  <Expandable title="S2">
    <ParamField body="type" type="string" required>
      Must be "s2"
    </ParamField>

    <ParamField body="basin" type="string" required>
      The name of the S2 basin
    </ParamField>

    <ParamField body="stream" type="string" required>
      The name of the S2 stream
    </ParamField>

    <ParamField body="access_token" type="string" required>
      The access token for the S2 account associated with the basin and stream
    </ParamField>
  </Expandable>

  <Expandable title="Sequin Stream">
    <ParamField body="type" type="string" required>
      Must be "sequin\_stream"
    </ParamField>
  </Expandable>

  <Expandable title="SNS">
    <ParamField body="type" type="string" required>
      Must be "sns"
    </ParamField>

    <ParamField body="topic_arn" type="string" required>
      SNS topic ARN
    </ParamField>

    <ParamField body="region" type="string" required>
      AWS region
    </ParamField>

    <ParamField body="access_key_id" type="string" required>
      AWS access key ID
    </ParamField>

    <ParamField body="secret_access_key" type="string" required>
      AWS secret access key
    </ParamField>

    <ParamField body="is_fifo" type="boolean">
      Whether the topic is a FIFO topic
    </ParamField>
  </Expandable>

  <Expandable title="Typesense">
    <ParamField body="type" type="string" required>
      Must be "typesense"
    </ParamField>

    <ParamField body="endpoint_url" type="string" required>
      Typesense endpoint URL
    </ParamField>

    <ParamField body="collection_name" type="string" required>
      Typesense collection name
    </ParamField>

    <ParamField body="api_key" type="string" required>
      Typesense API key
    </ParamField>

    <ParamField body="batch_size" type="integer">
      Number of documents to batch together (default: 100)
    </ParamField>

    <ParamField body="timeout_seconds" type="integer">
      Request timeout in seconds (default: 5)
    </ParamField>
  </Expandable>

  <Expandable title="Webhook">
    <ParamField body="type" type="string" required>
      Must be "webhook"
    </ParamField>

    <ParamField body="http_endpoint" type="string" required>
      HTTP endpoint name
    </ParamField>

    <ParamField body="http_endpoint_path" type="string" required>
      HTTP endpoint path
    </ParamField>

    <ParamField body="batch" type="boolean">
      Whether the webhook body [should be wrapped in a list](/reference/sinks/webhooks#request-format) to support batching. Defaults to `true`.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="database" type="string" required>
  The source database for the sink consumer
</ParamField>

<ParamField body="enrichment" type="string">
  The [enrichment function](/reference/enrichment) for the sink consumer
</ParamField>

<ParamField body="filter" type="string">
  The [filter function](/reference/filters) for the sink consumer
</ParamField>

<ParamField body="transform" type="string">
  The [transform function](/reference/transforms) for the sink consumer
</ParamField>

<ParamField body="routing" type="string">
  The [routing function](/reference/routing) for the sink consumer
</ParamField>

<ParamField body="message_grouping" type="boolean">
  Whether message grouping is enabled for ordering purposes. When `true` (default), messages are grouped by primary key. When `false`, grouping is disabled for higher throughput batching.
</ParamField>

<ParamField body="batch_size" type="integer">
  Number of records to batch together (1-1000)
</ParamField>

<ParamField body="max_retry_count" type="integer">
  The maximum number of times a message will be retried if delivery fails. Once this limit is reached, the message will be discarded.
  Defaults to `null`, meaning messages are retried indefinitely.
</ParamField>

<ParamField body="load_shedding_policy" type="string">
  Determines how Sequin handles overload when sink consumers can't keep up with incoming messages.
  Options are:

  * `pause_on_full` (default) — pauses replication until the buffer has room again
  * `discard_on_full` — drops messages for overloaded consumers to avoid pausing replication

  For more details, see [load shedding policy](/reference/sinks/overview#load_shedding_policy).
</ParamField>

<ParamField body="timestamp_format" type="string">
  The format of the timestamp in the source data.
  Possible values include `iso8601` and `unix_microsecond`.
</ParamField>

<ParamField body="annotations" type="object">
  Additional metadata you can attach to this sink consumer. Annotations can be any JSON object.
</ParamField>

## Response fields

<ResponseField name="id" type="string">
  The unique identifier of the sink consumer
</ResponseField>

<ResponseField name="name" type="string">
  The name of the sink consumer
</ResponseField>

<ResponseField name="status" type="string">
  The current status of the sink consumer (active, disabled, paused)
</ResponseField>

<ResponseField name="database" type="string">
  The source database for the sink consumer
</ResponseField>

<ResponseField name="source" type="object">
  The source configuration for the sink consumer. This determines which tables are consumed.

  <Expandable title="source properties">
    <ResponseField name="include_schemas" type="array">
      List of schemas to include, or null to include all
    </ResponseField>

    <ResponseField name="exclude_schemas" type="array">
      List of schemas to exclude, or null to exclude none
    </ResponseField>

    <ResponseField name="include_tables" type="array">
      List of tables to include, or null to include all

      A table name can be specified with schema (e.g. `my-schema.my-table`) or without (e.g. `my-table`) which defaults to schema `public`.
    </ResponseField>

    <ResponseField name="exclude_tables" type="array">
      List of tables to exclude, or null to exclude none

      A table name can be specified with schema (e.g. `my-schema.my-table`) or without (e.g. `my-table`) which defaults to schema `public`.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="tables" type="array">
  Additional configuration for individual tables.

  To configure which tables are consumed, see the `source` field.

  <Expandable title="tables properties">
    <ResponseField name="name" type="string">
      The name of the table.

      A table name can be specified with schema (e.g. `my-schema.my-table`) or without (e.g. `my-table`) which defaults to schema `public`.
    </ResponseField>

    <ResponseField name="group_column_names" type="array">
      The column names to group by or `null` to disable grouping
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="actions" type="array">
  The database actions to include in the sink (insert, update, delete)
</ResponseField>

<ResponseField name="destination" type="object">
  The destination configuration for the sink consumer. The shape varies by destination type.

  <Expandable title="destination properties" anyOf={true}>
    <Expandable title="Azure Event Hub properties">
      <ResponseField name="type" type="string">
        Must be "azure\_event\_hub"
      </ResponseField>

      <ResponseField name="namespace" type="string">
        Event Hub namespace
      </ResponseField>

      <ResponseField name="event_hub_name" type="string">
        Event Hub name
      </ResponseField>

      <ResponseField name="shared_access_key_name" type="string">
        Shared access key name
      </ResponseField>

      <ResponseField name="shared_access_key" type="string">
        Shared access key
      </ResponseField>
    </Expandable>

    <Expandable title="Elasticsearch properties">
      <ResponseField name="type" type="string">
        Must be "elasticsearch"
      </ResponseField>

      <ResponseField name="endpoint_url" type="string">
        Elasticsearch endpoint URL
      </ResponseField>

      <ResponseField name="index_name" type="string">
        Elasticsearch index name
      </ResponseField>

      <ResponseField name="auth_type" type="string">
        Authentication type (api\_key, basic, bearer)
      </ResponseField>

      <ResponseField name="auth_value" type="string">
        Authentication value
      </ResponseField>

      <ResponseField name="batch_size" type="integer">
        Number of documents to batch together (default: 100)
      </ResponseField>
    </Expandable>

    <Expandable title="GCP PubSub properties">
      <ResponseField name="type" type="string">
        Must be "gcp\_pubsub"
      </ResponseField>

      <ResponseField name="project_id" type="string">
        GCP project ID
      </ResponseField>

      <ResponseField name="topic_id" type="string">
        PubSub topic ID
      </ResponseField>

      <ResponseField name="credentials" type="string">
        Base64-encoded credentials
      </ResponseField>

      <ResponseField name="use_emulator" type="boolean">
        Whether to use the emulator
      </ResponseField>

      <ResponseField name="emulator_base_url" type="string">
        Emulator base URL if using emulator
      </ResponseField>
    </Expandable>

    <Expandable title="Webhook properties">
      <ResponseField name="type" type="string">
        Must be "webhook"
      </ResponseField>

      <ResponseField name="http_endpoint" type="string">
        HTTP endpoint name
      </ResponseField>

      <ResponseField name="http_endpoint_path" type="string">
        HTTP endpoint path
      </ResponseField>

      <ResponseField name="batch" type="boolean">
        Whether the webhook body [should be wrapped in a list](/reference/sinks/webhooks#request-format) to support batching.
      </ResponseField>
    </Expandable>

    <Expandable title="Kafka properties">
      <ResponseField name="type" type="string">
        Must be "kafka"
      </ResponseField>

      <ResponseField name="hosts" type="string">
        Comma-separated list of Kafka hosts
      </ResponseField>

      <ResponseField name="tls" type="boolean">
        Whether to use TLS
      </ResponseField>

      <ResponseField name="topic" type="string">
        Kafka topic name
      </ResponseField>

      <ResponseField name="username" type="string">
        Optional username for authentication
      </ResponseField>

      <ResponseField name="password" type="string">
        Optional password for authentication
      </ResponseField>

      <ResponseField name="sasl_mechanism" type="string">
        Optional SASL mechanism (plain, scram\_sha\_256, scram\_sha\_512, aws\_msk\_iam)
      </ResponseField>

      <ResponseField name="aws_region" type="string">
        AWS region (required for aws\_msk\_iam)
      </ResponseField>

      <ResponseField name="aws_access_key_id" type="string">
        AWS access key ID (required for aws\_msk\_iam)
      </ResponseField>

      <ResponseField name="aws_secret_access_key" type="string">
        AWS secret access key (required for aws\_msk\_iam)
      </ResponseField>
    </Expandable>

    <Expandable title="Kinesis properties">
      <ResponseField name="type" type="string">
        Must be "kinesis"
      </ResponseField>

      <ResponseField name="stream_arn" type="string">
        Kinesis stream ARN
      </ResponseField>

      <ResponseField name="access_key_id" type="string">
        AWS access key ID
      </ResponseField>

      <ResponseField name="secret_access_key" type="string">
        AWS secret access key
      </ResponseField>
    </Expandable>

    <Expandable title="Meilisearch properties">
      <ResponseField name="type" type="string">
        Must be "meilisearch"
      </ResponseField>

      <ResponseField name="endpoint_url" type="string">
        Meilisearch endpoint URL
      </ResponseField>

      <ResponseField name="index_name" type="string">
        Meilisearch index name
      </ResponseField>

      <ResponseField name="primary_key" type="string">
        Primary key field name (default: "id")
      </ResponseField>

      <ResponseField name="api_key" type="string">
        Meilisearch API key
      </ResponseField>

      <ResponseField name="batch_size" type="integer">
        Number of documents to batch together (default: 100)
      </ResponseField>

      <ResponseField name="timeout_seconds" type="integer">
        Request timeout in seconds (default: 5)
      </ResponseField>
    </Expandable>

    <Expandable title="NATS properties">
      <ResponseField name="type" type="string">
        Must be "nats"
      </ResponseField>

      <ResponseField name="host" type="string">
        NATS host
      </ResponseField>

      <ResponseField name="port" type="integer">
        NATS port
      </ResponseField>

      <ResponseField name="username" type="string">
        Optional username for authentication
      </ResponseField>

      <ResponseField name="password" type="string">
        Optional password for authentication
      </ResponseField>

      <ResponseField name="jwt" type="string">
        Optional JWT for authentication
      </ResponseField>

      <ResponseField name="nkey_seed" type="string">
        Optional NKey seed for authentication
      </ResponseField>

      <ResponseField name="tls" type="boolean">
        Whether to use TLS
      </ResponseField>
    </Expandable>

    <Expandable title="RabbitMQ properties">
      <ResponseField name="type" type="string">
        Must be "rabbitmq"
      </ResponseField>

      <ResponseField name="host" type="string">
        RabbitMQ host
      </ResponseField>

      <ResponseField name="port" type="integer">
        RabbitMQ port
      </ResponseField>

      <ResponseField name="username" type="string">
        Username for authentication
      </ResponseField>

      <ResponseField name="password" type="string">
        Password for authentication
      </ResponseField>

      <ResponseField name="virtual_host" type="string">
        Virtual host name (default: "/")
      </ResponseField>

      <ResponseField name="tls" type="boolean">
        Whether to use TLS
      </ResponseField>

      <ResponseField name="exchange" type="string">
        Exchange name
      </ResponseField>
    </Expandable>

    <Expandable title="Redis Stream properties">
      <ResponseField name="type" type="string">
        Must be "redis\_stream"
      </ResponseField>

      <ResponseField name="host" type="string">
        Redis host
      </ResponseField>

      <ResponseField name="port" type="integer">
        Redis port
      </ResponseField>

      <ResponseField name="stream_key" type="string">
        Redis stream key
      </ResponseField>

      <ResponseField name="database" type="integer">
        Redis database number (default: 0)
      </ResponseField>

      <ResponseField name="tls" type="boolean">
        Whether to use TLS
      </ResponseField>

      <ResponseField name="username" type="string">
        Optional username for authentication
      </ResponseField>

      <ResponseField name="password" type="string">
        Optional password for authentication
      </ResponseField>
    </Expandable>

    <Expandable title="Redis String properties">
      <ResponseField name="type" type="string">
        Must be "redis\_string"
      </ResponseField>

      <ResponseField name="host" type="string">
        Redis host
      </ResponseField>

      <ResponseField name="port" type="integer">
        Redis port
      </ResponseField>

      <ResponseField name="database" type="integer">
        Redis database number (default: 0)
      </ResponseField>

      <ResponseField name="tls" type="boolean">
        Whether to use TLS
      </ResponseField>

      <ResponseField name="username" type="string">
        Optional username for authentication
      </ResponseField>

      <ResponseField name="password" type="string">
        Optional password for authentication
      </ResponseField>

      <ResponseField name="expire_ms" type="integer">
        Optional TTL in milliseconds for the keys
      </ResponseField>

      <ResponseField name="mode" type="string">
        Mode of operation (static or dynamic, default: static)
      </ResponseField>
    </Expandable>

    <Expandable title="S2 properties">
      <ResponseField name="type" type="string">
        Must be "s2"
      </ResponseField>

      <ResponseField name="basin" type="string">
        The name of the S2 basin
      </ResponseField>

      <ResponseField name="stream" type="string">
        The name of the S2 stream
      </ResponseField>

      <ResponseField name="access_token" type="string">
        The access token for the S2 account associated with the basin and stream
      </ResponseField>
    </Expandable>

    <Expandable title="Sequin Stream properties">
      <ResponseField name="type" type="string">
        Must be "sequin\_stream"
      </ResponseField>
    </Expandable>

    <Expandable title="SNS properties">
      <ResponseField name="type" type="string">
        Must be "sns"
      </ResponseField>

      <ResponseField name="topic_arn" type="string">
        SNS topic ARN
      </ResponseField>

      <ResponseField name="region" type="string">
        AWS region
      </ResponseField>

      <ResponseField name="access_key_id" type="string">
        AWS access key ID
      </ResponseField>

      <ResponseField name="secret_access_key" type="string">
        AWS secret access key
      </ResponseField>

      <ResponseField name="is_fifo" type="boolean">
        Whether the topic is a FIFO topic
      </ResponseField>
    </Expandable>

    <Expandable title="SQS properties">
      <ResponseField name="type" type="string">
        Must be "sqs"
      </ResponseField>

      <ResponseField name="queue_url" type="string">
        SQS queue URL
      </ResponseField>

      <ResponseField name="region" type="string">
        AWS region
      </ResponseField>

      <ResponseField name="access_key_id" type="string">
        AWS access key ID
      </ResponseField>

      <ResponseField name="secret_access_key" type="string">
        AWS secret access key
      </ResponseField>

      <ResponseField name="is_fifo" type="boolean">
        Whether the queue is a FIFO queue
      </ResponseField>
    </Expandable>

    <Expandable title="Typesense properties">
      <ResponseField name="type" type="string">
        Must be "typesense"
      </ResponseField>

      <ResponseField name="endpoint_url" type="string">
        Typesense endpoint URL
      </ResponseField>

      <ResponseField name="collection_name" type="string">
        Typesense collection name
      </ResponseField>

      <ResponseField name="api_key" type="string">
        Typesense API key
      </ResponseField>

      <ResponseField name="batch_size" type="integer">
        Number of documents to batch together (default: 100)
      </ResponseField>

      <ResponseField name="timeout_seconds" type="integer">
        Request timeout in seconds (default: 5)
      </ResponseField>
    </Expandable>
  </Expandable>
</ResponseField>

<ResponseField name="filter" type="string">
  The [filter function](/reference/filters) for the sink consumer
</ResponseField>

<ResponseField name="transform" type="string">
  The [transform function](/reference/transforms) for the sink consumer
</ResponseField>

<ResponseField name="routing" type="string">
  The [routing function](/reference/routing) for the sink consumer
</ResponseField>

<ResponseField name="enrichment" type="string">
  The [enrichment function](/reference/enrichment) for the sink consumer
</ResponseField>

<ResponseField name="message_grouping" type="boolean">
  Whether message grouping is enabled for delivery ordering

  See [message grouping and ordering](/reference/sinks/overview#message-grouping-and-ordering) for more details.
</ResponseField>

<ResponseField name="max_retry_count" type="integer">
  The maximum number of times a message will be retried if delivery fails
</ResponseField>

<ResponseField name="annotations" type="object">
  User-defined annotations for the sink consumer
</ResponseField>

<ResponseField name="active_backfills" type="array">
  Array of active backfill IDs
</ResponseField>

<ResponseField name="batch_size" type="integer">
  Number of records to batch together (1-1000)
</ResponseField>

<ResponseField name="load_shedding_policy" type="string">
  Determines how Sequin handles overload when sink consumers can't keep up with incoming messages
</ResponseField>

<ResponseField name="timestamp_format" type="string">
  The format of the timestamp in the source data
</ResponseField>

<ResponseField name="health" type="object">
  Health status information for the sink consumer

  <Expandable title="health properties">
    <ResponseField name="name" type="string">
      Name of the health check
    </ResponseField>

    <ResponseField name="status" type="string">
      Overall health status
    </ResponseField>

    <ResponseField name="checks" type="array">
      Array of individual health checks
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.sequinstream.com/api/sinks" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "kafka-ids",
      "status": "active",
      "source": {
        "include_schemas": null,
        "exclude_schemas": null,
        "include_tables": null,
        "exclude_tables": null
      },
      "actions": ["insert", "update", "delete"],
      "destination": {
        "type": "kafka",
        "hosts": "localhost:9092",
        "tls": false,
        "topic": "records"
      },
      "database": "dune",
      "filter": "",
      "transform": "id-transform",
      "routing": "",
      "message_grouping": true,
      "batch_size": 100,
      "max_retry_count": null,
      "load_shedding_policy": "pause_on_full",
      "timestamp_format": "iso8601",
      "annotations": {}
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Kafka theme={null}
  {
    "id": "4ed2a8e5-47a7-4b51-9270-d2f4fdcb94fb",
    "name": "my-kafka-sink",
    "status": "active",
    "database": "my-database",
    "source": {
      "include_schemas": null,
      "exclude_schemas": null,
      "include_tables": null,
      "exclude_tables": null
    },
    "tables": [
      {
        "name": "public.products",
        "group_column_names": ["category"]
      }
    ],
    "actions": ["insert", "update", "delete"],
    "destination": {
      "type": "kafka",
      "hosts": "localhost:9092",
      "tls": false,
      "topic": "records",
      "username": "kafka_user",
      "password": "kafka_password",
      "sasl_mechanism": "PLAIN"
    },
    "filter": "none",
    "transform": "id-transform",
    "routing": "none",
    "message_grouping": true,
    "max_retry_count": null,
    "annotations": {},
    "active_backfills": [],
    "batch_size": 50,
    "load_shedding_policy": "pause_on_full",
    "timestamp_format": "iso8601",
    "health": {
      "name": "Consumer health",
      "status": "healthy",
      "checks": [
        {
          "name": "Sink configuration",
          "status": "healthy"
        },
        ...
      ]
    }
  }
  ```

  ```json SQS theme={null}
  {
    "id": "4ed2a8e5-47a7-4b51-9270-d2f4fdcb94fb",
    "name": "my-sqs-sink",
    "status": "active",
    "database": "my-database",
    "source": {
      "include_schemas": null,
      "exclude_schemas": null,
      "include_tables": null,
      "exclude_tables": null
    },
    "tables": [
      {
        "name": "public.products",
        "group_column_names": ["category"]
      }
    ],
    "actions": ["insert", "update", "delete"],
    "destination": {
      "type": "sqs",
      "queue_url": "https://sqs.us-east-1.amazonaws.com/123456789012/MyQueue",
      "region": "us-east-1",
      "access_key_id": "AKIAIOSFODNN7EXAMPLE",
      "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
    },
    "filter": "none",
    "transform": "id-transform",
    "routing": "none",
    "message_grouping": true,
    "max_retry_count": null,
    "annotations": {},
    "active_backfills": [],
    "batch_size": 50,
    "load_shedding_policy": "pause_on_full",
    "timestamp_format": "iso8601",
    "health": {
      "name": "Consumer health",
      "status": "healthy",
      "checks": [
        {
          "name": "Sink configuration",
          "status": "healthy"
        },
        ...
      ]
    }
  }
  ```

  ```json RabbitMQ theme={null}
  {
    "id": "4ed2a8e5-47a7-4b51-9270-d2f4fdcb94fb",
    "name": "my-rabbitmq-sink",
    "status": "active",
    "database": "my-database",
    "source": {
      "include_schemas": null,
      "exclude_schemas": null,
      "include_tables": null,
      "exclude_tables": null
    },
    "tables": [
      {
        "name": "public.products",
        "group_column_names": ["category"]
      }
    ],
    "actions": ["insert", "update", "delete"],
    "destination": {
      "type": "rabbitmq",
      "host": "localhost",
      "port": 5672,
      "username": "guest",
      "password": "guest",
      "virtual_host": "/",
      "tls": false,
      "exchange": "records"
    },
    "filter": "none",
    "transform": "id-transform",
    "routing": "none",
    "message_grouping": true,
    "max_retry_count": null,
    "annotations": {},
    "active_backfills": [],
    "batch_size": 50,
    "load_shedding_policy": "pause_on_full",
    "timestamp_format": "iso8601",
    "health": {
      "name": "Consumer health",
      "status": "healthy",
      "checks": [
        {
          "name": "Sink configuration",
          "status": "healthy"
        },
        ...
      ]
    }
  }
  ```

  ```json Redis theme={null}
  {
    "id": "4ed2a8e5-47a7-4b51-9270-d2f4fdcb94fb",
    "name": "my-redis-sink",
    "status": "active",
    "database": "my-database",
    "source": {
      "include_schemas": null,
      "exclude_schemas": null,
      "include_tables": null,
      "exclude_tables": null
    },
    "tables": [
      {
        "name": "public.products",
        "group_column_names": ["category"]
      }
    ],
    "actions": ["insert", "update", "delete"],
    "destination": {
      "type": "redis_stream",
      "host": "localhost",
      "port": 6379,
      "stream_key": "records",
      "database": 0,
      "tls": false,
      "username": "redis_user",
      "password": "redis_password"
    },
    "filter": "none",
    "transform": "id-transform",
    "routing": "none",
    "message_grouping": true,
    "max_retry_count": null,
    "annotations": {},
    "active_backfills": [],
    "batch_size": 50,
    "load_shedding_policy": "pause_on_full",
    "timestamp_format": "iso8601",
    "health": {
      "name": "Consumer health",
      "status": "healthy",
      "checks": [
        {
          "name": "Sink configuration",
          "status": "healthy"
        },
        ...
      ]
    }
  }
  ```

  ```json Azure Event Hub theme={null}
  {
    "id": "4ed2a8e5-47a7-4b51-9270-d2f4fdcb94fb",
    "name": "my-azure-event-hub-sink",
    "status": "active",
    "database": "my-database",
    "source": {
      "include_schemas": null,
      "exclude_schemas": null,
      "include_tables": null,
      "exclude_tables": null
    },
    "tables": [
      {
        "name": "public.products",
        "group_column_names": ["category"]
      }
    ],
    "actions": ["insert", "update", "delete"],
    "destination": {
      "type": "azure_event_hub",
      "namespace": "my-namespace",
      "event_hub_name": "records",
      "shared_access_key_name": "RootManageSharedAccessKey",
      "shared_access_key": "your-shared-access-key"
    },
    "filter": "none",
    "transform": "id-transform",
    "routing": "none",
    "message_grouping": true,
    "max_retry_count": null,
    "annotations": {},
    "active_backfills": [],
    "batch_size": 50,
    "load_shedding_policy": "pause_on_full",
    "timestamp_format": "iso8601",
    "health": {
      "name": "Consumer health",
      "status": "healthy",
      "checks": [
        {
          "name": "Sink configuration",
          "status": "healthy"
        },
        ...
      ]
    }
  }
  ```

  ```json NATS theme={null}
  {
    "id": "4ed2a8e5-47a7-4b51-9270-d2f4fdcb94fb",
    "name": "my-nats-sink",
    "status": "active",
    "database": "my-database",
    "source": {
      "include_schemas": null,
      "exclude_schemas": null,
      "include_tables": null,
      "exclude_tables": null
    },
    "tables": [
      {
        "name": "public.products",
        "group_column_names": ["category"]
      }
    ],
    "actions": ["insert", "update", "delete"],
    "destination": {
      "type": "nats",
      "host": "localhost",
      "port": 4222,
      "username": "nats_user",
      "password": "nats_password",
      "jwt": "your-jwt-token",
      "nkey_seed": "your-nkey-seed",
      "tls": false
    },
    "filter": "none",
    "transform": "id-transform",
    "routing": "none",
    "message_grouping": true,
    "max_retry_count": null,
    "annotations": {},
    "active_backfills": [],
    "batch_size": 50,
    "load_shedding_policy": "pause_on_full",
    "timestamp_format": "iso8601",
    "health": {
      "name": "Consumer health",
      "status": "healthy",
      "checks": [
        {
          "name": "Sink configuration",
          "status": "healthy"
        },
        ...
      ]
    }
  }
  ```

  ```json GCP PubSub theme={null}
  {
    "id": "4ed2a8e5-47a7-4b51-9270-d2f4fdcb94fb",
    "name": "my-gcp-pubsub-sink",
    "status": "active",
    "database": "my-database",
    "source": {
      "include_schemas": null,
      "exclude_schemas": null,
      "include_tables": null,
      "exclude_tables": null
    },
    "tables": [
      {
        "name": "public.products",
        "group_column_names": ["category"]
      }
    ],
    "actions": ["insert", "update", "delete"],
    "destination": {
      "type": "gcp_pubsub",
      "project_id": "my-project",
      "topic_id": "records",
      "credentials": "base64-encoded-credentials",
      "use_emulator": false,
      "emulator_base_url": "http://localhost:8085"
    },
    "filter": "none",
    "transform": "id-transform",
    "routing": "none",
    "message_grouping": true,
    "max_retry_count": null,
    "annotations": {},
    "active_backfills": [],
    "batch_size": 50,
    "load_shedding_policy": "pause_on_full",
    "timestamp_format": "iso8601",
    "health": {
      "name": "Consumer health",
      "status": "healthy",
      "checks": [
        {
          "name": "Sink configuration",
          "status": "healthy"
        },
        ...
      ]
    }
  }
  ```

  ```json S2 theme={null}
  {
    "id": "4ed2a8e5-47a7-4b51-9270-d2f4fdcb94fb",
    "name": "my-s2-sink",
    "status": "active",
    "database": "my-database",
    "source": {
      "include_schemas": null,
      "exclude_schemas": null,
      "include_tables": null,
      "exclude_tables": null
    },
    "tables": [
      {
        "name": "public.products",
        "group_column_names": ["category"]
      }
    ],
    "actions": ["insert", "update", "delete"],
    "destination": {
      "type": "s2",
      "basin": "my-basin",
      "stream": "my-stream",
      "access_token": "my-access-token"
    },
    "filter": "none",
    "transform": "id-transform",
    "routing": "none",
    "message_grouping": true,
    "max_retry_count": null,
    "annotations": {},
    "active_backfills": [],
    "batch_size": 50,
    "load_shedding_policy": "pause_on_full",
    "timestamp_format": "iso8601",
    "health": {
      "name": "Consumer health",
      "status": "healthy",
      "checks": [
        {
          "name": "Sink configuration",
          "status": "healthy"
        },
        ...
      ]
    }
  }
  ```

  ```json Sequin Stream theme={null}
  {
    "id": "4ed2a8e5-47a7-4b51-9270-d2f4fdcb94fb",
    "name": "my-sequin-stream-sink",
    "status": "active",
    "database": "my-database",
    "source": {
      "include_schemas": null,
      "exclude_schemas": null,
      "include_tables": null,
      "exclude_tables": null
    },
    "tables": [
      {
        "name": "public.products",
        "group_column_names": ["category"]
      }
    ],
    "actions": ["insert", "update", "delete"],
    "destination": {
      "type": "sequin_stream"
    },
    "filter": "none",
    "transform": "id-transform",
    "routing": "none",
    "message_grouping": true,
    "max_retry_count": null,
    "annotations": {},
    "active_backfills": [],
    "batch_size": 50,
    "load_shedding_policy": "pause_on_full",
    "timestamp_format": "iso8601",
    "health": {
      "name": "Consumer health",
      "status": "healthy",
      "checks": [
        {
          "name": "Sink configuration",
          "status": "healthy"
        },
        ...
      ]
    }
  }
  ```

  ```json Webhook theme={null}
  {
    "id": "4ed2a8e5-47a7-4b51-9270-d2f4fdcb94fb",
    "name": "my-webhook-sink",
    "status": "active",
    "database": "my-database",
    "source": {
      "include_schemas": null,
      "exclude_schemas": null,
      "include_tables": null,
      "exclude_tables": null
    },
    "tables": [
      {
        "name": "public.products",
        "group_column_names": ["category"]
      }
    ],
    "actions": ["insert", "update", "delete"],
    "destination": {
      "type": "webhook",
      "http_endpoint": "my-endpoint",
      "http_endpoint_path": "/webhook",
      "batch": true
    },
    "filter": "none",
    "transform": "id-transform",
    "routing": "none",
    "message_grouping": true,
    "max_retry_count": null,
    "annotations": {},
    "active_backfills": [],
    "batch_size": 50,
    "load_shedding_policy": "pause_on_full",
    "timestamp_format": "iso8601",
    "health": {
      "name": "Consumer health",
      "status": "healthy",
      "checks": [
        {
          "name": "Sink configuration",
          "status": "healthy"
        },
        ...
      ]
    }
  }
  ```

  ```json Elasticsearch theme={null}
  {
    "id": "4ed2a8e5-47a7-4b51-9270-d2f4fdcb94fb",
    "name": "my-elasticsearch-sink",
    "status": "active",
    "database": "my-database",
    "source": {
      "include_schemas": null,
      "exclude_schemas": null,
      "include_tables": null,
      "exclude_tables": null
    },
    "tables": [
      {
        "name": "public.products",
        "group_column_names": ["category"]
      }
    ],
    "actions": ["insert", "update", "delete"],
    "destination": {
      "type": "elasticsearch",
      "endpoint_url": "http://localhost:9200",
      "index_name": "records",
      "auth_type": "basic",
      "auth_value": "base64-encoded-credentials",
      "batch_size": 100
    },
    "filter": "none",
    "transform": "id-transform",
    "routing": "none",
    "message_grouping": true,
    "max_retry_count": null,
    "annotations": {},
    "active_backfills": [],
    "batch_size": 50,
    "load_shedding_policy": "pause_on_full",
    "timestamp_format": "iso8601",
    "health": {
      "name": "Consumer health",
      "status": "healthy",
      "checks": [
        {
          "name": "Sink configuration",
          "status": "healthy"
        },
        ...
      ]
    }
  }
  ```

  ```json Kinesis theme={null}
  {
    "id": "4ed2a8e5-47a7-4b51-9270-d2f4fdcb94fb",
    "name": "my-kinesis-sink",
    "status": "active",
    "database": "my-database",
    "source": {
      "include_schemas": null,
      "exclude_schemas": null,
      "include_tables": null,
      "exclude_tables": null
    },
    "tables": [
      {
        "name": "public.products",
        "group_column_names": ["category"]
      }
    ],
    "actions": ["insert", "update", "delete"],
    "destination": {
      "type": "kinesis",
      "stream_arn": "arn:aws:kinesis:us-east-1:123456789012:stream/my-stream",
      "access_key_id": "AKIAIOSFODNN7EXAMPLE",
      "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
    },
    "filter": "none",
    "transform": "id-transform",
    "routing": "none",
    "message_grouping": true,
    "max_retry_count": null,
    "annotations": {},
    "active_backfills": [],
    "batch_size": 50,
    "load_shedding_policy": "pause_on_full",
    "timestamp_format": "iso8601",
    "health": {
      "name": "Consumer health",
      "status": "healthy",
      "checks": [
        {
          "name": "Sink configuration",
          "status": "healthy"
        },
        ...
      ]
    }
  }
  ```

  ```json Meilisearch theme={null}
  {
    "id": "4ed2a8e5-47a7-4b51-9270-d2f4fdcb94fb",
    "name": "my-meilisearch-sink",
    "status": "active",
    "database": "my-database",
    "source": {
      "include_schemas": null,
      "exclude_schemas": null,
      "include_tables": null,
      "exclude_tables": null
    },
    "tables": [
      {
        "name": "public.products",
        "group_column_names": ["category"]
      }
    ],
    "actions": ["insert", "update", "delete"],
    "destination": {
      "type": "meilisearch",
      "endpoint_url": "http://localhost:7700",
      "index_name": "records",
      "primary_key": "id",
      "api_key": "your-api-key",
      "batch_size": 100,
      "timeout_seconds": 5
    },
    "filter": "none",
    "transform": "id-transform",
    "routing": "none",
    "message_grouping": true,
    "max_retry_count": null,
    "annotations": {},
    "active_backfills": [],
    "batch_size": 50,
    "load_shedding_policy": "pause_on_full",
    "timestamp_format": "iso8601",
    "health": {
      "name": "Consumer health",
      "status": "healthy",
      "checks": [
        {
          "name": "Sink configuration",
          "status": "healthy"
        },
        ...
      ]
    }
  }
  ```

  ```json Redis String theme={null}
  {
    "id": "4ed2a8e5-47a7-4b51-9270-d2f4fdcb94fb",
    "name": "my-redis-string-sink",
    "status": "active",
    "database": "my-database",
    "source": {
      "include_schemas": null,
      "exclude_schemas": null,
      "include_tables": null,
      "exclude_tables": null
    },
    "tables": [
      {
        "name": "public.products",
        "group_column_names": ["category"]
      }
    ],
    "actions": ["insert", "update", "delete"],
    "destination": {
      "type": "redis_string",
      "host": "localhost",
      "port": 6379,
      "database": 0,
      "tls": false,
      "username": "redis_user",
      "password": "redis_password",
      "expire_ms": 3600000,
      "mode": "static"
    },
    "filter": "none",
    "transform": "id-transform",
    "routing": "none",
    "message_grouping": true,
    "max_retry_count": null,
    "annotations": {},
    "active_backfills": [],
    "batch_size": 50,
    "load_shedding_policy": "pause_on_full",
    "timestamp_format": "iso8601",
    "health": {
      "name": "Consumer health",
      "status": "healthy",
      "checks": [
        {
          "name": "Sink configuration",
          "status": "healthy"
        },
        ...
      ]
    }
  }
  ```

  ```json SNS theme={null}
  {
    "id": "4ed2a8e5-47a7-4b51-9270-d2f4fdcb94fb",
    "name": "my-sns-sink",
    "status": "active",
    "database": "my-database",
    "source": {
      "include_schemas": null,
      "exclude_schemas": null,
      "include_tables": null,
      "exclude_tables": null
    },
    "tables": [
      {
        "name": "public.products",
        "group_column_names": ["category"]
      }
    ],
    "actions": ["insert", "update", "delete"],
    "destination": {
      "type": "sns",
      "topic_arn": "arn:aws:sns:us-east-1:123456789012:MyTopic",
      "region": "us-east-1",
      "access_key_id": "AKIAIOSFODNN7EXAMPLE",
      "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
      "is_fifo": false
    },
    "filter": "none",
    "transform": "id-transform",
    "routing": "none",
    "message_grouping": true,
    "max_retry_count": null,
    "annotations": {},
    "active_backfills": [],
    "batch_size": 50,
    "load_shedding_policy": "pause_on_full",
    "timestamp_format": "iso8601",
    "health": {
      "name": "Consumer health",
      "status": "healthy",
      "checks": [
        {
          "name": "Sink configuration",
          "status": "healthy"
        },
        ...
      ]
    }
  }
  ```

  ```json Typesense theme={null}
  {
    "id": "4ed2a8e5-47a7-4b51-9270-d2f4fdcb94fb",
    "name": "my-typesense-sink",
    "status": "active",
    "database": "my-database",
    "source": {
      "include_schemas": null,
      "exclude_schemas": null,
      "include_tables": null,
      "exclude_tables": null
    },
    "tables": [
      {
        "name": "public.products",
        "group_column_names": ["category"]
      }
    ],
    "actions": ["insert", "update", "delete"],
    "destination": {
      "type": "typesense",
      "endpoint_url": "http://localhost:8108",
      "collection_name": "records",
      "api_key": "your-api-key",
      "batch_size": 100,
      "timeout_seconds": 5
    },
    "filter": "none",
    "transform": "id-transform",
    "routing": "none",
    "message_grouping": true,
    "max_retry_count": null,
    "annotations": {},
    "active_backfills": [],
    "batch_size": 50,
    "load_shedding_policy": "pause_on_full",
    "timestamp_format": "iso8601",
    "health": {
      "name": "Consumer health",
      "status": "healthy",
      "checks": [
        {
          "name": "Sink configuration",
          "status": "healthy"
        },
        ...
      ]
    }
  }
  ```
</ResponseExample>
