Update a job
Update 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. Archived jobs reject updates with HTTP 409 job_archived; closed jobs reject further status changes with HTTP 409 invalid_state_transition.
Example (curl):
curl -X PATCH https://api.yardstick.team/v1/jobs/job_abc123 \
-H 'Authorization: Bearer ys_sk_live_…' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: 7c3a…' \
-d '{"location":"Remote","location_type":"remote"}'
Example (TypeScript):
await fetch("https://api.yardstick.team/v1/jobs/job_abc123", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.YS_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({ location: "Remote", location_type: "remote" }),
});
Request
- Base URL: https://api.yardstick.team
- URL: https://api.yardstick.team/v1/jobs/{job_id}
- 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
Success
Changes
No recorded changes to this operation across all 2 revisions of this API.