# Create a single type

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

## `POST /single-types`

**Create a single type**

Creates a new single type. The slug must be unique and is used as
the permanent identifier (it cannot be changed after creation).

Required permissions: `single_types.create`

### Request Body

Content-Type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `slug` | string | Yes | Required. URL-friendly identifier, unique per site and locale. 1-100 characters |
| `name` | string | Yes | Required. Display name. 1-255 characters |
| `description` | string | No | Description text |
| `data` | object | Yes | Required. Resource data object |
| `schema` | object | No | Field schema definition |


### 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/single-types \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Terms of Service",
    "slug": "terms-of-service",
    "bodyMarkdown": "# Terms of Service\n\nLast updated: April 2025."
  }'
```

### Response Example

```json
{
  "data": {
    "slug": "terms-of-service",
    "name": "Terms of Service",
    "bodyHtml": "<h1>Terms of Service</h1><p>Last updated: April 2025.</p>",
    "locale": "en",
    "createdAt": "2025-04-06T12:00:00.000Z",
    "updatedAt": "2025-04-06T12:00:00.000Z"
  }
}
```

---