For a given portal, update information for a specific lead.
With this PUT request you're making to update a lead, in the request body, you'll need to place JSON string(s) containing the elements you wish to update, along with the lead GUID, which is required. Note that this does not have to be all elements and in fact should just be those which you wish to change. Please note that as mentioned above, you MUST include in the lead GUID in the request body, as well as the request URL.
You can update one or more fields in each request. We recommend bundling your updates into as few requests as possible to help stay under the rate limits.
For instance, with this method, you can close leads as customers (by adding a timestamp to the "closedAt" field), delete leads using the "isDeleted" field, etc...
Please Note The Content-type for your PUT request must be not be "application/www-form-encoded", it should be "application/json", otherwise your update will not be properly parsed by the API servers and will cause no updates to be applied.
| Required Parameters | How to use | Description |
|---|---|---|
| HubSpot OAuth Access Token | access_token=X - Used in the request URL | The HubSpot API key for the portal that you're making the call for. |
| Lead GUID | Used in the request URL and the request body - required in both places. | Unique identifier for a particular lead. |
| Optional Parameters | How to use | Description |
|---|---|---|
| Any Field to Update | Used in the request body | The field that you want to update, in JSON format. For an example, please see the JSON object below. You can update any field as long as it's editable. Most fields are editable and you can view a full list of fields in the Search Leads method. There are also certain fields and objects on lead records that are not editable or writable at all, as listed below. All other fields are editable at this time (See the Search Leads method for explanation of all leads). The lead fields in HubSpot that are not editable are the following:
|
Example request body. This request will update the city and state of the lead, as well as close it at the time specified in the closeedAt timestamp:
{
"city": "Cambridge",
"state": "Massachusetts",
"closedAt": "1323293954000",
"guid": "8a41f2f22906b93a012906b9438f0008"
}
The response from this API call are standard REST-style HTTP response codes that mark success or failure, with meta information about the call that was made. There will be no data in the response body.
HTTP Methods:
PUT
Response Format:
json
Requires Authentication?
Yes
Rate Limited?
Headers