# Create a tag

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

## `POST /tags`

**Create a tag**

Creates a new tag. The slug is auto-generated from the name if not
provided. Tag names must be unique per site and locale.

Required permissions: `tags.create`

### Request Body

Content-Type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | Required. Display name. 1-255 characters |
| `slug` | string | Yes | Required. URL-friendly identifier, unique per site and locale. 1-255 characters |
| `locale` | string | No | BCP 47 locale code (e.g. "en", "fr") |


### Responses

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


### Examples

```bash
curl -X POST https://api.lynkow.com/v1/tags \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "TypeScript",
    "description": "Articles about TypeScript"
  }'
```

### Response Example

```json
{
  "data": {
    "id": 10,
    "name": "TypeScript",
    "slug": "typescript",
    "description": "Articles about TypeScript",
    "locale": "en",
    "contentCount": 0,
    "createdAt": "2025-04-06T12:00:00.000Z",
    "updatedAt": "2025-04-06T12:00:00.000Z"
  }
}
```

---