Updates metadata of the active ticket, or the latest closed ticket if allow_closed_ticket is true.
allow_closed_ticket to true to fall back to the latest closed ticket when no active ticket exists.
| Field | Type | Required | Description |
|---|---|---|---|
ticket_id | string (UUID) | One of three | Directly target a ticket by its ID. |
ai_contact_id | string (UUID) | One of three | Find the ticket through a contact ID. |
contact_number | string | One of three | Find the ticket through a contact phone number (e.g. +56912345678). |
metadata | object | Yes | Key-value pairs (string: string) to set on the ticket. Merges with existing metadata. |
allow_closed_ticket | boolean | No | When true, falls back to the latest closed ticket if no active ticket exists. Defaults to false. |
You must provide exactly one identifier:ticket_id,ai_contact_id, orcontact_number.