Skip to contentSkip to navigation

Bulk Assign Leads Beta

Assign many leads to a workspace member, or unassign them.

POST /api/v1/leads/bulk/assign

Requires an API key with the write scope.

Sets the owner (assignee) of the selected leads. The owner is a different thing from the user who created the lead: ownerUserId on a lead starts as null (unassigned) and only changes through this endpoint. Read it back with GET /leads (the ownerUserId filter) or on the lead object.

The owner must be a member of the workspace; any other user id is a 422 and nothing changes. A member who is removed later can remain the owner of the leads until you reassign them.

Up to 1,000 selected leads run inside the request and the job comes back completed (200). More than that is queued: the response is 202 with a pending job; poll Get Job until it is completed. The job keeps the actor and the owner as its record.

Body Parameters

ownerUserId string | null body required
The workspace member to assign the leads to. Send null to unassign them. The field is required: leaving it out is a 422.
leadIds string[] body
Lead IDs, up to 50,000. Send this or filter, not both.
filter object body
Select leads by filter instead. Keys: search, status, tags (comma separated; a lead must carry all of them), tagMatch (any to match leads with at least one of the tags), provider, interestStatus, labelId, ownerUserId. Matches at most 50,000 leads, newest first.

Response

data object

The job. See Get Job for every field.

Job object
id string
Job identifier.
type string
lead_bulk.
status string
completed when the call finished the work (200), pending when it was queued (202).
totalItems integer
Leads selected.
result object
{ "updated": 120 }: how many of the selected leads in your workspace were updated. Ids from another workspace or deleted leads are skipped.

Errors

StatusDescription
401Missing, invalid, revoked or expired API key
403API key does not have the required scope: write
422Neither or both of leadIds and filter were sent, ownerUserId is missing, or ownerUserId is not a member of this workspace

Rate Limit

  • 100 requests per minute, shared by every bulk call in your workspace. Fixed 60-second window.
  • Every response includes X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (unix epoch seconds) and X-RateLimit-Bucket (bulk).
  • A 429 response includes a Retry-After header (seconds until the bucket resets).

For client-side patterns (Retry-After, exponential backoff, monitoring X-RateLimit-Remaining), see Rate Limiting.

Was this page helpful?