Skip to main content
POST
/
sourcing
Initiate sourcing run
curl --request POST \
  --url https://api.instaview.sk/sourcing \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "Senior Backend Engineers – FinTech",
  "jobDescription": "We are looking for a Senior Backend Engineer with 5+ years of Node.js experience…",
  "location": "San Francisco, CA",
  "query": "Senior Node.js engineer fintech",
  "limit": 20,
  "webhookId": "123e4567-e89b-12d3-a456-426614174000"
}
'
{
  "success": true,
  "requestId": "req_550e8400-e29b-41d4-a716-446655440000",
  "status": "processing",
  "message": "Sourcing run accepted and queued for processing.",
  "webhookId": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2025-01-01T00:00:00.000Z",
  "updatedAt": "2025-01-01T00:01:00.000Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.instaview.sk/llms.txt

Use this file to discover all available pages before exploring further.

Starts an asynchronous AI-powered candidate sourcing pipeline. Returns immediately with a requestId and status: "processing".

Overview

The sourcing agent runs headless — it derives its own Ideal Candidate Profile (ICP) from your job description, compiles a search query, and enriches matching profiles in parallel batches. No clarifying questions are asked; the pipeline runs fully automatically. Results are delivered via webhooks (recommended) or by polling GET /sourcing//results.

Billing Pre-Flight

Before a sourcing run is accepted, InstaView validates your billing state against the requested limit:
  • Prepaid accounts: your credit balance must be ≥ limit credits. If not, the API returns 402 Payment Required before any processing starts.
  • Postpaid accounts: the run starts immediately; credits are recorded and invoiced at the end of the billing cycle.
Successfully sourced candidates consume 1 credit each. Profiles that fail the enrichment step are not billed.

Webhook Delivery

To receive results without polling, pass a webhookId referencing a pre-registered WebhookConfig that subscribes to at least one of SOURCING_COMPLETED or SOURCING_FAILED. The webhook config must belong to the same company as the authenticating API key.
See Setting Up Webhooks for instructions on registering a webhook config and storing the signing secret securely.

Examples

Minimal Request

{
  "title": "Senior Backend Engineer",
  "jobDescription": "We are looking for a Senior Backend Engineer with 5+ years of Node.js and TypeScript experience, strong PostgreSQL skills, and familiarity with AWS."
}

Full Request

{
  "title": "Senior Staff ML Engineer",
  "jobDescription": "We are seeking a Staff Machine Learning Engineer to design and scale our agentic coding infrastructure. Experience with prompt engineering pipelines, LLM fine-tuning, vector search, and latency optimization is highly required.",
  "location": "Remote, USA",
  "query": "Prioritize candidates with active contributions to major LLM libraries or frameworks like LangChain, LlamaIndex, or vLLM.",
  "limit": 15,
  "webhookId": "3f9a12c7-44b8-4d32-b71f-e29a7d1e0f5c"
}

Response (202 Accepted)

{
  "success": true,
  "requestId": "req_9f3b827e-8c31-4bda-a7a2-b2d99d14f4e2",
  "status": "processing",
  "message": "Sourcing run accepted and queued for processing.",
  "webhookId": "3f9a12c7-44b8-4d32-b71f-e29a7d1e0f5c",
  "createdAt": "2026-05-20T13:20:45.000Z"
}

Error Responses

402 — Insufficient Credits (Prepaid)

{
  "statusCode": 402,
  "error": "INSUFFICIENT_FUNDS",
  "message": "Insufficient credits. Need 15, have 3."
}

403 — Webhook Ownership Mismatch

{
  "statusCode": 403,
  "error": "WEBHOOK_COMPANY_MISMATCH",
  "message": "The provided webhookId belongs to a different company."
}

422 — Webhook Not Subscribed to Sourcing Events

{
  "statusCode": 422,
  "error": "WEBHOOK_EVENT_NOT_SUBSCRIBED",
  "message": "Webhook configuration must subscribe to at least one sourcing event (SOURCING_COMPLETED or SOURCING_FAILED)."
}

Authorizations

Authorization
string
header
required

API key for authentication using Bearer scheme

Body

application/json
title
string
required

Human-readable title for this sourcing run.

Maximum string length: 200
Example:

"Senior Backend Engineers – FinTech"

jobDescription
string
required

Full job description used to build the candidate-search query.

Maximum string length: 10000
Example:

"We are looking for a Senior Backend Engineer with 5+ years of Node.js experience…"

location
string

Target location for the search (e.g. 'San Francisco, CA' or 'Remote').

Maximum string length: 200
Example:

"San Francisco, CA"

query
string

Override for the free-text search query sent to the sourcing agent. When omitted the agent derives it from jobDescription.

Maximum string length: 500
Example:

"Senior Node.js engineer fintech"

limit
integer
default:20

Maximum number of candidates to return (default: 20, max: 100).

Required range: 1 <= x <= 100
Example:

20

webhookId
string<uuid>

UUID of a WebhookConfig to notify when the run completes or fails. The webhook must belong to the same company and subscribe to at least one sourcing event.

Example:

"123e4567-e89b-12d3-a456-426614174000"

Response

Sourcing run accepted and queued for processing

success
boolean
required

Whether the request was accepted for processing.

Example:

true

requestId
string
required

Unique external identifier for this sourcing run.

Example:

"req_550e8400-e29b-41d4-a716-446655440000"

status
enum<string>
required

Current status of the run.

Available options:
processing,
completed,
failed
Example:

"processing"

message
string
required

Human-readable message.

Example:

"Sourcing run accepted and queued for processing."

webhookId
string

UUID of the webhook configuration that will receive completion events.

Example:

"123e4567-e89b-12d3-a456-426614174000"

createdAt
string

ISO 8601 timestamp when the run was created (POST only).

Example:

"2025-01-01T00:00:00.000Z"

updatedAt
string

ISO 8601 timestamp when the run was last updated (PATCH only).

Example:

"2025-01-01T00:01:00.000Z"