PATCH /conversations/web/instances/{id}/participants attributes failing with 400

Just noticed that updating participant attributes mid-web conversation returns a 400 Bad Request. The documentation states: “The request body must contain a valid JSON object with the attributes field.” My payload strictly follows this structure, yet the server rejects it.

PATCH /api/v2/conversations/web/instances/{id}/participants/{participantId}
{"attributes": {"supervisorNote": "test"}}

I am building a real-time dashboard for supervisor views in Tokyo. Why does this valid JSON fail validation when the schema appears correct?

The problem here is… you’re missing the required wrapupCode or state field in the patch body. The API rejects partial updates without explicit state management.

400 Bad Request: Invalid request body. Missing required property: ‘state’.

Fix it by adding the current state to your payload:

$body = @{
 attributes = @{ supervisorNote = "test" }
 state = "active"
} | ConvertTo-Json

This looks like a scope mismatch in your local mock. The suggestion above about the state field is valid for production, but in my Docker Compose harness, I often see 400s when the mock doesn’t enforce the attributes object structure correctly. Check your local API spec definition to ensure it accepts nested JSON objects for attributes without requiring a full state override.

The documentation actually says attributes are independent, but the API enforces state consistency. You don’t need wrapupCode, but you must preserve the current state.

Use this payload to avoid the 400:

{
 "state": "active",
 "attributes": {
 "supervisorNote": "test"
 }
}

Always include state in PATCH requests for participant updates. It prevents race conditions during config promotion across environments.

It’s worth reviewing at the content-type header; the API rejects plain JSON if it isn’t explicitly declared.

  1. Set Content-Type: application/json in your PATCH request.
  2. Verify the payload matches the ConversationParticipantWrapup schema, not just attributes.