# Compare two revisions

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

## `GET /contents/:id/revisions/:revisionAId/compare/:revisionBId`

**Compare two revisions**

Returns a diff between two revisions of the same content. Useful for
reviewing what changed between versions.

Required permissions: `contents.view`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | Yes | Unique identifier |
| `revisionAId` | path | string | Yes | First revision ID (for comparison) |
| `revisionBId` | path | string | Yes | Second revision ID (for comparison) |


### Responses

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


### Examples

```bash
curl https://api.lynkow.com/v1/contents/42/revisions/300/compare/301 \
  -H "Authorization: Bearer $API_TOKEN"
```

### Response Example

```json
{
  "changes": {
    "title": {
      "before": "Getting Started with Lynkow",
      "after": "Updated Title"
    },
    "excerpt": {
      "before": null,
      "after": "Updated excerpt for the article."
    }
  }
}
```

---