# Set content status

**Publié le** : 2026-05-08
**Catégorie** : Core CMS

## `POST /contents/:id/status`

**Set content status**

Unified status transition. Accepts the target status and, when
scheduling a publication, the target date. Every transition runs the
matching side effects (auto-redirects, CDN purge, search reindexing,
IndexNow/Google Indexing on publish, webhooks, audit log).

Required permissions: `contents.publish`, `contents.update`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | Yes | Unique identifier |


### Responses

| Status | Description |
| --- | --- |
| `200` | Successful response |
| `401` | Unauthorized — invalid or missing API token |
| `403` | Forbidden — insufficient permissions |
| `404` | Not found |
| `422` | Validation error |


> **Notes:** - `status` values: `draft`, `published`, `scheduled`, `archived`.
> 
> - `scheduledAt` is required and must be in the future when `status` is `scheduled`. It is cleared automatically for any other status.
> - Permissions: `contents.publish` (or `_own`) is required for `published`. Any other transition requires `contents.update` (or `_own`).
> - Webhooks: `content.published`, `content.unpublished`, `content.scheduled`, `content.archived`.

### Examples

```bash
# Schedule a publication
curl -X POST https://api.lynkow.com/v1/contents/42/status \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"status": "scheduled", "scheduledAt": "2026-06-01T09:00:00Z"}'
```

```bash
# Archive
curl -X POST https://api.lynkow.com/v1/contents/42/status \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"status": "archived"}'
```

### Response Example

```json
{
  "id": 42,
  "title": "Getting Started with Lynkow",
  "slug": "getting-started-with-lynkow",
  "status": "scheduled",
  "scheduledAt": "2026-06-01T09:00:00.000Z",
  "publishedAt": null
}
```

---