Leads
Change many leads
/leadsUp to 1,000 leads’ changes in one call: names, the short company name, company, job title, email, custom fields and tags, as PATCH /leads/{leadId} makes them. Each row stands alone: one that fails changes nothing, and the others still save. Repeating the call is safe.
Try itSend a real request with your API key
Headers
Idempotency-KeystringAny unique value up to 255 characters, like a UUID. The request runs once; repeats within 24 hours get the first answer, with Idempotent-Replayed: true. Up to 255 characters.
Body
leadsarray of LeadPatchRowRequiredUp to 1,000.
Each item
leadIdstring or nullUp to 180 characters.
idstring or nullThe same as leadId. Up to 180 characters.
linkedinUrlstring or nullUp to 1,000 characters.
firstNamestring or nullWhat {{first_name}} says. It can’t be emptied. Up to 100 characters.
lastNamestring or nullUp to 100 characters.
companystring or nullA new company resets companyShort to the automatic one, unless you send companyShort too. Up to 200 characters.
companyShortstring or nullThe short company name {{company_short}} and {{company_name}} use, like “Acme” for “Acme Holdings, Inc.”. Clear it to go back to the automatic one. Up to 100 characters.
titlestring or nullTheir job title. Up to 200 characters.
emailstring · email or nullThe email Salesteam uses for them from now on. Up to 254 characters.
customFieldsobject or nullValues for the workspace's custom fields, by field key or name (
service_wordorService word; see GET /custom-fields). A name the workspace doesn't have yet becomes a new field: a number makes a Number field, a list a Multi-select, anything else Text. Values are checked against the field's type: a URL needs a web address, a Number a number, a Date a date (saved as YYYY-MM-DD), and a choice that isn't an option yet is added. null removes a value; an empty string or an empty list leaves it as it is. Up to 50 per lead.tagsobject or nullTags to add (a new name becomes a workspace tag) and tags to take off, by name.
Inside it
addarray of string or nullTag names (or IDs); one name can be a string. Up to 20.
removearray of string or nullTag names (or IDs); one name can be a string. Up to 20.
cleararray of string or nullFields to empty: lastName, company, companyShort (back to the automatic one), title or email. A cleared company or title shows what LinkedIn says, if anything.
Answer
200 OK One result per row.
dataUpdateLeadsResultRequiredInside it
updatedintegerRequiredunchangedintegerRequiredfailedintegerRequiredresultsarray of objectRequiredEach item
indexintegerRequiredPosition of this row in the request.
leadIdstring or nullRequiredstatusstringRequiredA failed row changed nothing; the other rows still saved. One of
updated,unchanged,failed.changedarray of stringThe fields that changed.
errorobjectInside it
codestringRequiredAn error code from the table above, as a whole request would get it.
messagestringRequired
Errors
- 400 Bad request
invalid_requestinvalid_jsonduplicate_in_request - 401 Unauthorized
unauthorized - 404 Not found
not_foundnot_in_campaign - 409 Conflict
conflictidempotency_in_progressworkspace_busycampaign_finishedcampaign_without_listtag_limitlead_has_historycampaign_not_launchedcampaign_cannot_resumeambiguous_email - 413 Too large
too_large - 415 Wrong content type
unsupported_media_type - 422 Can’t process
idempotency_key_reused - 429 Too many requests
rate_limited - 500 Server error
server_error
Every error has the same shape. See Errors.