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

# Create Tag

> Create a new tag in this team.



## OpenAPI

````yaml /openapi/mio-openapi.json post /api/v1/teams/{team_id}/tags
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/teams/{team_id}/tags:
    post:
      tags:
        - tags-admin
      summary: Create Tag
      description: Create a new tag in this team.
      operationId: tags_admin.post_tags_admin_post_teams_by_team_id_tags
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/TagCreateEnvelope'
        required: true
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/TagResponse'
          description: Successful Response
        '400':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Validation error
        '401':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Not authenticated
        '403':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Forbidden
        '404':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Resource not found
        '409':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Conflict (slug or assignment already exists)
        '415':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Unsupported media type (requires application/vnd.api+json)
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Unprocessable entity
      security:
        - HTTPBearer: []
components:
  schemas:
    TagCreateEnvelope:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/TagCreateResource'
      required:
        - data
      title: TagCreateEnvelope
      type: object
    TagResponse:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/TagResource'
      required:
        - data
      title: TagResponse
      type: object
    JsonApiErrorResponse:
      description: Error JSON:API response.
      properties:
        errors:
          items:
            $ref: '#/components/schemas/JsonApiError'
          title: Errors
          type: array
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - errors
      title: JsonApiErrorResponse
      type: object
    TagCreateResource:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/TagCreateAttributes'
        type:
          const: tags
          title: Type
          type: string
      required:
        - type
        - attributes
      title: TagCreateResource
      type: object
    TagResource:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/TagAttributes'
        id:
          title: Id
          type: string
        type:
          const: tags
          default: tags
          title: Type
          type: string
      required:
        - id
        - attributes
      title: TagResource
      type: object
    JsonApiError:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        source:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Source
        status:
          title: Status
          type: string
        title:
          title: Title
          type: string
      required:
        - status
        - title
      title: JsonApiError
      type: object
    TagCreateAttributes:
      additionalProperties: false
      properties:
        color:
          anyOf:
            - pattern: ^#[0-9A-Fa-f]{6}$
              type: string
            - type: 'null'
          title: Color
        description:
          anyOf:
            - maxLength: 1000
              type: string
            - type: 'null'
          title: Description
        name:
          maxLength: 100
          minLength: 1
          title: Name
          type: string
        slug:
          maxLength: 100
          minLength: 1
          pattern: ^[a-z0-9][a-z0-9_-]*$
          title: Slug
          type: string
      required:
        - name
        - slug
      title: TagCreateAttributes
      type: object
    TagAttributes:
      additionalProperties: false
      properties:
        color:
          anyOf:
            - type: string
            - type: 'null'
          title: Color
        created_at:
          format: date-time
          title: Created At
          type: string
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
        deleted_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Deleted At
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        name:
          title: Name
          type: string
        slug:
          title: Slug
          type: string
        team_id:
          title: Team Id
          type: string
        updated_at:
          format: date-time
          title: Updated At
          type: string
      required:
        - team_id
        - name
        - slug
        - color
        - description
        - created_by
        - created_at
        - updated_at
        - deleted_at
      title: TagAttributes
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````