Slack API · error code

Slack error name_taken: Channel name already in use

Permanent - do not retryHTTP 200Channels, membership & DMs

Last verified against Slack API reference - chat.postMessage errors

What Slack returns
A channel cannot be created with the given name.

What error name_taken means

conversations.create refused the name you asked for. The error table phrases it as "A channel cannot be created with the given name," and the method's own example labels the response as the "Typical error response when name already in use." In practice: a channel with that name already exists.

The existing channel might be one you cannot see. A private channel, or an archived one, still holds its name, so conversations.list from your bot may not show the conflict. That is why apps that create per-ticket or per-incident channels with names like inc-checkout often work in testing and then collide in production.

This is different from the name-format errors on the same method, such as invalid_name_specials and invalid_name_maxlength. Per the docs, channel names "may only contain lowercase letters, numbers, hyphens, and underscores, and must be 80 characters or less." A valid but taken name lands here.

What it looks like

POST /api/conversations.create
{"name": "inc-checkout"}

{"ok": false, "error": "name_taken"}

Why it happens

  • A channel with the same name already exists, possibly private or archived.
  • A retry after a timeout, when the first create actually succeeded.
  • Deterministic naming (inc-, ticket-) reused across incidents or environments.
  • Two workers racing to create the same channel.

How to fix Slack error name_taken

  1. 1Add a unique suffix (date, short ID or counter) to generated names and retry on name_taken.
  2. 2Store the channel ID returned by a successful create, and look it up before creating again.
  3. 3Where you control the old channel, check whether it is archived and unarchive it instead of creating a new one.
  4. 4Serialize channel creation for the same key so two workers cannot race.

How to stop it recurring

Generate channel names with a unique component from the start, keep 80 characters as the hard limit, and persist the returned channel ID as the source of truth. Make the create step idempotent so retries look up the stored ID rather than calling create again.

Official reference: Slack API reference - chat.postMessage errors. See all Slack error codes or the Slack limits and quotas.

Related codes

Error name_taken - quick answers

What does Slack error name_taken mean?

conversations.create refused the name you asked for. The error table phrases it as "A channel cannot be created with the given name," and the method's own example labels the response as the "Typical error response when name already in use." In practice: a channel with that name already exists. The existing channel might be one you cannot see.

How do I fix Slack error name_taken?

1. Add a unique suffix (date, short ID or counter) to generated names and retry on name_taken. 2. Store the channel ID returned by a successful create, and look it up before creating again. 3. Where you control the old channel, check whether it is archived and unarchive it instead of creating a new one. 4. Serialize channel creation for the same key so two workers cannot race.

Should I retry after error name_taken?

No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.

Stop debugging Slack by hand

Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.