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

# Create label

> Create label.



## OpenAPI

````yaml /api-reference/openapi-v3.json post /labels
openapi: 3.1.0
info:
  title: Heyy API
  version: 3.0.0
servers:
  - url: https://api.heyy.io/v3
security:
  - bearerAuth: []
paths:
  /labels:
    post:
      summary: Create label
      description: Create label.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Label name.
                color:
                  type: string
                  description: Hex color for the label.
              required:
                - name
                - color
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                      name:
                        type: string
                      color:
                        type: string
                    required:
                      - id
                      - createdAt
                      - updatedAt
                      - name
                      - color
                    additionalProperties: false
                required:
                  - success
                  - data
                additionalProperties: false
          description: OK
        '400':
          $ref: '#/components/responses/ApiError400'
        '401':
          $ref: '#/components/responses/ApiError401'
        '402':
          $ref: '#/components/responses/ApiError402'
        '403':
          $ref: '#/components/responses/ApiError403'
        '404':
          $ref: '#/components/responses/ApiError404'
        '429':
          $ref: '#/components/responses/ApiError429'
        '500':
          $ref: '#/components/responses/ApiError500'
components:
  responses:
    ApiError400:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            success: false
            error:
              messageKey: invalid_body_params
              message: Invalid body params
              invalidParams:
                email:
                  key: invalid_string
                  message: Invalid email
      description: Bad request.
    ApiError401:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            success: false
            error:
              messageKey: unauthorized
              message: Unauthorized
      description: Unauthorized.
    ApiError402:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            success: false
            error:
              messageKey: insufficient_billing_plan
              message: Insufficient billing plan
      description: Payment required.
    ApiError403:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            success: false
            error:
              messageKey: forbidden
              message: Forbidden
      description: Forbidden.
    ApiError404:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            success: false
            error:
              messageKey: contact_not_found
              message: Contact not found
      description: Not found.
    ApiError429:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            success: false
            error:
              messageKey: too_many_requests
              message: >-
                Too many requests. Limit is applied per minute per tenant.
                Please retry after the time indicated by the X-RateLimit-Reset
                header.
      description: Too many requests.
    ApiError500:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            success: false
            error:
              messageKey: internal_error
              message: Oops! Something went wrong
      description: Internal server error.
  schemas:
    ApiErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
          description: Request success.
        error:
          type: object
          properties:
            messageKey:
              type: string
              description: Request message key.
            message:
              type: string
              description: Request message.
            invalidParams:
              type: object
              additionalProperties:
                type: object
                properties:
                  key:
                    type: string
                    description: Request key.
                  message:
                    type: string
                    description: Request message.
                required:
                  - key
                  - message
              description: Request invalid params object.
          description: Request error object.
      required:
        - success
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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