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

# Replace your own corrections list

> Writes **the caller's own** list and nothing else — the storage subject is derived from the bearer token, so no body field can redirect the write at another person. There is no role gate: these are rules about this person's own work.

The body carries the whole list as the panel holds it, so this is the edit and remove path. `corrections` is required — an omitted key is a 400, never a silent clear of every rule in force. `id`, `source` and `created_at` are stamped where the caller leaves them blank; `[]` clears the list and removes the key entirely.

`situation` is capped at **150** characters and `instead` at **200**, counted in runes, and at most **6** entries may be in force. A cap is refused by name at the write, never truncated, and a full list is **refused, never evicted** — silently dropping the oldest would leave someone believing a rule is in force that is not.

The write is a compare-and-swap: the document is also written by the approve endpoint, so a list composed against a version that has since moved answers **409** and the panel reloads. A failed mesh write is 502, never 400. Subject: `microstrate.hub.put.coworker-corrections`.



## OpenAPI

````yaml /api-reference/endpoint/abbie/openapi.json put /hub/coworker/corrections
openapi: 3.1.0
info:
  title: Abbie API (beta)
  version: 1.0.0
  description: >
    **Beta.** This API is in beta: operations and fields may change without a
    deprecation period. Do not depend on undocumented fields. It covers the
    subset of Abbie's API used by the Quiva coworker MCP server: skills, todos,
    memory, profile, corrections, environment and models.


    HTTP surface of hub-service for Abbie/Coworker configuration, agent rapport
    & context, chat-session sharing, and MCP registration.


    ## Transport and response envelope


    Every operation here is a gateway mapping onto a Bellerophon/kraken subject
    of the form `microstrate.hub.<method>.<endpoint-slug>` (see
    `hub-service/service/service.go` and `docs/abbie-gateway-mappings.md`).
    Handlers reply on the mesh with an envelope `{"status_code": <int>, "body":
    <object>}`; the gateway unwraps it, so `status_code` becomes the HTTP status
    and `body` becomes the HTTP response body. **The schemas below describe the
    unwrapped `body`.**


    Errors are always `{"error": "<message>"}` with the matching HTTP status.


    ## Parameter conventions


    The gateway forwards URL parameters to the handler as request headers:


    - `x-param-query-<name>` — a query-string parameter (`?name=value`)

    - `x-param-<name>` — a path parameter


    Every parameter documented as `in: query` or `in: path` below corresponds to
    one of those headers, and the header suffix is named in each parameter's
    description where it is not obvious.


    ## Authentication


    All operations require the caller's bearer token; the account id, user id
    and user public key are always taken from the JWT and never from the URL or
    body. Endpoints that additionally require an account **admin** role are
    marked in their description — a failed role lookup answers **502**, never
    403 and never a pass.


    ## Two path notes


    - `PATCH /hub/agent-session-visibility/{session_id}` — the handler reads the
    path parameter as `x-param-session_id`, matching its sibling `PATCH
    /hub/agent-session/{session_id}`.

    - `GET|POST|PUT /hub/agent/user-context/{id}` — the handler requires the
    **agent id** as `x-param-id`; the frontend calls
    `/hub/agent/user-context/<agentId>`.
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Skills
  - name: Todos
  - name: Memory
  - name: Profile and personality
  - name: Corrections
  - name: Environment
  - name: Models
paths:
  /hub/coworker/corrections:
    put:
      tags:
        - Corrections
      summary: Replace your own corrections list
      description: >-
        Writes **the caller's own** list and nothing else — the storage subject
        is derived from the bearer token, so no body field can redirect the
        write at another person. There is no role gate: these are rules about
        this person's own work.


        The body carries the whole list as the panel holds it, so this is the
        edit and remove path. `corrections` is required — an omitted key is a
        400, never a silent clear of every rule in force. `id`, `source` and
        `created_at` are stamped where the caller leaves them blank; `[]` clears
        the list and removes the key entirely.


        `situation` is capped at **150** characters and `instead` at **200**,
        counted in runes, and at most **6** entries may be in force. A cap is
        refused by name at the write, never truncated, and a full list is
        **refused, never evicted** — silently dropping the oldest would leave
        someone believing a rule is in force that is not.


        The write is a compare-and-swap: the document is also written by the
        approve endpoint, so a list composed against a version that has since
        moved answers **409** and the panel reloads. A failed mesh write is 502,
        never 400. Subject: `microstrate.hub.put.coworker-corrections`.
      operationId: putCoworkerCorrections
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CoworkerCorrectionsRequest'
      responses:
        '200':
          description: The corrections as stored
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoworkerCorrectionsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          $ref: '#/components/responses/RevisionConflict'
        '502':
          $ref: '#/components/responses/UpstreamError'
components:
  schemas:
    CoworkerCorrectionsRequest:
      type: object
      required:
        - corrections
      description: >-
        The whole list, as the panel holds it. `corrections` is required: an
        omitted key is a 400, never a silent clear.
      properties:
        corrections:
          type: array
          maxItems: 6
          items:
            $ref: '#/components/schemas/CoworkerCorrection'
    CoworkerCorrectionsResponse:
      type: object
      properties:
        corrections:
          type: array
          items:
            $ref: '#/components/schemas/CoworkerCorrection'
          description: Empty list, never null
        max_entries:
          type: integer
          example: 6
          description: >-
            The entry cap. A full list is refused, never evicted — the panel
            offers removal.
    CoworkerCorrection:
      type: object
      description: >-
        One correction — a situation and a different behaviour for it. FROZEN
        wire shape (docs/abbie-corrections-surface-plan.md §3), spelled by hand
        in bellerophon-workforce and the frontend, which cannot import hub.
        FIELD COUNT: 5. `source` and `created_at` are stored but never rendered
        into a prompt.
      properties:
        id:
          type: string
          description: Stamped server-side as `c_<uuid>` when blank
          example: c_2f5a1e14-9a2b-4f0e-8f3a-1d2c3b4a5e6f
        situation:
          type: string
          maxLength: 150
          description: When the rule applies. Required.
          example: when I ask for a quote
        instead:
          type: string
          maxLength: 200
          description: >-
            What to do instead. Required — a situation with no instead is a
            complaint, not a correction.
          example: check the schedule before pricing
        source:
          type: string
          enum:
            - analyser
            - vote
            - manual
          description: >-
            Provenance. Defaults to `manual` when blank; an unknown value is
            refused.
        created_at:
          type: string
          format: date-time
          description: >-
            Stamped server-side when blank. Never used to sort — order is
            insertion order.
    Error:
      type: object
      description: The unwrapped error body. The HTTP status carries the code.
      properties:
        error:
          type: string
      required:
        - error
  responses:
    BadRequest:
      description: Malformed payload or a failed validation rule
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: No account (or user) identity in the auth context
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RevisionConflict:
      description: >-
        The document moved between the caller's read and its write — the request
        was well formed, so reload and re-offer rather than retrying blindly
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UpstreamError:
      description: >-
        A backend read or write failed — deliberately not degraded to an empty
        or default answer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.