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

# Search profiles

> Finds profiles by handle, with the value in the body and never logged.



## OpenAPI

````yaml openapi/en/cell.json POST /v1/profiles/search
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/profiles/search:
    post:
      tags:
        - identity
      summary: Search profiles
      description: >-
        A read, so no receipt; the query is in the body and never logged.


        **Authentication.** Console person token with the `security`,
        `integration` role (or admin), or a source key with the `admin` scope.
      operationId: search_profiles_v1_profiles_search_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProfileSearchIn'
            example:
              query: '+14155550123'
              limit: 20
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfileSearchOut'
              example:
                items:
                  - profile_id: 0192f7a1-5b10-7c3a-8e21-4d2f8a4c0e01
                    pseudonym: p_7f3a91c2
                    kind: person
                    partial: false
                    handles:
                      - handle_id: 0192f7a1-5b10-7c3a-8e21-4d2f8a4c0e02
                        type: phone_e164
                        value: +1415555****
                        scope: ''
                        subject_kind: person
                        status: active
                        level: V1
                        first_seen: '2021-04-06T13:20:00Z'
                        last_seen: '2026-09-22T17:07:03Z'
                      - handle_id: 0192f7a1-5b10-7c3a-8e21-4d2f8a4c0e03
                        type: system_id
                        value: '48213'
                        scope: crm
                        subject_kind: person
                        status: active
                        level: V4
                        first_seen: '2021-04-06T13:21:00Z'
                        last_seen: '2026-09-22T17:07:03Z'
                    last_seen: '2026-09-22T17:07:03Z'
          description: The profiles found, with handles masked by the role of the reader.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - sourceKey: []
        - personToken: []
components:
  schemas:
    ProfileSearchIn:
      additionalProperties: false
      description: >-
        The value travels in the body. A pseudonym (`p_...`) or an identifier:
        phones, e-mails,

        WhatsApp ids and CPFs are recognized by format; opaque ids need `type`
        (and `scope` when scoped).
      properties:
        limit:
          default: 20
          maximum: 50
          minimum: 1
          title: Limit
          type: integer
        query:
          maxLength: 320
          minLength: 1
          title: Query
          type: string
        scope:
          anyOf:
            - maxLength: 256
              minLength: 1
              type: string
            - type: 'null'
          title: Scope
        type:
          anyOf:
            - $ref: '#/components/schemas/HandleType'
            - type: 'null'
      required:
        - query
      title: ProfileSearchIn
      type: object
    ProfileSearchOut:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/ProfileMatch'
          title: Items
          type: array
      required:
        - items
      title: ProfileSearchOut
      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
    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.
    ProfileMatch:
      additionalProperties: false
      properties:
        handles:
          description: Masked by the caller's role.
          items:
            $ref: '#/components/schemas/HandleOut'
          title: Handles
          type: array
        kind:
          $ref: '#/components/schemas/SubjectKind'
        last_seen:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: The latest activity on any of the profile's handles.
          title: Last Seen
        partial:
          title: Partial
          type: boolean
        profile_id:
          format: uuid
          title: Profile Id
          type: string
        pseudonym:
          title: Pseudonym
          type: string
      required:
        - profile_id
        - pseudonym
        - kind
        - partial
        - handles
        - last_seen
      title: ProfileMatch
      type: object
    HandleOut:
      additionalProperties: false
      properties:
        first_seen:
          format: date-time
          title: First Seen
          type: string
        handle_id:
          format: uuid
          title: Handle Id
          type: string
        last_seen:
          format: date-time
          title: Last Seen
          type: string
        level:
          $ref: '#/components/schemas/Verification'
        scope:
          title: Scope
          type: string
        status:
          $ref: '#/components/schemas/HandleStatus'
        subject_kind:
          $ref: '#/components/schemas/SubjectKind'
        type:
          $ref: '#/components/schemas/HandleType'
        value:
          description: Masked by the caller's role.
          title: Value
          type: string
      required:
        - handle_id
        - type
        - scope
        - subject_kind
        - value
        - status
        - level
        - first_seen
        - last_seen
      title: HandleOut
      type: object
    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`).
    Verification:
      description: Session verification levels. `no_customer` sits outside the V0-V4 scale.
      enum:
        - V0
        - V1
        - V2
        - V3
        - V4
        - no_customer
      title: Verification
      type: string
    HandleStatus:
      enum:
        - active
        - ambiguous
        - blocked
        - suspected_recycled
      title: HandleStatus
      type: string
  securitySchemes:
    sourceKey:
      type: http
      scheme: bearer
      description: nia_sk_...
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````