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

# List declared environment variables

> Reads are **not** role-gated at either scope: no value returned here is a credential — a literal is config by construction, and a `SECRET::<name>::` reference is an opaque handle that resolves only against the caller's own secrets bucket.

Values are returned **exactly as stored**: never resolved (no endpoint anywhere turns a reference into plaintext for a browser) and never redacted (the UI PUTs the row straight back on an unrelated edit, so a mask would be saved as a literal and destroy the reference).

A failed read answers 502, never an empty list — an empty list is a claim the UI cannot un-show. Subject: `microstrate.hub.get.coworker-env`.



## OpenAPI

````yaml /api-reference/endpoint/abbie/openapi.json get /hub/coworker/env
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/env:
    get:
      tags:
        - Environment
      summary: List declared environment variables
      description: >-
        Reads are **not** role-gated at either scope: no value returned here is
        a credential — a literal is config by construction, and a
        `SECRET::<name>::` reference is an opaque handle that resolves only
        against the caller's own secrets bucket.


        Values are returned **exactly as stored**: never resolved (no endpoint
        anywhere turns a reference into plaintext for a browser) and never
        redacted (the UI PUTs the row straight back on an unrelated edit, so a
        mask would be saved as a literal and destroy the reference).


        A failed read answers 502, never an empty list — an empty list is a
        claim the UI cannot un-show. Subject:
        `microstrate.hub.get.coworker-env`.
      operationId: getCoworkerEnv
      parameters:
        - $ref: '#/components/parameters/EnvScope'
      responses:
        '200':
          description: The requested scope's manifest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoworkerEnvListResponse'
        '400':
          description: >-
            `scope=user` with a token that carries no user identity — never
            widened to the organisation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '502':
          $ref: '#/components/responses/UpstreamError'
components:
  parameters:
    EnvScope:
      name: scope
      in: query
      required: false
      description: >-
        `user` addresses the caller's personal manifest; anything else —
        including an unrecognised value — resolves to organisation. A `user`
        request from a token that carries no user identity is a **400**, never
        widened to the organisation. Forwarded as `x-param-query-scope`.
      schema:
        type: string
        enum:
          - organisation
          - user
        default: organisation
  schemas:
    CoworkerEnvListResponse:
      type: object
      properties:
        scope:
          type: string
          enum:
            - organisation
            - user
        vars:
          type: array
          items:
            $ref: '#/components/schemas/CoworkerEnvVar'
          description: Always an array, never null
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      description: The unwrapped error body. The HTTP status carries the code.
      properties:
        error:
          type: string
      required:
        - error
    CoworkerEnvVar:
      type: object
      properties:
        key:
          type: string
          pattern: ^[A-Z_][A-Z0-9_]*$
          maxLength: 64
        value:
          type: string
          description: >-
            Either a literal or a `SECRET::<name>::` reference. Returned
            verbatim — never resolved, never redacted.
        secret:
          type: boolean
          description: >-
            **Derived on write** from whether `value` parses as a well-formed
            reference. Never taken from the client.
          readOnly: true
        description:
          type: string
          description: Model-visible for every entry, secret or not
        server:
          type: string
          description: >-
            Catalog server id this variable belongs to, verbatim. Optional —
            plenty of config belongs to no server.
        consumers:
          type: array
          items:
            type: string
            enum:
              - mcp
              - skill
          description: Narrows which surfaces receive this variable. Empty means all.
        updated_at:
          type: string
          format: date-time
          readOnly: true
        updated_by:
          type: string
          description: Accounts user id
          readOnly: true
  responses:
    Unauthorized:
      description: No account (or user) identity in the auth context
      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.