---
title: "Preview prospect conversion to an application"
method: POST
path: "/v1/prospects/{prospect_id}/actions/convert_to_application/preview"
tags: ["Other"]
---

# Preview prospect conversion to an application

`POST /v1/prospects/{prospect_id}/actions/convert_to_application/preview`

## Request

- Base URL: `https://api.yardstick.team`
- URL: `https://api.yardstick.team/v1/prospects/{prospect_id}/actions/convert_to_application/preview`
- Auth: HTTP bearer

Preview prospect conversion to an application

**Required scopes:** `prospects:read`, `prospects:write`, `applications:write`

Previews conversion without writing. An unavailable Prospect returns 404 `prospect_not_found` with `param: prospect_id`; an unavailable target Job Posting returns 404 `job_posting_not_found` with `param: job_posting_id`. Use a fresh `Idempotency-Key` after resolving blockers.

**Example (curl):**

```bash
curl -X POST https://api.yardstick.team/v1/prospects/pro_abc123/actions/convert_to_application/preview \
  -H 'Authorization: Bearer ys_sk_live_…' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: 7c3a…' \
  -d '{"job_posting_id":"jp_xyz789"}'
```

**Example (TypeScript):**

```ts
await fetch("https://api.yardstick.team/v1/prospects/pro_abc123/actions/convert_to_application/preview", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.YS_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({ job_posting_id: "jp_xyz789" }),
});
```

## Headers

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

## Request body

- object
  - `job_posting_id` string, required
  - `source_label` string, nullable
  - `note` string, nullable

## Response `200`

Success

- object

## 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/35b5a6e88b35?raw)
