Update custom fields in deals

Hello everyone,

I’d like to know whether it is possible to update custom fields/properties using the API? Seems like I can’t find a way to make it work. Simply using it like a default property doesn’t seem to work.

Note: I am trying to get it to work using Postman, no SDK.

{
 "status": "error",
 "message": "No properties found to update, please provide at least one.",
 "correlationId": "778a9d6a-a902-4b34-aa2e-696fe1cc710e",
 "context": {
 "properties": [
 "{}"
 ]
 },
 "category": "VALIDATION_ERROR"
}

Does anyone have an idea?

Thank you!

Hi @Anonymous :waving_hand:

Just to confirm, which of the 2 cases below are you trying to achieve?

  1. Update the value of a custom property on one/many record(s). For example, on Deal record XYZ, you’re trying to set “Custom Property X” to “Example Value”.
  2. Update information relating to a custom property itself. For example, you’re trying to update the property label and/or description of “Custom Property X”.

Something else that would allow me to assist here is your API request method and URL

(e.g. PATCH https://api.hubapi.com/crm/v3/properties/DEAL/custom\_property\_x)

and response status code

(e.g. 404)

Looking forward to hearing from you soon.

Hello @zach_threadint

thank you for your reply and sorry that I wasn’t clear enough on that. That would be case 1: trying to update the value of a custom property on one/many deal record(s).

Many thanks

Hi @Anonymous :waving_hand:

Thanks for clarifying. In that case, try replicating the following request in Postman:

Update Deal

Method: PATCH

Endpoint: https://api.hubapi.com/crm/v3/objects/DEAL/**RECORD\_ID**

  • Where RECORD_ID is replaced with the relevant Deal record ID

Headers

:

  • Content-Type: application/json
  • Authorization: Bearer ACCESS_TOKEN
    • Where ACCESS_TOKEN is replaced with your API authentication credentials (likely either a Private App or OAuth Access Token)

Body:

Set your Body type to “raw”, then select “JSON” from the dropdown

{
 "properties": {
 "your_custom_property_name": "example value"
 }
}

I hope this proves useful. Please let me know if you have any follow-up questions.

Hello @zach_threadint

thank you a lot. This worked for me!

Have a great day!