> ## 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.

# Create a new entity

> Creates a new entity (brand, person, company, or other) in the project, automatically generating a default alias from its name.



## OpenAPI

````yaml https://api.mentionlab.io/api/docs-json post /api/entities
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:
    post:
      tags:
        - Entities
      summary: Create a new entity
      description: >-
        Creates a new entity (brand, person, company, or other) in the project,
        automatically generating a default alias from its name.
      operationId: EntitiesRefController_create
      parameters:
        - 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/CreateEntityDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityResponse'
        '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:
    CreateEntityDto:
      type: object
      properties:
        name:
          type: string
          description: Entity name
          example: Samsung
        type:
          type: string
          description: Entity type
          enum:
            - brand
            - person
            - company
            - other
          default: brand
        isOwned:
          type: boolean
          description: Is this entity owned by the project
          example: true
        isPrimary:
          type: boolean
          description: Is this the primary entity
          example: false
        isCompetitor:
          type: boolean
          description: Is this a competitor entity
          example: false
        isBlacklisted:
          type: boolean
          description: Is this entity blacklisted
          example: false
        groupId:
          type: string
          description: Entity group ID
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - name
    EntityResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        slug:
          type: string
        type:
          type: string
          enum:
            - brand
            - person
            - company
            - other
        isOwned:
          type: boolean
        isPrimary:
          type: boolean
        isCompetitor:
          type: boolean
        isBlacklisted:
          type: boolean
        group:
          $ref: '#/components/schemas/EntityGroupRef'
        domains:
          description: Domains mapped to this entity (project-scoped).
          type: array
          items:
            $ref: '#/components/schemas/EntityDomainRef'
        canonicalId:
          type: string
          format: uuid
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
        - id
        - name
        - slug
        - type
        - isOwned
        - isPrimary
        - isCompetitor
        - isBlacklisted
        - domains
        - createdAt
        - updatedAt
    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
    EntityGroupRef:
      type: object
      properties:
        id:
          type: string
          format: uuid
        kind:
          type: string
          enum:
            - group
            - division
          description: Whether this container is a top-level group or a division.
        parent:
          type: string
          description: >-
            Parent group ID when this container is a division inside a group;
            null for top-level groups and standalone divisions. Lets the entity
            list render "Group › Division" without a second fetch.
          format: uuid
          nullable: true
        name:
          type: string
        slug:
          type: string
      required:
        - id
        - kind
        - name
        - slug
    EntityDomainRef:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The entity-domain mapping id.
        domain:
          type: string
          example: hubspot.com
          description: The mapped root domain.
      required:
        - id
        - domain

````