Discord error 220002: Forum webhooks cannot have both thread_name and thread_id
Last verified against Discord Developer Docs - Opcodes and status codes
Webhooks posted to forum channels cannot have both a thread_name and thread_idWhat error 220002 means
Your forum webhook request included both thread_name (create a new post) and thread_id (post into an existing one). Those are two different actions, and Discord will not guess which you meant.
The pattern that triggers it is an integration that always sets thread_name from a template and later adds thread_id for follow-up messages without removing the name. The first message of a conversation creates a post; every later message should only carry the thread_id.
When neither field is present you get 220001 instead.
Adding ?wait=true to the execute URL makes Discord return the created message, whose channel_id is the new post's thread ID. Save that value and you have everything needed for follow-up messages without ever sending thread_name again.
What it looks like
{
"message": "Webhooks posted to forum channels cannot have both a thread_name and thread_id",
"code": 220002
}Why it happens
- Integration always sends thread_name, even for follow-ups with thread_id
- Template fills thread_name by default
- Two config sources (one for new posts, one for replies) applied at once
- Retry of a failed first message adding thread_id while keeping thread_name
How to fix Discord error 220002
- 1Remove thread_name from requests that include thread_id
- 2Only send thread_name for the first message of a new post
- 3Store the thread ID returned by the first execution (use ?wait=true) and use it for later messages
- 4Retry and confirm the follow-up lands in the existing post
- 5Log the outgoing body and query string to confirm only one of the two fields is present
How to stop it recurring
Model the forum post as state in your integration: no thread yet means send thread_name with ?wait=true and save the returned channel_id; thread exists means send only thread_id. That removes both 220001 and 220002 by design. Unit-test both branches of that logic.
Official reference: Discord Developer Docs - Opcodes and status codes. See all Discord error codes or the Discord limits and quotas.
Related codes
- 220001: Forum webhooks need thread_name or thread_idWebhooks posted to forum channels must have a thread_name or thread_id
- 220003: Webhooks can only create threads in forum channelsWebhooks can only create threads in forum channels
- 40067: A tag is required to create a forum postA tag is required to create a forum post in this channel
- 10015: Unknown webhookUnknown webhook
Error 220002 - quick answers
What does Discord error 220002 mean?
Your forum webhook request included both thread_name (create a new post) and thread_id (post into an existing one). Those are two different actions, and Discord will not guess which you meant. The pattern that triggers it is an integration that always sets thread_name from a template and later adds thread_id for follow-up messages without removing the name.
How do I fix Discord error 220002?
1. Remove thread_name from requests that include thread_id 2. Only send thread_name for the first message of a new post 3. Store the thread ID returned by the first execution (use ?wait=true) and use it for later messages 4. Retry and confirm the follow-up lands in the existing post 5. Log the outgoing body and query string to confirm only one of the two fields is present
Should I retry after error 220002?
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 Discord by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.