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

# Create a tag

> Create a new color-coded tag.



## OpenAPI

````yaml openapi.json POST /api/v1/tags
openapi: 3.1.0
info:
  title: Posttu API
  version: 1.0.0
  description: >-
    Posttu V1 REST API — Workflow automation, social-media post management,
    inbox, tags, and calendar.
servers:
  - url: https://posttu.com
    description: Production
security: []
paths:
  /api/v1/tags:
    post:
      tags:
        - Tags
      summary: Create a tag
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTag'
      responses:
        '200':
          description: Created tag
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagCreateResponse'
        '401':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CreateTag:
      type: object
      properties:
        name:
          type: string
          description: Tag name
          example: Important
        color:
          type: string
          description: Hex color code
          example: '#FF5733'
      required:
        - name
        - color
    TagCreateResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              description: Created tag ID
              example: tag_new123
            name:
              type: string
              description: Tag name
            color:
              type: string
              description: Hex color code
            createdAt:
              type: string
              format: date-time
              description: Creation timestamp
          required:
            - id
            - name
            - color
            - createdAt
        success:
          type: boolean
          description: Success status
        error:
          type: string
          description: Error message
      required:
        - data
        - success
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: 'Pass your API key via the Authorization header: `Bearer <api-key>`'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.