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

# Add an alias to an entity

> Adds a new alias to the entity; aliases are unique per project, so adding one that already exists returns 409 Conflict.



## OpenAPI

````yaml https://api.mentionlab.io/api/docs-json post /api/entities/{id}/aliases
openapi: 3.0.0
info:
  title: MentionLab Public API v0.3.4-rc
  description: ''
  version: 0.3.4-rc
  contact: {}
servers:
  - url: https://api.mentionlab.io
security: []
tags: []
paths:
  /api/entities/{id}/aliases:
    post:
      tags:
        - Entities
      summary: Add an alias to an entity
      description: >-
        Adds a new alias to the entity; aliases are unique per project, so
        adding one that already exists returns 409 Conflict.
      operationId: EntitiesRefController_addAlias
      parameters:
        - name: id
          required: true
          in: path
          description: The UUID of the entity to add the alias to.
          schema:
            type: string
            format: uuid
        - name: x-project-id
          in: header
          description: Project ID to specify the project context
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddAliasDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityAliasResponse'
        '400':
          description: >-
            The request failed validation — the body, query or path parameters
            are malformed or out of range.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: The request is missing valid authentication credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '403':
          description: >-
            The authenticated principal lacks the required permission, or access
            to the requested organisation/project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
components:
  schemas:
    AddAliasDto:
      type: object
      properties:
        alias:
          type: string
          description: Alias text
          example: Samsung Electronics
      required:
        - alias
    EntityAliasResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        alias:
          type: string
        source:
          type: string
          enum:
            - llm
            - manual
      required:
        - id
        - alias
        - source
    ApiErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code of the error.
          example: 400
        message:
          type: string
          description: >-
            Human-readable description of the error. Validation failures return
            an array of per-field validation errors instead of a single string.
          example: Validation failed
        error:
          type: string
          description: Short name of the HTTP error.
          example: Bad Request
      required:
        - statusCode

````