Programmatic Queue Transfer Failing via Conversations API PATCH

Could someone explain why my Go client receives a 422 Unprocessable Entity when attempting to transfer an active voice conversation to a different queue using the PATCH endpoint? The documentation suggests updating the to object, but the error persists regardless of the payload structure.

HTTP 422: Validation Failed - Invalid transfer destination

go
req := map[string]interface{}{
	"to": map[string]interface{}{
		"uri": "/api/v2/routing/queues/12345",
	},
}
// PATCH /api/v2/conversations/{conversationId}/participants/{participantId}

Am I missing a specific field in the JSON body required for queue-to-queue transfers?

1 Like

It depends, but generally…

HTTP 422: Validation Failed - Invalid transfer destination

Stop using raw JSON maps. The to object requires strict type casting for type and id. Use the SDK’s TransferTarget struct to ensure the URI format matches the routing queue endpoint exactly. Mismatched types cause immediate rejection.