---
title: "Start an export job"
method: POST
path: "/exports"
tags: ["Exports"]
---

# Start an export job

`POST /exports`

## Request

- Base URL: `https://yappy.biz/api/v1`
- URL: `https://yappy.biz/api/v1/exports`
- Auth: one of:
  - none
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://yappy.biz/oauth/authorize`, token URL `https://yappy.biz/oauth/token`; client credentials, token URL `https://yappy.biz/oauth/token`, scopes: `export:docs`)

Start an asynchronous export of a corpus — documentation, FAQ, or releases — as markdown or JSON. Returns 202 Accepted with a Location header and a Retry-After hint rather than blocking, so a large export never holds a connection open. Poll the job with getExport until its status is 'completed'.

## Headers

- `Idempotency-Key` string

## Request body

- ExportRequest: What to export, and in which format.
  - `resource` 'docs' | 'faq' | 'releases', required: Which corpus to export.
  - `format` 'markdown' | 'json': The artifact format.

## Response `202`

The job was accepted and is being prepared

- Job: An asynchronous export. Poll until status is completed, then read result.url.
  - `object` 'job', required: Type discriminator.
  - `id` string, required: Job identifier.
  - `status` 'queued' | 'running' | 'completed' | 'failed', required: Where the job is now.
  - `resource` string, required: What is being exported.
  - `format` string: The artifact format.
  - `created_at` string, date-time: When it was accepted.
  - `poll_url` string, uri, required: Where to poll this job.
  - `retry_after` integer: Seconds to wait before polling again.
  - `result` object, nullable: Present once status is completed.
    - `url` string, uri: The finished artifact.
    - `content_type` string: Media type of the artifact.
    - `item_count` integer: How many items it contains.
  - `error` object, nullable: Present once status is failed.

## Other responses

- `400`: The request was malformed
- `401`: The supplied credential is missing, expired, or invalid
- `403`: The credential is valid but lacks the required scope
- `409`: Same Idempotency-Key, different body
- `415`: The body was not application/json
- `429`: Too many requests
- `500`: Unexpected server error
- `503`: A dependency was unavailable

---

[API](https://skmtc.dev/yappy/apis/yappy-web-api.md) · [All operations](https://skmtc.dev/yappy/apis/yappy-web-api/llms.txt) · [OpenAPI document](https://skmtc.dev/yappy/apis/yappy-web-api/revisions/02b27cd526a7?raw)
