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

# Update an entity

> Partially updates an entity's name, type, classification flags and group; setting the group to null removes it from its group. Renaming also regenerates the slug and adds the new name as an alias, keeping the old one so past mentions still resolve.



## OpenAPI

````yaml https://api.mentionlab.io/api/docs-json patch /api/entities/{id}
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}:
    patch:
      tags:
        - Entities
      summary: Update an entity
      description: >-
        Partially updates an entity's name, type, classification flags and
        group; setting the group to null removes it from its group. Renaming
        also regenerates the slug and adds the new name as an alias, keeping the
        old one so past mentions still resolve.
      operationId: EntitiesRefController_update
      parameters:
        - name: id
          required: true
          in: path
          description: The UUID of the entity to update.
          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/UpdateEntityDto'
      responses:
        '204':
          description: ''
        '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:
    UpdateEntityDto:
      type: object
      properties:
        name:
          type: string
          description: Display name of the entity
          example: Acme Corporation
        type:
          type: string
          description: Type/category of the entity
          enum:
            - brand
            - person
            - company
            - other
          example: brand
        isOwned:
          type: boolean
          description: Whether this entity belongs to (is owned by) the current project
          example: true
        isPrimary:
          type: boolean
          description: Whether this entity is the project's primary entity
          example: false
        isCompetitor:
          type: boolean
          description: Whether this entity is tracked as a competitor
          example: false
        isBlacklisted:
          type: boolean
          description: >-
            Whether this entity is blacklisted and should be excluded from
            tracking
          example: false
        groupId:
          type: string
          description: >-
            UUID of the entity group to assign this entity to. Pass null to
            remove the entity from its current group.
          nullable: true
          example: 3f9a8b2c-1d4e-4f6a-9b8c-7d6e5f4a3b2c
        domains:
          description: >-
            Complete set of domains associated with this entity (replace/sync).
            Each URL is normalised to a registrable root domain. Omit to leave
            domains untouched; pass an empty array to clear all. Used to drive
            the project-scoped "competitor" source category.
          example:
            - hubspot.com
            - hubspot.fr
          type: array
          items:
            type: string
    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

````