Skip to main content
PUT/deals-by-id/:custom_id/

Update deal by id

You can update a deal by using a deal_custom_id.

AttributesTypeRequiredDescription
custom_idstringyes

The unique identifier for the deal which is provided by the client.

activities_statusstringnoA status of an activity assigned to the user.
assigned_tointegerno

A unique identifier for the agent which is given by User automatically.

company_idintegerno

A unique identifier for the company which is given by User automatically.

currencyISO 4217 codeno

Three-letter ISO 4217 code, for example EUR. The API only checks the length: any three letters are accepted.

expected_close_datedateno

When the deal is expected to close, YYYY-MM-DD.

loss_reasonintegernoA reason for a lost deal.
lost_atdatetimenoA date when the deal has been marked as lost.
namestringnoA deal name.
participantsinteger(list)no

IDs of contacts taking part in the deal.

pipelineintegernoAn id of a pipeline where the deal is assigned to.
productsinteger(list)noA list of product IDs.
products_custom_idstring(list)noA list of product custom IDs.
stageintegerno

ID of the stage. It must belong to pipeline.

statusintegerno

Status of the deal: 0 abandoned, 1 in progress, 2 won, 3 lost, 4 archived. A lost deal doesn't need a loss_reason.

user_idintegerno

A unique identifier for the user which is given by User automatically.

valuenumbernoA value of a deal.
won_atdatetimenoA date when the deal has been marked as won.
user_custom_idstringno

The unique identifier for the user which is provided by the client.

company_custom_idstringno

The unique identifier for the company which is provided by the client.

order_productslistno

A list of basic information per each ordered product which is provided by the client.
Those information have to contain:

  • product_id (integer) OR product_custom_id (string)
  • quantity (integer)
  • value (integer)
  • currency (string)

Request​

curl -X PUT "https://<your_app_subdomain>.user.com/api/public/deals-by-id/:custom_id/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2" \
-H "Content-Type: application/json" \
-d '{
"name": "Annual plan for Acme Inc",
"value": 1800
}'

Response examples​

{
"id": 387,
"name": "Annual plan for Acme Inc",
"value": "1800.00",
"currency": "EUR",
"custom_id": "annual-plan",
"stage": 27,
"pipeline": 11,
"assigned_to": null,
"agent": null,
"company_id": null,
"user_id": 1892,
"products": [],
"status": 1,
"scope": 2,
"created_by": 1,
"created_at": "2026-11-10T07:19:06.452411Z",
"updated_at": "2026-11-10T07:19:09.651185Z",
"tags": [],
"activities_status": "no planned",
"expected_close_date": null,
"loss_reason": null,
"loss_reason_description": "",
"lost_at": null,
"won_at": null,
"participants": [],
"order_products": [],
"user_custom_id": "jane-doe",
"products_custom_id": [],
"description": "Yearly subscription, 10 seats."
}

A 400 names every field that was rejected. The messages you're most likely to see (name can't be empty here):

MessageWhen
Invalid pk "123" - object does not exist.No record has that ID: pipeline, stage, user_id, company_id, assigned_to (agent), loss_reason, or an item of products or participants.
Object with user_id=abc does not exist. / Object with company_id=abc does not exist. / Object with custom_id=abc does not exist.No contact, company or product has that custom ID (user_custom_id, company_custom_id, products_custom_id).
non_field_errors: Stage with id 5 do not belong to pipeline with id 11stage is in another pipeline.
"9" is not a valid choice.status isn't 0–4.
Ensure this field has no more than 3 characters.currency is longer than three characters.
A valid number is required.value isn't a number.
Date has wrong format. Use one of these formats instead: YYYY-MM-DD.expected_close_date isn't YYYY-MM-DD.
deal with this Deal custom id already exists.Another deal has that custom_id.
order_products: [{"currency": ["This field is required."], "value": ["This field is required."]}]An item of order_products misses a field; Could not find product with id '123' when the product doesn't exist.

The endpoint takes PUT, but only the fields you send change. The 404 ("detail": "Not found.") comes back when no deal has that custom ID.

Response fields​

Fields returned in the 200 OK response body.

idinteger
A unique identifier for the deal which is given by User automatically.
namestring
A deal name.
valuestring
A value of a deal.
currencystring
A currency of a deal.
custom_idstring
A unique identifier for the deal which is provided by the client.
stageinteger
An id of a stage of the pipeline the deal is currently at.
pipelineinteger
An id of a pipeline where the deal is assigned to.
assigned_tointegernullable
A unique identifier for the agent which is given by User automatically.
agentobjectnullable
The agent the deal is assigned to, or null.
company_idintegernullable
A unique identifier for the company which is given by User automatically.
user_idinteger
A unique identifier for the user which is given by User automatically.
productsarray
A list of products' ids.
statusinteger
A status of your deal (0 - abandoned, 1 - in progress, 2 - won, 3 - lost, 4 - archived)
scopeinteger
Deal scope: 1 (open) or 2 (participants, the default). It currently has no effect.
created_byinteger
ID of the agent who created the deal.
created_atstring (date-time)
A creation date of a deal.
updated_atstring (date-time)
A date of last deal update.
tagsarray
A list of tags.
activities_statusstring
A status of an activity assigned to the user.
expected_close_datedatenullable
A date when the deal is expected to be closed.
loss_reasonintegernullable
A reason for a lost deal.
loss_reason_descriptionstring
Free-text note on why the deal was lost.
lost_atdatetimenullable
A date when the deal has been marked as lost.
won_atdatetimenullable
A date when the deal has been marked as won.
participantsarray
A list of user_ids assigned to a deal.
order_productsarray
A list of basic information per each ordered product which is provided by the client. Those information have to contain: product_id (integer) OR product_custom_id (string) quantity (integer) value (integer) currency (string)
user_custom_idstring
The unique identifier for the user which is provided by the client.
products_custom_idarray
A list of product custom IDs.
descriptionstring
Deal description.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.