Archive a job
Archive a job
Required scopes: jobs:write
Direct Job mutation. Use Idempotency-Key for create, update, close, and archive retries; replayed requests with the same key and body return the cached result instead of duplicating lifecycle writes. Jobs are organization and live/test partition scoped. Malformed, cross-org, wrong-mode, and inaccessible ids return 404 not_found rather than leaking existence. Close and archive affect only the Job row in this slice; job postings, applications, and interview plans are not mutated.
Example (curl):
curl -X POST https://api.yardstick.team/v1/jobs/job_abc123/actions/archive \
-H 'Authorization: Bearer ys_sk_live_…' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: 7c3a…' \
-d '{}'
Example (TypeScript):
await fetch("https://api.yardstick.team/v1/jobs/job_abc123/actions/archive", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.YS_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({}),
}).then((r) => r.json());
Request
- Base URL: https://api.yardstick.team
- URL: https://api.yardstick.team/v1/jobs/{job_id}/actions/archive
- Auth: HTTP bearer
Path parameters
Headers
Supported for safe retry. Reuse the same key to receive the cached response without repeating the operation.
Optional caller-supplied request identifier. Values must match ^[A-Za-z0-9_-]{1,128}$; a valid value is echoed in the response X-Request-Id header, otherwise the API generates one.
Request body
Response
Job archived.
Changes
No recorded changes to this operation across all 1 revision of this API.