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:
| Field | Type | Required | Description |
|---|---|---|---|
first_name | string | Yes | Recruit'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
| Code | Reason |
|---|---|
UNAUTHORIZED | Missing or invalid API key |
BAD_REQUEST | No parser configured for the vendor |
BAD_REQUEST | first_name is missing from parsed payload |
INTERNAL_ERROR | Database insert failed |