---
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

## Changes

- **2025-04-10** `e2165a0513dc` — 1 info
  - endpoint added
- **2023-10-26** `1c37c167d50d` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/threefoldtech/apis/mycelium-management/changes/api/v1/messages/topics/:topic/sources/post.md)

---

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