From d697c7db994a023b5aca0ce4dcd73f6361c91bf7 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Mon, 23 Feb 2026 17:56:20 +0530 Subject: [PATCH] fix: assignment code sample --- .../application/conversation/assignments.yml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/swagger/paths/application/conversation/assignments.yml b/swagger/paths/application/conversation/assignments.yml index 29a592f45..5a747c4c2 100644 --- a/swagger/paths/application/conversation/assignments.yml +++ b/swagger/paths/application/conversation/assignments.yml @@ -71,3 +71,28 @@ responses: application/json: schema: $ref: '#/components/schemas/bad_request_error' +x-codeSamples: + - lang: Python + label: Assign to an agent + source: | + from chatwoot import ChatwootClient + + client = ChatwootClient(url="https://app.chatwoot.com", api_key="your-api-key") + + conversation = client.conversations.assign( + account_id=1, + conversation_id=42, + assignee_id=10 + ) + - lang: Python + label: Assign to a team + source: | + from chatwoot import ChatwootClient + + client = ChatwootClient(url="https://app.chatwoot.com", api_key="your-api-key") + + conversation = client.conversations.assign( + account_id=1, + conversation_id=42, + team_id=5 + )