# Create tag

> Add a tag to the library.

Source: https://docs.mycrmsim.com/docs/tags/create-tag

```http
POST https://backend.mysmsgateway.app/api/v1/ext/tags
```

- Category: myCRMSIM Contacts / Tags
- Auth: Bearer access token
- Scope: `contacts.write`

Up to 100 characters. Creating a name the workspace already has answers **200** with the existing tag (201 when it is new), so the call is safe to repeat. The library row makes the tag available in pickers; it does not tag any contact — use *Add tags* on a contact for that.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspace_id` | body | number | yes | The workspace. Example: `7` |
| `name` | body | string | yes | The tag. Example: `vip` |

## Request body

```json
{
  "workspace_id": 7,
  "name": "vip"
}
```

## Response 201

Created

```json
{
  "success": true,
  "message": "Tag created",
  "data": {
    "id": 310,
    "workspace_id": 7,
    "name": "vip",
    "source": "library",
    "created_at": "2026-11-04T02:10:00.000Z",
    "updated_at": "2026-11-04T02:10:00.000Z"
  }
}
```

## Response 200

The name was already in the library

```json
{
  "success": true,
  "message": "Tag already exists",
  "data": {
    "id": 310,
    "workspace_id": 7,
    "name": "vip",
    "source": "library",
    "created_at": "2026-11-04T02:10:00.000Z",
    "updated_at": "2026-11-04T02:10:00.000Z"
  }
}
```

## Response 400

No name, or over 100 characters

```json
{
  "success": false,
  "message": "name is required."
}
```

## Response 401

Missing or invalid token

```json
{
  "success": false,
  "message": "Invalid or expired access token."
}
```

## Response 403

Missing scope

```json
{
  "success": false,
  "message": "Missing scope(s): contacts.write. This integration was granted: …"
}
```

## Response 404

Workspace does not exist or is not owned by the installer (same response for both)

```json
{
  "success": false,
  "message": "Workspace not found or not accessible to this token"
}
```
