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

# Corrigir uma inferência

> O valor que o cliente diz vira preferência ou atributo declarado; a inferência é apagada.



## OpenAPI

````yaml openapi/pt/cell.json POST /v1/profiles/{profile_id}/inferences/{key}/correct
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-2
        description: A região do espaço, que também vem na chave.
security: []
paths:
  /v1/profiles/{profile_id}/inferences/{key}/correct:
    post:
      tags:
        - signals
      summary: Corrigir uma inferência
      description: >-
        O valor do cliente vira preferência ou atributo declarado; a inferência
        é apagada.


        **Autenticação.** Token de pessoa do Console com o papel `security` (ou
        admin), ou chave de fonte com o escopo `admin`. Só responde num espaço
        com a funcionalidade `signals` ligada (o documento `features`); num
        espaço sem ela, 404.
      operationId: correct_inference_v1_profiles__profile_id__inferences__key__correct_post
      parameters:
        - in: path
          name: profile_id
          required: true
          schema:
            format: uuid
            title: Profile Id
            type: string
        - in: path
          name: key
          required: true
          schema:
            title: Key
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InferenceCorrection'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Inference'
          description: Resposta de sucesso.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: O pedido não bate com o contrato.
      security:
        - sourceKey: []
        - personToken: []
components:
  schemas:
    InferenceCorrection:
      additionalProperties: false
      description: >-
        O valor que o cliente diz no lugar: uma preferência declarada, ou um
        atributo declarado para um tamanho inferido (`source: correction`). A
        inferência que ela corrige é apagada. Um interesse é apagado, não
        corrigido.
      properties:
        reason:
          anyOf:
            - maxLength: 500
              minLength: 1
              type: string
            - type: 'null'
          title: Reason
        value:
          anyOf:
            - type: boolean
            - type: integer
            - type: number
            - maxLength: 256
              type: string
          title: Value
      required:
        - value
      title: InferenceCorrection
      type: object
    Inference:
      additionalProperties: false
      description: >-
        Uma coisa que os sinais inferem sobre o cliente, com o que a sustenta: o
        cliente pode vê-la, corrigi-la e apagá-la. O que o cliente disse não é
        inferência e não aparece.
      properties:
        at:
          description: Quando a evidência mais recente dela aconteceu.
          format: date-time
          title: At
          type: string
        attr:
          anyOf:
            - pattern: ^[a-z][a-z0-9_]{0,39}\.[a-z][a-z0-9_]{0,63}$
              type: string
            - type: 'null'
          description: O campo cujo valor é inferido.
          title: Attr
        confidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Confidence
        evidence:
          additionalProperties: true
          description: >-
            O que a sustenta, em contagens: exposição efetiva, sinal ponderado,
            eventos, sessões e ganho para um valor; vezes para um interesse.
          title: Evidence
          type: object
        for:
          default: self
          pattern: ^(?:self|gift|beneficiary:[A-Za-z0-9_-]{1,64})$
          title: For
          type: string
        key:
          description: Um hash com chave que nomeia a inferência; nunca leva o valor dela.
          maxLength: 512
          minLength: 1
          title: Key
          type: string
        kind:
          description: >-
            `soft_constraint` quando o bloco de restrições a leva como entrada
            branda, `attribute` para o tamanho inferido, `affinity` para um
            valor com evidência e ainda sem entrada, `interest` para um objeto.
          enum:
            - affinity
            - soft_constraint
            - attribute
            - interest
          title: Kind
          type: string
        origin:
          description: >-
            `interactions`, `implicit_negative` (mostrado muitas vezes e nunca
            engajado), ou por que um interesse foi guardado: `engaged`,
            `feedback`, `watch`.
          maxLength: 256
          minLength: 1
          title: Origin
          type: string
        polarity:
          anyOf:
            - enum:
                - prefer
                - avoid
              type: string
            - type: 'null'
          title: Polarity
        ref:
          anyOf:
            - pattern: ^[a-z][a-z0-9_]{0,39}:[^:\s]{1,256}:\S{1,512}$
              type: string
            - type: 'null'
          description: O objeto de um interesse.
          title: Ref
        used_for:
          description: As finalidades para as quais é usada.
          items:
            maxLength: 256
            minLength: 1
            type: string
          title: Used For
          type: array
        value:
          anyOf:
            - type: boolean
            - type: integer
            - type: number
            - maxLength: 256
              type: string
            - type: 'null'
          title: Value
      required:
        - key
        - kind
        - origin
        - at
      title: Inference
      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
  securitySchemes:
    sourceKey:
      type: http
      scheme: bearer
      description: nia_sk_...
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````