---
title: "Set a Discord channel-to-project mapping"
method: PUT
path: "/integrations/connections/{connectionId}/discord-channel-project-mappings/{discordChannelId}"
tags: ["Integrations"]
---

# Set a Discord channel-to-project mapping

`PUT /integrations/connections/{connectionId}/discord-channel-project-mappings/{discordChannelId}`

## Request

- Base URL: `https://api.sazabi.com/v1`
- URL: `https://api.sazabi.com/v1/integrations/connections/{connectionId}/discord-channel-project-mappings/{discordChannelId}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/sazabi/apis/sazabi-public-api/docs/integrations/connections/:connectionId/discord-channel-project-mappings/:discordChannelId/put.ts> (a function with typed inputs; its response is checked against the schema)

Create or replace one Discord channel's mapping. Idempotent on (connection, channel). New conversations in the channel and its threads then run in the project; existing conversations keep theirs.

## Path parameters

- `connectionId` string, uuid, required: Discord bot integration connection ID (the `integration_connections.id`).
- `discordChannelId` string, required: Discord channel ID. Must be a text or announcement channel the Sazabi bot can see in the connection's server; a thread uses its channel's mapping.

## Request body

- object
  - `organizationId` string: Organization the connection belongs to. Auto-filled from CLI and SDK context when omitted.
  - `projectId` string, uuid, required: Project the channel's conversations run in. Must belong to the organization.

## Response `200`

OK

- object
  - `connectionId` string, uuid, required
  - `discordGuildId` string, required: The Discord server (guild) the channel belongs to.
  - `discordChannelId` string, required: Discord channel ID (a snowflake, e.g. 1234567890123456789).
  - `discordChannelName` string, required: The channel's name, as Discord named it when the mapping was set.
  - `projectId` string, uuid, required

## Changes

- **2026-11-06** `33821f7c6f4a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/sazabi/apis/sazabi-public-api/changes/integrations/connections/:connectionId/discord-channel-project-mappings/:discordChannelId/put.md)

---

[API](https://skmtc.dev/sazabi/apis/sazabi-public-api.md) - [All operations](https://skmtc.dev/sazabi/apis/sazabi-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sazabi/apis/sazabi-public-api/revisions/964dca95e3fe?raw)
