---
title: "Add a source to a topic"
method: POST
path: "/api/v1/messages/topics/{topic}/sources"
tags: ["Message", "Topic"]
---

# Add a source to a topic

`POST /api/v1/messages/topics/{topic}/sources`

Add a source (subnet) that is allowed to send messages for a specific topic.

## Path parameters

- `topic` string, byte, required

## Request body

- TopicSourceRequest — Request to add a source to a topic whitelist
  - `subnet` string — The subnet to add as a source in CIDR notation

## Response `204`

Source added successfully

## Other responses

- `400` — Invalid topic format or subnet

---

[API](https://skmtc.net/threefoldtech/apis/mycelium-management.md) · [All operations](https://skmtc.net/threefoldtech/apis/mycelium-management/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/threefoldtech/mycelium-management/versions/65042c1a7b84/schema)
