# Update block data

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

## `PUT /site-blocks/:slug/data`

**Update block data**

Updates the field values for a site block. Data is validated against
the current schema. Only include fields you want to change.

Required permissions: `site_blocks.update`

### 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 |


> **Notes:** - Creates a new revision automatically.
> 
> - DataSource fields are read-only — they are resolved at read time.

### Examples

```bash
curl -X PUT https://api.lynkow.com/v1/site-blocks/header/data \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "tagline": "Build faster with Lynkow",
      "navLinks": [
        {"label": "Home", "url": "/"},
        {"label": "Blog", "url": "/blog"}
      ]
    }
  }'
```

### Response Example

```json
{
  "data": {
    "id": 1,
    "name": "Header",
    "slug": "header",
    "type": "global",
    "status": "published",
    "data": {
      "logo": {
        "url": "https://cdn.lynkow.com/sites/abc123/logo.svg",
        "alt": "Company Logo"
      },
      "tagline": "Build faster with Lynkow",
      "navLinks": [
        {
          "label": "Home",
          "url": "/"
        },
        {
          "label": "Blog",
          "url": "/blog"
        }
      ]
    },
    "updatedAt": "2025-04-06T14:30:00.000Z"
  }
}
```

---