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

# Encontrar perfis

> Perfis que atendem a um critério, devolvidos por pseudônimo.



## OpenAPI

````yaml openapi/pt/cell.json POST /v1/insights/profiles
openapi: 3.1.0
info:
  title: API de dados da Niadra
  version: '1'
  description: >-
    Escrita, contexto, histórico, objetos, identidade, privacidade e governança
    de um espaço. Cada espaço tem um endereço estável, com o espaço e a região
    no nome.
servers:
  - url: https://{space}.{region}.api.niadra.com
    variables:
      space:
        default: acme-prod
        description: O espaço, que vem na chave de fonte.
      region:
        default: us-east-1
        description: A região do espaço, que também vem na chave.
security: []
paths:
  /v1/insights/profiles:
    post:
      summary: Encontrar perfis
      description: >-
        Encontra os perfis que atendem a um critério, como três reclamações da
        mesma categoria num período. Os perfis voltam por pseudônimo, nunca por
        handle.


        **Autenticação.** Chave de fonte com o escopo `analytics`, ou token de
        pessoa do Console com o papel analysis (ou admin). Pessoas do papel
        vendor não acessam.
      operationId: find_profiles_v1_insights_profiles_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FindProfilesRequest'
            example:
              entity: episodes
              since: '2026-06-24T00:00:00Z'
              until: '2026-09-22T23:59:59Z'
              filters:
                intent:
                  - complaint
                normalized_category:
                  - technician_visit
              min_matches: 3
              limit: 50
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FindProfilesResponse'
              example:
                items:
                  - pseudonym: psn_7f3a
                    matches: 3
                    reason: >-
                      3 episodes with intent complaint and category
                      technician_visit
                next_cursor: null
          description: Os perfis encontrados, por pseudônimo.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: O pedido não bate com o contrato.
      security:
        - sourceKey: []
components:
  schemas:
    FindProfilesRequest:
      additionalProperties: false
      properties:
        cursor:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          title: Cursor
        entity:
          title: Entity
          type: string
        filters:
          additionalProperties:
            items:
              maxLength: 200
              type: string
            type: array
          title: Filters
          type: object
        limit:
          default: 50
          maximum: 200
          minimum: 1
          title: Limit
          type: integer
        min_matches:
          default: 1
          maximum: 1000
          minimum: 1
          title: Min Matches
          type: integer
        since:
          format: date-time
          title: Since
          type: string
        until:
          format: date-time
          title: Until
          type: string
      required:
        - since
        - until
        - entity
      title: FindProfilesRequest
      type: object
    FindProfilesResponse:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/ProfileMatchOut'
          title: Items
          type: array
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
      required:
        - items
      title: FindProfilesResponse
      type: object
    Problem:
      additionalProperties: false
      description: >-
        Detalhes do problema no formato da RFC 9457; `code` vem do catálogo de
        erros versionado.
      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
    ProfileMatchOut:
      additionalProperties: false
      properties:
        matches:
          title: Matches
          type: integer
        pseudonym:
          title: Pseudonym
          type: string
        reason:
          title: Reason
          type: string
      required:
        - pseudonym
        - matches
        - reason
      title: ProfileMatchOut
      type: object
  securitySchemes:
    sourceKey:
      type: http
      scheme: bearer
      description: nia_sk_...

````