Publish a job posting (preview→bind)
Publish a job posting (preview→bind)
Required scopes: job_postings:write, job_postings:publish
Preview→bind flow. Calling without a binding returns HTTP 202 with the approval-required envelope (no mutation). To execute, re-issue with binding echoing the preview's preview_hash, approved_action_key, approved_input_hash, approved_idempotency_key, and resource_version_precondition. The Idempotency-Key must match between calls. Preview responses are not cached; bind responses are cached so retrying the bind under the same Idempotency-Key replays the original result without re-executing the mutation.
Example (curl):
curl -X POST https://api.yardstick.team/v1/job_postings/jp_abc123/actions/publish \
-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/job_postings/jp_abc123/actions/publish",
{
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/job_postings/{job_posting_id}/actions/publish
- Auth: HTTP bearer
Path parameters
Headers
Required for this operation. Reuse the same key to safely retry the same request.
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
Bind succeeded — job posting published.
Changes
No recorded changes to this operation across all 1 revision of this API.