Onsidian API
Recruiting

Ingest a recruiting lead

Submit a single recruiting lead from a vendor webhook

POST /recruiting/ingest

Ingests a single recruiting lead. The request payload is parsed according to the vendor identified by the API key. On success the lead is inserted into the database and distributed to a matching agency and agent if an open order exists.

Authentication

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

Request body

The body format is vendor-specific. The API key determines which parser is applied. After parsing, the following field is required:

FieldTypeRequiredDescription
first_namestringYesRecruit's first name

Optional fields vary by vendor and are stored in vendor_metadata. If the vendor payload includes a base64-encoded resume PDF it is stored in Supabase Storage and linked to the lead record.

Deduplication

If the parsed payload includes a vendor_lead_id, the API checks for an existing lead with the same vendor_id and vendor_lead_id. If a duplicate is found, a 200 response is returned without creating a new record.

Response

201 — Created (new lead)

{
  "id": "uuid",
  "status": "created",
  "distributed_to": {
    "agency_id": "uuid",
    "agent_id": "uuid | null"
  }
}

distributed_to is null if no matching order was found.

200 — Duplicate

{
  "id": "uuid",
  "status": "duplicate"
}

Error responses

CodeReason
UNAUTHORIZEDMissing or invalid API key
BAD_REQUESTNo parser configured for the vendor
BAD_REQUESTfirst_name is missing from parsed payload
INTERNAL_ERRORDatabase insert failed

On this page