# Apply a draft

> POST /drafts/{id}/apply: Apply a draft

`POST https://usedocs.app/v1/drafts/{id}/apply`

Approves it: an edit updates its article (live at once on a live article); a new article or a draft from customer questions is published. For an edit you can send the text you want instead.

```bash
curl -X POST "https://usedocs.app/v1/drafts/edit_123/apply" \
  -H "Authorization: Bearer $USEDOCS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Authentication

Bearer token (`content:write`): A workspace API key: ud_live_…

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | `string` | Yes | Draft id: edit_…, article_…, or gap_…. |
| `bot_id` | query | `string` |  | Only for a key that covers several bots (see GET /bots). Or send the Usedocs-Bot header. |

## Request body

Required, `application/json`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `title` | `string` |  |  |
| `contentMarkdown` | `string` |  | Edits only: apply this text instead of the proposal. |

## Responses

| Status | Description |
| --- | --- |
| `200` | Applied. |
| `400` | The request is missing something or has a bad value. |
| `401` | No API key, or the key is revoked. |
| `402` | The workspace is paused; reads still work. |
| `403` | A read key on a write, or a key for another bot. |
| `404` | Not found. |
| `429` | Rate limited: 120 requests a minute per key, 30 tasks an hour. See Retry-After. |

## Response fields

| Field | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `status` | `string` |  |