# Add tags

> Add one or more tags to a contact.

Source: https://docs.mycrmsim.com/docs/contacts/add-contact-tags

```http
POST https://backend.mysmsgateway.app/api/v1/ext/contacts/{id}/tags
```

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

Tags already on the contact are kept; adding one it has is a no-op. Up to 50 tags per call, 100 characters each. Adding a tag can start workflows that trigger on it, as in the dashboard.

**AI agent tags.** A contact can carry one AI agent tag. Adding a different one answers **409** `agent_tag_conflict`; send `agent_tag_resolution` `"replace"` to swap it or `"skip"` to keep the old one.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | number | yes | The contact id. Example: `1234` |
| `tags` | body | array<string> | yes | Tag names. Example: `["vip","demo-booked"]` |
| `agent_tag_resolution` | body | enum | no | Only when the request adds an AI agent tag and the contact has a different one. One of: `replace`, `skip`. |

## Request body

```json
{
  "tags": [
    "vip",
    "demo-booked"
  ]
}
```

## Response 200

OK — the contact's tags now

```json
{
  "success": true,
  "message": "Tags added",
  "data": {
    "contact_id": 1234,
    "tags": [
      "lead",
      "vip",
      "demo-booked"
    ]
  }
}
```

## Response 400

No tags

```json
{
  "success": false,
  "message": "tags is required — an array of tag names."
}
```

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

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

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

## Response 409

A different AI agent tag is already on the contact

```json
{
  "success": false,
  "code": "agent_tag_conflict",
  "message": "This contact already has a different AI agent tag (a contact can carry one). Send agent_tag_resolution \"replace\" to swap it, or \"skip\" to keep it.",
  "data": {
    "conflicts": []
  }
}
```
