# Get content by slug

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

## `GET /contents/slug/:slug`

**Get content by slug**

Retrieves a single content by its URL slug. Useful when you know the
slug but not the numeric ID (e.g., from a URL path).

Returns the full content including HTML body, categories, tags, SEO
metadata, and structured data.

Required permissions: `contents.view`

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


### Examples

```bash
curl https://api.lynkow.com/v1/contents/slug/getting-started-with-lynkow \
  -H "Authorization: Bearer $API_TOKEN"
```

### Response Example

```json
{
  "data": {
    "id": 42,
    "title": "Getting Started with Lynkow",
    "slug": "getting-started-with-lynkow",
    "type": "post",
    "status": "published",
    "excerpt": "Learn how to set up your first headless CMS.",
    "bodyHtml": "<h1>Welcome</h1><p>This is your first article...</p>",
    "locale": "en",
    "featuredImage": {
      "url": "https://cdn.lynkow.com/sites/abc123/hero.jpg",
      "alt": "Lynkow dashboard screenshot"
    },
    "categories": [
      {
        "id": 1,
        "name": "Tutorials",
        "slug": "tutorials"
      }
    ],
    "tags": [
      {
        "id": 5,
        "name": "Getting Started",
        "slug": "getting-started"
      }
    ],
    "meta": {
      "metaTitle": "Getting Started with Lynkow | My Blog",
      "metaDescription": "A step-by-step guide to setting up Lynkow.",
      "canonicalUrl": null,
      "ogImage": null
    },
    "author": {
      "id": 1,
      "fullName": "Jane Doe"
    },
    "publishedAt": "2025-03-15T10:30:00.000Z",
    "createdAt": "2025-03-14T08:00:00.000Z",
    "updatedAt": "2025-03-15T10:30:00.000Z"
  }
}
```

---