Trigger a search against a corpus
POST/api/v1/cvds/search
Start a search of one corpus for the best-first candidates against a
position. Returns immediately with a run id and status: "pending";
the search runs asynchronously. Read the result by polling
GET /api/v1/cvds/runs/{id} or via the completion webhook.
Position config (position_metadata)
position_metadata is the position-config object the search plans
against. It is the same shape CV DeepMatch consumes as its
requirements config — see the CvdsPositionMetadata schema and the
Position config reference for
the field-by-field contract (the 1–5 importance scale, where each
requirement belongs, education ON/OFF, cardinality limits). For an
inline, unsaved search the API does not constrain the inner shape
beyond requiring a non-empty object.
Saved-job references
Instead of sending position_metadata inline, reference a job saved
in the Jobs catalog:
- At least one of
position_id/job_idis required.position_idis your own key;job_idis the platform id. When both are sent they must resolve to the same saved job (400 INVALID_INPUTotherwise);job_idwins for resolution. - Omit
position_metadatato run with the referenced job's stored content, composed as{...config, job_description}. A reference that resolves to no saved job for your client returns400 JOB_NOT_FOUND. saveJob: truesaves the inlineposition_metadataas a job before running. The blob is decomposed — the reservedjob_descriptionkey becomes the job's JD prose, the remainder itsconfig— and strictly validated with the save-time contract. On failure the search returns400 INVALID_INPUTwith per-field detail, nothing is saved and no run is started. Inline searches withoutsaveJobstay unvalidated exactly as before. Ajob_idalone can only update an existing job — it never creates one (useposition_idto create).- The run responses expose the run's
job_idattribution (null for pure inline runs).
Job updates & caching
The search planner caches a plan per position. For an inline
(unsaved) search, set job_updated: true when the position's
requirements changed since the last search so the plan is rebuilt;
leave it false (default) to reuse the cached plan and re-rank.
For a run whose content comes from a saved job (a reference-only
search, or a saveJob that just updated it), the platform derives
job_updated automatically — true exactly when the job changed
since the last search of that job against the same corpus (or when it
is the first such search) — and ignores the client-sent value.
You never need to track plan staleness for saved jobs.
top_n
How many best-first candidates to return (default 100). Values above the server cap (1000) are clamped.
Webhook URL requirements
- Optional. Omit to poll-only.
- When provided, must use
https://(INSECURE_WEBHOOK_URLotherwise) and must not resolve to a private / loopback / link-local address (PRIVATE_WEBHOOK_URL). DNS is re-checked before each delivery attempt (DNS-rebinding defense).
Idempotency
Pass an idempotency_key to make the trigger safe to retry — the same
key replays the existing run id instead of starting a new search.
Required permission
Client's permissions[] must contain cvdeepsearch
(403 MISSING_PERMISSION otherwise).
Request
Responses
- 200
- 400
- 401
- 403
- 500
- 502
The search was triggered (or an idempotency replay returned the existing run). Poll the run id for the result.
Validation failure. error.code is one of:
INVALID_INPUT— a field failed validation. Also returned when neitherposition_idnorjob_idwas sent, when the two resolve to different saved jobs, whensaveJobwas requested with an unknownjob_id(a system id never creates), or when asaveJobfailed the decompose-and-validate check (nothing is saved, no run is started; per-field detail inerror.details.fields).JOB_NOT_FOUND— the saved-job reference (no inlineposition_metadata) resolved to no saved job for your client.MISSING_CORPUS_ID—corpus_idwas missing (fail-closed).INSECURE_WEBHOOK_URL—webhook_urlishttp://.PRIVATE_WEBHOOK_URL—webhook_urlresolves to a private / loopback / link-local address.
Missing or invalid API key.
Authenticated but missing the cvdeepsearch permission.
Internal error.
STEP_FUNCTIONS_FAILED — the downstream search pipeline failed to
start. The run is durable (pending) and recoverable; retry-safe
with the same idempotency_key.