Jobs

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" }),
});
patch/v1/jobs/{job_id}

Request

  • Base URL: https://api.yardstick.team
  • URL: https://api.yardstick.team/v1/jobs/{job_id}
  • Auth: HTTP bearer

Path parameters

job_idstring required

Headers

Idempotency-Keystring

Supported for safe retry. Reuse the same key to receive the cached response without repeating the operation.

X-Request-Idstring

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

titlestring
departmentstring nullable
department_idstring nullable
locationstring nullable
location_type'remote' | 'hybrid' | 'onsite' nullable
descriptionstring nullable
status'draft' | 'open' | 'paused'

Response

Success

idstring required

Display id, e.g. job_<base32>

object'job' required
status'draft' | 'open' | 'paused' | 'closed' | 'archived' required
titlestring required
departmentstring nullable required

Legacy free-text department metadata. Preserved for backward compatibility. New integrations should use department_id for authoritative ownership; this field is advisory display text only.

department_idstring nullable required

Display ID of the linked Department (internal Group). Use this for authoritative ownership. Null when the Job has no linked Department.

department_namestring nullable required

Live name of the linked Department (Group). Null when the Job has no linked Department.

locationstring nullable required
location_type'remote' | 'hybrid' | 'onsite' nullable required
descriptionstring nullable required
livemodeboolean required
created_atstring nullable required

ISO-8601 UTC

updated_atstring nullable required

ISO-8601 UTC

closed_atstring nullable required

ISO-8601 UTC

archived_atstring nullable required

ISO-8601 UTC

Changes

No recorded changes to this operation across all 2 revisions of this API.