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

# List variables and subscriptions

> Secret values are never returned, only a preview.



## OpenAPI

````yaml /openapi.json post /v1/environment.list
openapi: 3.1.0
info:
  title: Sphynx API
  version: 1.0.0
  description: >-
    Run agent evals and manage prompts. Every endpoint takes a JSON body over
    POST and authenticates with a bearer API key.
servers:
  - description: Production
    url: https://api.sphynx.sh
security: []
tags:
  - name: Auth
    description: Check the credential a client is using before it starts work.
  - name: Environment
    description: >-
      The keys and subscriptions eval runs use. Known names such as
      ANTHROPIC_API_KEY run the matching harness, judge or sandbox; other names
      reach a run when its profile names them.
  - name: Batches
    description: Runs started together, such as every case of a suite on every variant.
  - name: Suites
    description: >-
      A prompt and workspace shared by many cases. List its cases with
      `evals.cases.list` and its `suite` filter.
  - name: Cases
    description: One eval each, belonging to a suite, run on one or more variants.
  - name: Runs
    description: One case run on one variant, with its trials.
  - name: Models
    description: The models a variant can name.
  - name: Prompts
    description: >-
      Read and write prompts. Content is versioned, so writes append rather than
      overwrite, and channels decide which version callers receive.
paths:
  /v1/environment.list:
    post:
      tags:
        - Environment
      summary: List variables and subscriptions
      description: Secret values are never returned, only a preview.
      operationId: environment.list
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListEnvironmentRequest'
        required: true
      responses:
        '200':
          description: EnvironmentListing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentListing'
        '400':
          description: The request did not match the expected schema
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/HttpApiDecodeError'
                  - $ref: '#/components/schemas/BadRequest'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: NotFound
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
      security:
        - bearer: []
components:
  schemas:
    ListEnvironmentRequest:
      $id: /schemas/%7B%7D
      anyOf:
        - type: object
        - type: array
      description: List the variables and subscriptions this organization has.
    EnvironmentListing:
      type: object
      required:
        - subscriptions
        - variables
      properties:
        subscriptions:
          type: array
          items:
            $ref: '#/components/schemas/Subscription'
        variables:
          type: array
          items:
            $ref: '#/components/schemas/EnvironmentVariable'
      additionalProperties: false
    HttpApiDecodeError:
      type: object
      required:
        - issues
        - message
        - _tag
      properties:
        issues:
          type: array
          items:
            $ref: '#/components/schemas/Issue'
        message:
          type: string
        _tag:
          type: string
          enum:
            - HttpApiDecodeError
      additionalProperties: false
      description: The request did not match the expected schema
    BadRequest:
      type: object
      required:
        - message
        - _tag
      properties:
        message:
          type: string
        _tag:
          type: string
          enum:
            - BadRequest
      additionalProperties: false
    Unauthorized:
      type: object
      required:
        - message
        - _tag
      properties:
        message:
          type: string
        _tag:
          type: string
          enum:
            - Unauthorized
      additionalProperties: false
    Forbidden:
      type: object
      required:
        - message
        - _tag
      properties:
        message:
          type: string
        _tag:
          type: string
          enum:
            - Forbidden
      additionalProperties: false
    NotFound:
      type: object
      required:
        - message
        - _tag
      properties:
        message:
          type: string
        _tag:
          type: string
          enum:
            - NotFound
      additionalProperties: false
    Subscription:
      type: object
      required:
        - createdAt
        - id
        - lastUsedAt
        - plan
        - renews
        - scope
        - status
      properties:
        createdAt:
          $ref: '#/components/schemas/DateTimeUtc'
        id:
          type: string
        lastUsedAt:
          anyOf:
            - $ref: '#/components/schemas/DateTimeUtc'
            - type: 'null'
        plan:
          type: string
          enum:
            - chatgpt
            - opencode
            - pi
        renews:
          type: boolean
        scope:
          type: string
          enum:
            - organization
            - personal
        status:
          type: string
          enum:
            - active
            - invalid
      additionalProperties: false
      description: A plan an agent signs in with. Its token is never returned.
    EnvironmentVariable:
      type: object
      required:
        - createdAt
        - id
        - lastUsedAt
        - name
        - preview
        - revision
        - scope
        - secret
        - updatedAt
      properties:
        createdAt:
          $ref: '#/components/schemas/DateTimeUtc'
        id:
          type: string
        lastUsedAt:
          anyOf:
            - $ref: '#/components/schemas/DateTimeUtc'
            - type: 'null'
        name:
          type: string
        preview:
          type: string
        revision:
          $ref: '#/components/schemas/Int'
        scope:
          type: string
          enum:
            - organization
            - personal
        secret:
          type: boolean
        updatedAt:
          $ref: '#/components/schemas/DateTimeUtc'
      additionalProperties: false
      description: A variable runs read. Secret values are never returned.
    Issue:
      type: object
      required:
        - _tag
        - path
        - message
      properties:
        _tag:
          type: string
          enum:
            - Pointer
            - Unexpected
            - Missing
            - Composite
            - Refinement
            - Transformation
            - Type
            - Forbidden
          description: The tag identifying the type of parse issue
        path:
          type: array
          items:
            $ref: '#/components/schemas/PropertyKey'
          description: The path to the property where the issue occurred
        message:
          type: string
          description: A descriptive message explaining the issue
      additionalProperties: false
      description: >-
        Represents an error encountered while parsing a value to match the
        schema
    DateTimeUtc:
      type: string
      description: a string to be decoded into a DateTime.Utc
    Int:
      type: integer
      description: an integer
      title: int
    PropertyKey:
      anyOf:
        - type: string
        - type: number
        - type: object
          required:
            - _tag
            - key
          properties:
            _tag:
              type: string
              enum:
                - symbol
            key:
              type: string
          additionalProperties: false
          description: an object to be decoded into a globally shared symbol
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````

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