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

# Create an assertion

> States that two handles belong to the same subject, with method and evidence.



## OpenAPI

````yaml openapi/en/cell.json POST /v1/identity/assertions
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/assertions:
    post:
      tags:
        - identity
      summary: Create an assertion
      description: >-
        States that two or more handles belong to the same subject, with the
        method that proves it. The assertion goes through the same protections
        as the ones the ingestion makes: blocked values, limits per handle type,
        and never an automatic merge of two profiles that already hold a handle
        at V3 or above. The merge itself runs outside the request, so the answer
        is 202 with the operation.


        **Authentication.** Console person token with the `security`,
        `integration` role (or admin), or a source key with the `admin` scope.
      operationId: create_assertion_v1_identity_assertions_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/AssertionIn'
            example:
              handles:
                - type: phone_e164
                  value: '+14155550123'
                - type: system_id
                  value: '48213'
                  scope: crm
              method: system_import
              subject_kind: person
              reason: CRM contact record 48213
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationOut'
              example:
                op_id: 0192f7a1-5b10-7c3a-8e21-4d2f8a4c0e07
                status: queued
                assertion_id: 0192f7a1-5b10-7c3a-8e21-4d2f8a4c0e06
                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:
    AssertionIn:
      additionalProperties: false
      properties:
        handles:
          items:
            $ref: '#/components/schemas/Handle'
          maxItems: 2
          minItems: 2
          title: Handles
          type: array
        method:
          $ref: '#/components/schemas/AssertionMethod'
          default: explicit_identify
        reason:
          anyOf:
            - maxLength: 500
              minLength: 1
              type: string
            - type: 'null'
          title: Reason
        subject_kind:
          $ref: '#/components/schemas/SubjectKind'
          default: person
      required:
        - handles
      title: AssertionIn
      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
    Handle:
      additionalProperties: false
      description: >-
        An identifier of a subject in some channel or system: a phone, an
        e-mail, a CRM id.
      properties:
        scope:
          anyOf:
            - maxLength: 256
              minLength: 1
              type: string
            - type: 'null'
          description: >-
            Namespace for scoped identifiers: the WhatsApp Business account for
            `wa_bsuid`, the system for `system_id`, the country for
            `gov_id_hmac`.
          title: Scope
        subject_kind:
          anyOf:
            - $ref: '#/components/schemas/SubjectKind'
            - type: 'null'
          description: Defaults to `person`, except for organization-only handle types.
        type:
          $ref: '#/components/schemas/HandleType'
        value:
          maxLength: 320
          minLength: 1
          title: Value
          type: string
          description: >-
            The identifier. Normalized on the server: E.164 for phones,
            lowercase for e-mail.
      required:
        - type
        - value
      title: Handle
      type: object
    AssertionMethod:
      enum:
        - explicit_identify
        - otp
        - login
        - system_import
        - same_event
        - co_occurrence
        - channel_rotation
        - accepted_suggestion
        - external_resolver
        - declared
      title: AssertionMethod
      type: string
      description: How the link between two handles was established.
    SubjectKind:
      enum:
        - person
        - account
        - partner
      title: SubjectKind
      type: string
      description: >-
        A person, a customer organization (`account`) or an organization that
        takes part without being a customer (`partner`).
    HandleType:
      enum:
        - phone_e164
        - wa_id
        - wa_jid
        - wa_lid
        - wa_bsuid
        - email
        - gov_id_hmac
        - app_user_id
        - system_id
        - org_registry_hmac
        - email_domain
        - anon_id
      title: HandleType
      type: string
      description: >-
        The kind of identifier. The value is classified by its format, never by
        the field it came from.
  securitySchemes:
    sourceKey:
      type: http
      scheme: bearer
      description: nia_sk_...
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````