Updating participant attributes mid-conversation via PATCH

Need some help troubleshooting the PATCH request to update participant attributes during an active conversation. I am sending a JSON body with attributes to /api/v2/conversations/webmessaging/{conversationId}/participants/{participantId}, but I keep hitting a 404.

{"attributes": {"routing": {"acw": 30}}}

Is the endpoint correct for mid-conversation updates, or do I need to use a different path?

I normally fix this by using the C# SDK UpdateWebMessagingConversationParticipant method instead of raw HTTP.

The endpoint you are trying to PATCH is often invalid for mid-conversation attribute updates in web messaging. According to the docs, “Participant attributes for web messaging are updated via the specific participant update endpoint.” Here is the working C# snippet:

var participantUpdate = new WebMessagingConversationParticipantUpdateRequest 
{ 
 Attributes = new Dictionary<string, object> { { "routing", new { acw = 30 } } } 
};
await _client.ConversationsApi.UpdateWebMessagingConversationParticipantAsync(conversationId, participantId, participantUpdate);

If I recall correctly, the C# approach works, but you are still hitting a 404 because the resource path for Web Messaging participants differs from Voice or Chat. The WebMessagingConversationParticipant resource lives under /api/v2/conversations/webmessaging/{conversationId}/participants/{participantId}, but the attributes payload structure is strictly typed. You cannot just send a generic JSON object; you must map it to the correct SDK model. In the TypeScript SDK, this means using WebMessagingParticipantPatchRequest. The routing object inside attributes expects a RoutingAttributes model, not a raw JSON blob. If you send {"routing": {"acw": 30}} directly, the serializer might fail or the backend rejects the malformed type. Here is the correct TypeScript implementation using the official genesyscloud-purecloud-v2 SDK:

import { ConversationApi, WebMessagingParticipantPatchRequest, RoutingAttributes } from '@genesyscloud/genesyscloud-purecloud-v2';

const conversationApi = new ConversationApi();

const patchBody: WebMessagingParticipantPatchRequest = {
 attributes: {
 routing: {
 acw: 30 // Integer, not string
 } as RoutingAttributes
 }
};

try {
 const result = await conversationApi.patchConversationWebmessagingParticipant(
 conversationId, 
 participantId, 
 patchBody
 );
 console.log('Participant attributes updated:', result);
} catch (error) {
 console.error('Failed to update participant:', error);
}

Ensure your OAuth token includes the conversation:participant:write scope. The 404 often masks a 403 or 400 if the SDK is not configured with the correct base URI or if the participant ID is actually a personId rather than the conversation-scoped participantId. Check the response headers for x-genesys-request-id to trace the exact rejection reason in the server logs. The endpoint is correct, but the payload typing is the usual culprit.