Update the amount of a ticket
WhatsApp Messages
Update the amount of a ticket
Updates the amount of the active ticket, or the latest closed ticket if allow_closed_ticket is true. Provide ticket_id, ai_contact_id, or contact_number to identify the ticket. currency is required for price-source tickets and ignored for metadata-source tickets.
POST
Update the amount of a ticket
Overview
Updates the amount of a ticket. The amount represents the monetary value associated with the ticket (e.g. the deal value). By default, this endpoint targets the contactβs active ticket. Setallow_closed_ticket to true to fall back to the latest closed ticket when no active ticket exists.
Whether
currency is required depends on how the ticket type is configured:- Price-source tickets:
currencyis required. - Metadata-source tickets: the amount is written to the configured custom field and
currencyis ignored.
Authentication
Include your API key in the request headers:Request Body
| 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). |
amount | number | Yes | The amount to set on the ticket. |
currency | string | Conditional | ISO currency code (e.g. CLP, USD). Required for price-source tickets, ignored for metadata-source tickets. |
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.
Example Requests
By contact number
By AI contact ID (with closed ticket fallback)
By ticket ID
Responses
200 - Success
400 - Bad Request
Returned when no identifier is provided, the request body is invalid, orcurrency is missing for a price-source ticket.
