> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.taigabilling.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.taigabilling.com/_mcp/server.

# Pre Encounter Tags V 1 Create

POST https://api.taigabilling.com/tags/v1
Content-Type: application/json

Adds a new tag if it does not already exist, otherwise, returns the existing tag.

Reference: https://docs.taigabilling.com/api-reference/pre-encounter-tags-v-1/pre-encounter-tags-v-1-create

## Authentication

- `Authorization` header (bearer token, required) — Send your Taiga API key as a Bearer token. Create and manage keys in the Taiga developer portal.

## Servers

- `https://api.taigabilling.com` (Production, default)
- `https://api-staging.taigabilling.com` (Staging)

## Request

### Body (application/json)

This endpoint expects a pre-encountertagsv1MutableTag.

- `value` (string, required)
- `description` (string, optional, nullable)
- `alert` (boolean, optional, nullable)

## Response

### 200

- `deactivated` (boolean, required) — True if the object is deactivated. Deactivated objects are not returned in search results but are returned in all other endpoints including scan.
- `id` (string, required) — The unique identifier for a Tag.
- `organization_id` (string, required) — The organization that owns this object.
- `updated_at` (datetime, required)
- `updating_user_id` (string, required) — The user ID of the user who last updated the object.
- `value` (string, required)
- `version` (integer, required) — The version of the object. Any update to any property of an object object will create a new version.
- `alert` (boolean, optional, nullable)
- `description` (string, optional, nullable)

## Examples

**Request**

```json
{
  "value": "string"
}
```

**Response**

```json
{
  "deactivated": true,
  "id": "string",
  "organization_id": "string",
  "updated_at": "2024-01-15T09:30:00Z",
  "updating_user_id": "string",
  "value": "string",
  "version": 1,
  "alert": true,
  "description": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.taigabilling.com/tags/v1"

payload = { "value": "string" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```