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

# Unmerge profiles

> Splits a handle away from its current profile, with actor and reason recorded.



## OpenAPI

````yaml openapi/en/cell.json POST /v1/identity/unmerge
openapi: 3.1.0
info:
  title: Niadra data API
  version: '1'
  description: >-
    Writing, context, history, objects, identity, privacy and governance of one
    space. Every space has a stable address, with the space and the region in
    its name.
servers:
  - url: https://{space}.{region}.api.niadra.com
    variables:
      space:
        default: acme-prod
        description: The space, which comes in the source key.
      region:
        default: us-east-1
        description: The region of the space, which also comes in the key.
security: []
paths:
  /v1/identity/unmerge:
    post:
      tags:
        - identity
      summary: Unmerge profiles
      description: >-
        Splits a profile by retracting the assertions that connect some of its
        handles: name the handles to move out, or the assertions to retract. The
        component is recomputed and may split into several profiles; facts,
        objects and patterns follow their handle of origin, and the affected
        packs are recompiled.


        **Authentication.** Console person token with the `security`,
        `integration` role (or admin), or a source key with the `admin` scope.
      operationId: unmerge_v1_identity_unmerge_post
      parameters:
        - in: header
          name: Idempotency-Key
          required: true
          schema:
            maxLength: 256
            minLength: 1
            title: Idempotency-Key
            type: string
          description: >-
            Required. Kept 24 hours with the hash of the body: a retry with the
            same key returns the first answer, and the same key with a different
            body returns 409 `conflict`.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnmergeIn'
            example:
              profile_id: 0192f7a1-5b10-7c3a-8e21-4d2f8a4c0e01
              handle_ids:
                - 0192f7a1-5b10-7c3a-8e21-4d2f8a4c0e0c
              assertion_ids: []
              reason: Store e-mail used by several customers
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationOut'
              example:
                op_id: 0192f7a1-5b10-7c3a-8e21-4d2f8a4c0e07
                status: queued
                assertion_id: null
                link_id: null
          description: The operation, queued or applied.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - sourceKey: []
        - personToken: []
components:
  schemas:
    UnmergeIn:
      additionalProperties: false
      properties:
        assertion_ids:
          items:
            format: uuid
            type: string
          maxItems: 200
          title: Assertion Ids
          type: array
        handle_ids:
          items:
            format: uuid
            type: string
          maxItems: 200
          title: Handle Ids
          type: array
        profile_id:
          format: uuid
          title: Profile Id
          type: string
        reason:
          anyOf:
            - maxLength: 500
              minLength: 1
              type: string
            - type: 'null'
          title: Reason
      required:
        - profile_id
      title: UnmergeIn
      type: object
    OperationOut:
      additionalProperties: false
      properties:
        assertion_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Assertion Id
        link_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Link Id
        op_id:
          format: uuid
          title: Op Id
          type: string
        status:
          enum:
            - queued
            - applied
            - linked
            - blocked
          title: Status
          type: string
      required:
        - op_id
        - status
      title: OperationOut
      type: object
    Problem:
      additionalProperties: false
      description: RFC 9457 problem details; `code` comes from the versioned error catalog.
      properties:
        code:
          title: Code
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Detail
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Request Id
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
        type:
          default: about:blank
          title: Type
          type: string
      required:
        - title
        - status
        - code
      title: Problem
      type: object
  securitySchemes:
    sourceKey:
      type: http
      scheme: bearer
      description: nia_sk_...
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````