Find or create people and add them to a job
Takes 1 to 20 people and adds each to the job as a candidate, finding the person first and creating them only when nobody matches. Requires jobs:write and people:write, and notes:write when an entry has a note; a missing scope fails the whole call before anything runs.
Matching. person_id given: that person. Otherwise the LinkedIn profile, then the email address; the first hit wins. LinkedIn profiles match on the profile slug, so the scheme, www. or a country subdomain, upper case, a trailing slash and query strings don't matter. A linkedin_url that is not a LinkedIn profile URL (a company page, a search) fails that entry.
Review instead of guessing. When nothing matched and force_create is not true, a person with exactly the same name (case-insensitive) makes the entry needs_review with reason same_name and up to five possible_duplicates; send it again with person_id or force_create: true. A LinkedIn match and an email match on two different people is conflicting_matches; a match in the trash is in_trash. A later entry with the LinkedIn profile or email of an earlier one, or with the same name as an earlier one when neither has a LinkedIn URL or email (and no force_create), is duplicate_in_batch. An email held by a trashed person is in_trash; an email held by two people is conflicting_matches.
Creating. A new person is created as by POST /v4/records/people (default people workflow, in its sourcing phase when one is set), with the LinkedIn URL saved as a bookmark (https://www.linkedin.com/in/<slug>). company_name without company_id is stored on the work history without a company record.
Adding. As by POST /v4/records/jobs/{id}/candidates. The note goes on the candidate (title "Sourcing note") only when the candidate was added in this call, so the same batch sent twice changes nothing the second time.
Independent entries. One entry's failure never stops the others and nothing is rolled back: a person created whose candidate link fails is created with candidate: "failed". A matching person the caller can't see fails the entry ("A matching person exists outside your access.") and no second person is created. Per-entry problems (blank name, a field over its limit, a bad ID) fail that entry only.
dry_run: true runs the matching and writes nothing; outcomes read would_create and would_match. Each results entry has index, name and outcome (created, matched, needs_review, duplicate_in_batch, failed, would_create, would_match), plus, where they apply, person_id, matched_by (linkedin, email, person_id), candidate (added, already_on_job, failed), candidate_id, note (added, none, failed), linkedin_saved, reason, possible_duplicates and error. created_by is only accepted with an API key.
Body
peoplearrayrequired1 to 20 entries: name (required, at most 200 characters), and optionally linkedin_url, email_address, phone_number, work_title, company_id, company_name, city, country_code (two letters), note (at most 5,000 characters), person_id, force_create
phase_ status_ idstringStarting phase ID from the job's candidate workflow, as for one candidate
dry_ runbooleantrue reports what would happen and changes nothing
created_ bystringActing user ID (API keys only)
Parameters
idstringrequiredpathJob ID
Response
One report entry per input, in order
Invalid id or body, or an unknown key
Invalid API key
Insufficient scope, or created_by is not the authorizing user
Job not found
Not 1 to 20 people, or the phase is not in the job's candidate workflow
Internal server error
Authorization
bearer_ authhttp (bearer) in headerAPI key or OAuth access token in Authorization header
Scopes: jobs:write
oauth2_ authoauth2OAuth authorization code flow with mandatory S256 PKCE.
Scopes: jobs:write
apikey_ authapiKey in queryAPI key in query string
Scopes: jobs:write
