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

# Create a new tag

> Create a new tag.



## OpenAPI

````yaml /openapi/admin.json post /tags
openapi: 3.1.0
info:
  title: Nudj Admin API
  version: 1.0.0
servers:
  - url: https://{subdomain}.nudj.cx/api/v2/admin
    description: Organization API Server
    variables:
      subdomain:
        description: Your organization's subdomain (required)
        default: your-org
security:
  - ApiToken: []
paths:
  /tags:
    post:
      tags:
        - Tag
      summary: Create a new tag
      description: Create a new tag.
      operationId: createTag
      parameters:
        - in: header
          name: x-language
          description: >-
            The language for the initial content of the tag. If not provided,
            the default language for the organisation will be used.
          schema:
            type: string
            description: >-
              The language for the initial content of the tag. If not provided,
              the default language for the organisation will be used.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                value:
                  type: string
                  minLength: 1
                  description: The value of the tag
                config:
                  $ref: '#/components/schemas/TagConfig'
              required:
                - value
              description: The input required to create a tag
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag'
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
components:
  schemas:
    TagConfig:
      type: object
      properties:
        filtering:
          type: array
          items:
            type: string
            enum:
              - achievement
              - action
              - community
              - challenge
              - leaderboard
              - post
              - reward
              - reward-asset
              - reward-entry
          description: The filtering options for the tag
        display:
          type: array
          items:
            type: string
            enum:
              - achievement
              - action
              - community
              - challenge
              - leaderboard
              - post
              - reward
              - reward-asset
              - reward-entry
          description: The display options for the tag
        iconifyIcon:
          type:
            - string
            - 'null'
          description: The iconify icon for the tag
      required:
        - filtering
        - display
      title: TagConfig
      description: The configuration of a tag
    Tag:
      type: object
      properties:
        id:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: The id of the tag
        organisationId:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: The id of the organisation the tag belongs to
        value:
          type: string
          minLength: 1
          description: The value of the tag
        config:
          $ref: '#/components/schemas/TagConfig'
        createdAt:
          type: string
          description: The date the tag was created
        updatedAt:
          type: string
          description: The date the tag was last updated
        createdBy:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: The id of the user who created the tag
        updatedBy:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: The id of the user who last updated the tag
      required:
        - id
        - organisationId
        - value
        - config
        - createdAt
        - updatedAt
        - createdBy
        - updatedBy
      description: A tag
      title: Tag
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Invalid input data
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Error
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Internal server error
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Error
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []
  securitySchemes:
    ApiToken:
      type: apiKey
      in: header
      name: x-api-token

````