---
title: "POST /consumers/{groupid}/instances/{name}/subscription"
method: POST
path: "/consumers/{groupid}/instances/{name}/subscription"
tags: ["Consumers"]
---

# POST /consumers/{groupid}/instances/{name}/subscription

`POST /consumers/{groupid}/instances/{name}/subscription`

Subscribes a consumer to one or more topics. You can describe the topics to which the consumer will subscribe in a list (of `Topics` type) or as a `topic_pattern` field. Each call replaces the subscriptions for the subscriber.

## Response `204`

Consumer subscribed successfully.

## Other responses

- `404` — The specified consumer instance was not found.
- `409` — Subscriptions to topics, partitions, and patterns are mutually exclusive.
- `422` — A list (of `Topics` type) or a `topic_pattern` must be specified.

## Changes

- **2019-06-11** `a660d0be34bf` — 1 info
  - added the new optional request property `topic_pattern`
- **2019-05-30** `ae19f4429857` — 1 info
  - added the non-success response with the status `422`
- **2019-05-27** `574cafef42d9` — 2 breaking, 4 info
  - added required request body
  - removed the success response with the status `200`
  - api tag `Consumers` added
  - added the non-success response with the status `404`
  - …2 more
- **2019-05-21** `c10758b73ea6` — 2 breaking, 2 warning, 5 info
  - removed the request body
  - removed the success response with the status `204`
  - deleted the `path` request parameter `groupid`
  - deleted the `path` request parameter `name`
  - …5 more

[Change history](https://skmtc.dev/strimzi/apis/http-bridge-api-reference/changes/consumers/:groupid/instances/:name/subscription/post.md)

---

[API](https://skmtc.dev/strimzi/apis/http-bridge-api-reference.md) · [All operations](https://skmtc.dev/strimzi/apis/http-bridge-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/strimzi/http-bridge-api-reference/revisions/fbc1a0d00670/schema)
