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

# Update a key result

> Updates a key result's current value and/or confidence (0–1). Requires `performance:write`.



## OpenAPI

````yaml https://api.kuahr.com/openapi/v1.json patch /v1/performance/key-results/{id}
openapi: 3.1.1
info:
  title: Kua API
  description: >-
    The Kua developer API — payroll, wallets, and payments for your own company.


    Authenticate with an API key issued from **Settings → API keys** in the
    dashboard, sent in the `X-Api-Key` header. Every request is scoped to the
    company that owns the key. Base URL: `https://api.kuahr.com` (all endpoints
    are versioned under `/v1`).
  version: v1
servers:
  - url: https://api.kuahr.com
    description: Production
security:
  - ApiKey: []
tags:
  - name: Payroll
    description: List and create payroll runs.
  - name: Employees
    description: Add people to your company.
  - name: Events
    description: The company event timeline (also delivered via webhooks).
  - name: Webhooks
    description: Register endpoints and inspect deliveries.
  - name: Test data
    description: Manage sandbox (test-mode) data.
  - name: Leave
    description: >-
      Time-off types, requests, balances, and allocations (requires the Leave
      add-on).
  - name: Advances
    description: Salary advances (requires the Salary advance add-on).
  - name: Performance
    description: OKRs, appraisals, and promotions (requires the Performance add-on).
paths:
  /v1/performance/key-results/{id}:
    patch:
      tags:
        - Performance
      summary: Update a key result
      description: >-
        Updates a key result's current value and/or confidence (0–1). Requires
        `performance:write`.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V1UpdateKeyResultRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyResultDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    V1UpdateKeyResultRequest:
      required:
        - currentValue
        - confidenceScore
      type: object
      properties:
        currentValue:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - 'null'
            - number
            - string
          format: double
        confidenceScore:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - 'null'
            - number
            - string
          format: double
    KeyResultDto:
      required:
        - id
        - objectiveId
        - description
        - targetValue
        - currentValue
        - unit
        - confidenceScore
      type: object
      properties:
        id:
          type: string
          format: uuid
        objectiveId:
          type: string
          format: uuid
        description:
          type: string
        targetValue:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        currentValue:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        unit:
          type: string
        confidenceScore:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          description: Owner's confidence, 0.0–1.0.
          format: double
      description: A key result under an objective.
    ApiError:
      required:
        - code
        - message
      type: object
      properties:
        code:
          type: string
          description: >-
            A stable, machine-readable identifier you can branch on, e.g.
            `INSUFFICIENT_SCOPE`.
        message:
          type: string
          description: A human-readable explanation. May change; don't parse it.
      description: The standard error body returned for 4xx responses.
  securitySchemes:
    ApiKey:
      type: apiKey
      description: Your API key, e.g. `kua_live_…` (or `kua_test_…` in test mode).
      name: X-Api-Key
      in: header

````