---
title: "Create a draft job posting"
method: POST
path: "/v1/job_postings"
tags: ["Job Postings"]
---

# Create a draft job posting

`POST /v1/job_postings`

## Request

- Base URL: `https://api.yardstick.team`
- URL: `https://api.yardstick.team/v1/job_postings`
- Auth: HTTP bearer

Create a draft job posting

**Required scopes:** `job_postings:write`

The interview plan must already be attached to a Job. An unattached plan is rejected with HTTP 409 `interview_plan_not_linked_to_job`; attach it first via `POST /v1/jobs/{job_id}/actions/attach_artifact` with `artifact_type=interview_plan`.

**Example (curl):**

```bash
curl -X POST https://api.yardstick.team/v1/job_postings \
  -H 'Authorization: Bearer ys_sk_live_…' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: 7c3a…' \
  -d '{"title":"Account Executive","interview_plan_id":"ipd_…","slug":"account-executive"}'
```

**Example (TypeScript):**

```ts
await fetch("https://api.yardstick.team/v1/job_postings", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.YS_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    title: "Account Executive",
    interview_plan_id: "ipd_…",
    slug: "account-executive",
  }),
});
```

## Headers

- `Idempotency-Key` string
- `X-Request-Id` string

## Request body

- object
  - `title` string, required
  - `interview_plan_id` string, required
  - `slug` string, required
  - `department` string
  - `group_id` string, uuid
  - `location` string
  - `location_type` 'remote' | 'hybrid' | 'onsite'
  - `location_country` string: Assigned ISO 3166-1 alpha-2 country code. Lowercase input is accepted and normalized to uppercase.
  - `salary_min` integer
  - `salary_max` integer
  - `salary_currency` string
  - `salary_display` boolean
  - `description` string
  - `requirements` string
  - `custom_questions` object[]
    - `id` string, required
    - `question` string, required
    - `type` 'text' | 'textarea' | 'single-select' | 'yes-no', required
    - `required` boolean, required
    - `options` string[]

## Response `201`

Created

- JobPosting: Canonical job posting record. Status is derived from is_published / published_at / archived_at.
  - `id` string, required: Display id, e.g. `jp_<base32>`
  - `object` 'job_posting', required
  - `status` 'draft' | 'unpublished' | 'published' | 'archived', required: Derived from is_published / published_at / archived_at.
  - `title` string, nullable, required
  - `slug` string, required
  - `department` string, nullable, required
  - `location` string, nullable, required
  - `location_type` string, nullable, required
  - `location_country` string, nullable, required: Assigned ISO 3166-1 alpha-2 country code for the posting location. Drafts may be null; every new publish or republish requires a country, including remote roles.
  - `salary_min` number, nullable, required
  - `salary_max` number, nullable, required
  - `salary_currency` string, nullable, required
  - `salary_display` boolean, nullable, required
  - `description` string, nullable, required
  - `requirements` string, nullable, required
  - `custom_questions` unknown
  - `interview_plan_id` string, required: Display id of the bound interview plan (`ipd_<base32>`).
  - `is_published` boolean, required
  - `published_at` string, nullable, required: ISO-8601 UTC
  - `archived_at` string, nullable, required: ISO-8601 UTC
  - `public_url` string, nullable, required: Canonical public job board URL when published in live mode; uses PUBLIC_JOB_BOARD_BASE_URL with root jobs-board paths, falls back to PUBLIC_APP_BASE_URL with /careers paths, then defaults to https://jobs.yardstick.team. Null for drafts, archived postings, and test-mode postings.
  - `applications_count` integer, nullable, required: Application count populated on retrieve-by-id; null on list responses to bound query cost.
  - `livemode` boolean, required
  - `created_at` string, nullable, required: ISO-8601 UTC
  - `updated_at` string, nullable, required: ISO-8601 UTC

## Other responses

- `400`: Invalid request
- `401`: Authentication failure
- `403`: Permission denied (scope or feature flag)
- `404`: Resource not found. The error uses the resource-specific code and param names the exact body field or path parameter that referenced it.
- `409`: Conflict (e.g. idempotency key reuse with different body)
- `429`: Rate limited
- `500`: Internal error

---

[API](https://skmtc.dev/yardstick/apis/yardstick-public-api.md) · [All operations](https://skmtc.dev/yardstick/apis/yardstick-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/yardstick/apis/yardstick-public-api/revisions/bef1d2eaaaa1?raw)
