> For the complete Lynkow documentation index in agent-friendly format, see [llms.txt](/llms.txt).

# Set a site block's status

**Publié le** : 2026-07-04
**Catégorie** : Core CMS

## `POST /site-blocks/:slug/status`

**Set a site block's status**

Sets the block status. The body `{ status }` accepts `published` (make
the block visible via the public API) or `draft` (hide it while
preserving its data).

Required permissions: `site_blocks.publish`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `slug` | path | string | Yes | URL-friendly identifier, unique per site and locale |


### Responses

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


### Examples

```bash
curl -X POST https://api.lynkow.com/v1/site-blocks/sidebar/status \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"status": "published"}'
```

### Response Example

```json
{
  "data": {
    "id": "243a9fd4-f1a3-561d-ac3b-2193f643de4d",
    "name": "Sidebar",
    "slug": "sidebar",
    "type": "global",
    "status": "published",
    "locale": "en",
    "updatedAt": "2025-04-06T15:00:00.000Z"
  }
}
```

---