Update deal

Update a single deal

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
uuid
required

UUID

Body Params
boolean
Defaults to false

Opt-in. When true and phone is sent, the request fails with 400 instead of silently keeping the stored number when the contact's phone is frozen. A contact validated on WhatsApp has an immutable phone; without this flag the request answers 200 and the number is left unchanged. Omitted or false keeps the historical behaviour.

boolean
Defaults to false

Opt-in. When true and phone is sent, changes a phone that WhatsApp validation froze, the way the app does. If the contact has a WhatsApp conversation, the contact takes the new number and keeps its deals, a copy contact keeps the old number and the conversation, and the response carries the copy in duplicate_contact_id (send DELETE /v1/contacts/{id} with that id to discard both). Without a WhatsApp conversation, the lock is removed and the number is written. An invalid number (including one with fewer than 11 digits counting the country code, as in the app), or one another contact validated on WhatsApp holds, is refused with 400 and nothing is written; sending the stored number again succeeds and changes nothing. A national number is read as Brazilian: send + and the country code for any other country. A change that fails after it started answers 500 with details.code phone_update_failed and may be partially applied; when the rest of the request fails after the change, details.duplicate_contact_id carries the copy. Takes precedence over validate_phone_update. A phone or ddi under fields.contact in the same request is refused with 400. Omitted, null or false keeps the historical behaviour.

string
string
string
number
uuid
string
enum
Defaults to OPEN

Canonical values are OPEN, WON and LOST. For compatibility the server also accepts them in any letter case with surrounding spaces, plus the Portuguese aliases ABERTO, GANHO and PERDIDO. An empty string or null leaves the status unchanged; any other value returns 400.

Allowed:
uuid

Loss reason ID (from GET /v1/lost-status). Only valid when the deal is being marked as LOST (status: "LOST") or is already LOST (an unchanged lost_status_id matching the deal's stored value on a non-LOST update is ignored for read-modify-write compatibility).

uuid
uuid
fields
object
Headers
string
required

API Token

Responses

lost_status_id, setting lost_status_id when the deal status is not LOST, an unknown stage_id, a user_id that is not a UUID, or a user_id with no user: User with ID <id> not found), or the phone change was refused when validate_phone_update or force_phone_update is true.

origin_id: another deal there carries the same contact identity (the hash of the contact email or phone). The slot can be held by a deal removed with DELETE /v1/deals/{id}, which keeps it. The deal is not changed, and the same request returns the same answer. Code: deal_already_in_origin.

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json