> ## Documentation Index
> Fetch the complete documentation index at: https://help.withallo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create tag

> Creates a new tag on the team. The tag key is auto-generated by slugifying the name.

<Note>
  **Required scope:** `TAGS_WRITE`
</Note>

## Behavior

Pass a display **name** — the tag **key** (its identifier in the rest of the API) is generated automatically by slugifying the name (lowercase, alphanumeric). For example `"Interested"` becomes the key `interested`.

* Names are case-insensitive. Creating `Support` when `support` already exists returns a `409` with code `TAG_ALREADY_EXISTS`.
* Names that describe a call outcome (e.g. `voicemail`, `missed call`, `busy`) are reserved and rejected with a `400` and code `TAG_NAME_IS_CALL_OUTCOME`.
* `color` is an optional hex string (max 7 characters, e.g. `#FF0000`).

The created tag's `id` is the generated key — use it to add the tag to calls or to delete it.

## Idempotency

This endpoint supports the `Idempotency-Key` header. If a request succeeds and you retry with the same key, the stored response is returned without re-executing the operation. See [Idempotency](/en/v2/api-reference/guides/error-handling#idempotency).


## OpenAPI

````yaml POST /v2/api/tags
openapi: 3.0.3
info:
  title: Allo API
  description: >-
    Allo API provides programmatic access to your Allo account, allowing you to
    manage webhooks, retrieve calls and contacts, and send SMS messages.


    All requests to `/v1/api/**` endpoints automatically go through quota
    checking and scope validation.
  version: 1.0.0
  contact:
    name: Allo Support
servers:
  - url: https://api.withallo.com
    description: Production server
security: []
tags:
  - name: Summary Templates
    description: >-
      Manage call summary templates that control how AI-generated call summaries
      are structured for your team.
  - name: Webhooks
    description: >-
      Manage webhook endpoints to receive real-time notifications about events
      in your Allo account. Each endpoint subscribes to one or more event topics
      and is verified with a signing secret.
  - name: Calls
    description: >-
      Retrieve and search call records with filtering and pagination. Filter
      calls by your Allo phone number.
  - name: Contacts
    description: >-
      Search and retrieve contact information with sorting and pagination.
      Includes engagement level tracking.
  - name: SMS
    description: Send SMS messages to phone numbers using your Allo numbers.
  - name: Phone Numbers
    description: Retrieve information about your Allo phone numbers.
  - name: Analytics
    description: Pre-computed call metrics, team performance, and outbound dial funnel
  - name: CRM
    description: Manage people, companies, and deals in your CRM.
paths:
  /v2/api/tags:
    post:
      tags:
        - Tags
      summary: Create tag
      description: >-
        Creates a new tag on the team. The tag key is auto-generated by
        slugifying the name.
      operationId: createTag
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 255
                  description: Tag display name. The key (identifier) is derived from it.
                  example: Interested
                color:
                  type: string
                  nullable: true
                  maxLength: 7
                  description: Optional hex color (e.g. `#FF0000`).
                  example: '#123456'
              required:
                - name
            example:
              name: Interested
              color: '#123456'
      responses:
        '201':
          description: Tag created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Tag'
              example:
                data:
                  id: interested
                  name: Interested
                  color: '#123456'
        '400':
          $ref: '#/components/responses/ApiValidationError'
        '401':
          $ref: '#/components/responses/ApiUnauthorized'
        '409':
          $ref: '#/components/responses/ApiConflict'
        '429':
          $ref: '#/components/responses/ApiRateLimited'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Tag:
      type: object
      properties:
        id:
          type: string
          example: tag-abc123
        name:
          type: string
          example: qualified
        color:
          type: string
          example: '#00AA00'
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            request_id:
              type: string
            retry_after_seconds:
              type: integer
              nullable: true
  responses:
    ApiValidationError:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiUnauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiConflict:
      description: Conflict with existing resource
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiRateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````