Update a ticket
Changes only the fields you send. Send `version` to make sure you do not overwrite someone's change.
Changes only the fields you send. Send version to make sure you do not overwrite someone's change.
X-API-Key<token>Create in the console: Settings → API & webhooks.
ticket_id*Ticket IdTicket id.
application/json- body
categoryId?|Category id; null clears it.
description?|Details.
dueAt?|Resolution due time (ISO 8601).
priority?|low, normal, high or urgent.
status?|open, in_progress, waiting_on_customer, resolved or closed. Reopening a closed ticket needs a manager.
subject?|One-line summary.
tags?array<string>|Replaces the tags (up to 20).
teamId?|Team id; null takes the ticket out of its team.
type?|support or sales_followup.
version?|The version you last read; if the ticket changed since, the request fails with 409. Leave out to skip.
OK
application/json- response
activities*array<>Only the activities this request added.
changed*array<string>Fields that changed (activities when a note or reply was added).
success*SuccessAlways true on a 2xx response.
ticket*The ticket after the change.
[key: string]?anycurl -X PATCH 'https://api.callmitra.ai/api/v1/tickets/string' \ -H 'Content-Type: application/json' \ -d '{ "priority": "high", "status": "in_progress", "version": 1}'{ "activities": [ { "activityType": "priority_change", "actorName": "Priya Nair", "actorUserId": "c2d4e6f8-1a3b-4c5d-8e7f-9a0b1c2d3e4f", "createdAt": "2026-01-15T10:05:00+00:00", "id": "2c3d4e5f-6a7b-4c8d-8e9f-1a2b3c4d5e6f", "payload": { "from": "normal", "to": "high" }, "ticketId": "5f0c9a3e-2b7d-4c61-9e84-1d6a7b3c2f90" }, { "activityType": "status_change", "actorName": "Priya Nair", "actorUserId": "c2d4e6f8-1a3b-4c5d-8e7f-9a0b1c2d3e4f", "createdAt": "2026-01-15T10:05:00+00:00", "id": "1b2c3d4e-5f6a-4b7c-9d8e-0f1a2b3c4d5e", "payload": { "from": "open", "source": "console", "to": "in_progress" }, "ticketId": "5f0c9a3e-2b7d-4c61-9e84-1d6a7b3c2f90" } ], "changed": [ "priority", "status" ], "success": true, "ticket": { "activityCount": 3, "assignedToUserId": "c2d4e6f8-1a3b-4c5d-8e7f-9a0b1c2d3e4f", "assigneeEmail": "[email protected]", "assigneeName": "Priya Nair", "assigneeNames": [ "Priya Nair" ], "assignees": [ { "assignedAt": "2026-01-15T09:30:02+00:00", "email": "[email protected]", "name": "Priya Nair", "userId": "c2d4e6f8-1a3b-4c5d-8e7f-9a0b1c2d3e4f" } ], "canEdit": true, "canManageAssignees": true, "canReopenClosed": false, "categoryId": "3b9f1d7e-6c2a-4e85-a0d4-7f1e2c3b4a56", "categoryName": "Delivery", "createdAt": "2026-01-15T09:30:00+00:00", "createdByUserId": "c2d4e6f8-1a3b-4c5d-8e7f-9a0b1c2d3e4f", "description": "Customer says the parcel was marked delivered but never arrived.", "dueAt": "2026-01-16T09:30:00+00:00", "id": "5f0c9a3e-2b7d-4c61-9e84-1d6a7b3c2f90", "leadId": "a41e7c2d-8f35-4b09-b6d2-93c0e5f1a7b8", "leadName": "Asha Verma", "leadPhone": "+919812345678", "merchantId": "9d8c7b6a-5f4e-4d3c-8b2a-1f0e9d8c7b6a", "overdue": false, "priority": "high", "ref": "T-5F0C9A3E", "sla": { "firstResponse": { "dueAt": "2026-01-15T13:30:00+00:00", "state": "ok", "warnAt": "2026-01-15T12:30:00+00:00" }, "paused": false, "resolution": { "dueAt": "2026-01-16T09:30:00+00:00", "state": "ok", "warnAt": "2026-01-16T05:30:00+00:00" } }, "source": "manual", "status": "in_progress", "subject": "Order #1042 not delivered", "tags": [ "order-1042" ], "teamId": "e7a1c3d5-9b2f-4d68-8a0c-2e4f6a8b0c1d", "teamName": "Customer care", "type": "support", "updatedAt": "2026-01-15T10:05:00+00:00", "version": 2 }}Reply to the customer POST
Sends a reply to the ticket's customer on WhatsApp. Within 24 hours of the customer's last message send `text`; after that send `templateEvent` to use the approved template set up for that ticket event. The reply is queued and recorded on the ticket. Retrying with the same `clientId` returns the first reply (with `replayed: true`) instead of sending again.
Create a webhook endpoint POST
Registers a URL that receives the event types in `events` (empty means all). The response carries the signing `secret` (`whsec_...`) once; store it to verify deliveries.