Onsidian API
Recruiting

Bulk ingest recruiting leads

Batch import multiple recruiting leads in a single request

POST /recruiting/ingest/bulk

Ingests multiple recruiting leads in a single request. Each lead is parsed individually using the vendor's parser. Rows that fail validation are reported in the errors array without blocking the rest of the batch. Resumes are not supported in bulk requests.

Authentication

Vendor API key via Authorization: Bearer <vendor-api-key>.

Request body

{
  "leads": [
    { /* vendor-specific lead payload */ },
    { /* vendor-specific lead payload */ }
  ]
}
FieldTypeRequiredDescription
leadsarrayYesNon-empty array of vendor-specific lead objects

Processing

  1. Each item in leads is parsed with the vendor's parser.
  2. Items missing first_name after parsing are added to errors.
  3. Items with a vendor_lead_id that already exists in the database are counted as duplicates and skipped.
  4. All remaining items are inserted in a single batch operation.

Response

{
  "created": 8,
  "duplicates": 1,
  "errors": [
    { "row": 2, "reason": "missing first_name" }
  ]
}
FieldTypeDescription
creatednumberNumber of leads successfully inserted
duplicatesnumberNumber of leads skipped due to duplicate vendor_lead_id
errorsarrayRows that failed parsing or validation, with row index and reason

Error responses

CodeReason
UNAUTHORIZEDMissing or invalid API key
BAD_REQUESTNo parser configured for the vendor
BAD_REQUESTleads field is missing or empty
INTERNAL_ERRORDatabase batch insert failed

On this page