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

# Recompute the project-scoped source-domain relationships

> Recomputes each cited source domain's relationship (owned / competitor / partner_affiliate; absence ⇒ independent) for the project from the current entity-domain mappings; a manual trigger to run after editing owned/competitor/partner entities or their domains.



## OpenAPI

````yaml https://api.mentionlab.io/api/docs-json post /api/entities/recompute-relationships
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/recompute-relationships:
    post:
      tags:
        - Entities
      summary: Recompute the project-scoped source-domain relationships
      description: >-
        Recomputes each cited source domain's relationship (owned / competitor /
        partner_affiliate; absence ⇒ independent) for the project from the
        current entity-domain mappings; a manual trigger to run after editing
        owned/competitor/partner entities or their domains.
      operationId: EntitiesRefController_recomputeRelationships
      parameters:
        - name: x-project-id
          in: header
          description: Project ID to specify the project context
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecomputeRelationshipsResultResponse'
        '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:
    RecomputeRelationshipsResultResponse:
      type: object
      properties:
        added:
          type: number
          description: Number of relationship rows added
          example: 4
        removed:
          type: number
          description: Number of stale relationship rows removed
          example: 1
        total:
          type: number
          description: Total relationship rows after recompute
          example: 7
      required:
        - added
        - removed
        - total
    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

````