Issue
Some Twilio Conversations users may encounter a recurring issue where deleting a Participant from a Conversation and then attempting to re-add the same Participant results in a 404 Not Found error (error code 20404). Despite the error, the Participant is actually created successfully. This article explains the symptoms, root cause, and a proven workaround, and provides guidance for affected users.
Symptoms
- When deleting a Participant from a Conversation and then re-adding the same identity, the API returns:
-
404 Not Found (error code 20404):
"The requested resource /v1/Services/{ServiceSid}/Conversations/{ConversationSid}/Participants was not found"
-
404 Not Found (error code 20404):
- Fetching the list of Participants after the failed POST shows that the Participant was actually created.
- The issue is consistently reproducible for certain user identities, often those created on a specific date.
- Only some identities are affected; others work as expected.
Cause
- The issue is related to stale or inconsistent backend mappings for specific user identities in Twilio Conversations.
- In the reported case, all affected identities were originally created on the same day, suggesting a backend data issue from that period.
- Deleting only the Participant does not fully clear the backend state for the identity, leading to the observed error.
Resolution
To resolve the issue for affected identities:
-
Delete the User Identity
Remove the User identity from the Conversation Service, not just the Participant from the Conversation. -
Recreate the User Identity
After deletion, recreate the User identity. -
Add the Participant Again
Now, add the Participant to the Conversation as usual. The operation should succeed without a 404 error.
This process fully clears any stale or inconsistent state for the affected identity.
Example API Sequence
-
DELETE /v1/Services/{ServiceSid}/Users/{Identity}
(Removes the User identity from the service.) -
POST /v1/Services/{ServiceSid}/Users
(Recreates the User identity.) -
POST /v1/Services/{ServiceSid}/Conversations/{ConversationSid}/Participants
(Adds the Participant to the Conversation.)
Additional Information
If you encounter persistent 404 errors when re-adding Participants in Twilio Conversations, especially for identities created on a specific date, delete and recreate the User identity before adding them as a Participant. This clears stale mappings and resolves the issue until a permanent fix is deployed.
- Twilio engineering is aware of this issue and is working on a permanent backend fix.
- The workaround above has been confirmed to resolve the issue for affected users.
- If you continue to experience problems, collect API request/response logs and contact Twilio Support for further assistance.
Below you will find references to useful documents:
- Error code documentation: Twilio Error 20404
- Twilio Conversations API Reference
- Managing Users and Participants