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

# List metrics across portfolio

> Latest value of the requested metric(s) across every portfolio company that has granted you `metrics:read`. Companies you have not been granted access to are silently omitted. Requires the `metrics:read` scope; the only possible 403 code is `insufficient_scope`, and there is no per-company 403 on this endpoint. Pagination is not used in this version: `next_cursor` is always null and `has_more` is always false.




## OpenAPI

````yaml /openapi.yaml get /v1/metrics
openapi: 3.1.0
info:
  title: Vein Public API
  version: 1.0.0
  description: >
    Phase 1 of the Vein public API. Read-only access to verified portfolio
    company data with full source attribution. See PHASE_1_DESIGN.md.
servers:
  - url: https://api.vein.finance
    description: >-
      Production (key selects live vs test via vein_sk_live_/vein_sk_test_
      prefix)
security:
  - bearerAuth: []
paths:
  /v1/metrics:
    get:
      summary: List metrics across portfolio
      description: >
        Latest value of the requested metric(s) across every portfolio company
        that has granted you `metrics:read`. Companies you have not been granted
        access to are silently omitted. Requires the `metrics:read` scope; the
        only possible 403 code is `insufficient_scope`, and there is no
        per-company 403 on this endpoint. Pagination is not used in this
        version: `next_cursor` is always null and `has_more` is always false.
      operationId: listMetrics
      parameters:
        - name: keys
          in: query
          required: false
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
          description: >
            Comma-separated list of metric keys to return, e.g.
            `cash_balance,headcount`. Omit to return all available metrics
            across the portfolio.
      responses:
        '200':
          description: >
            A list of metrics across all portfolio companies that have granted
            access. Each item carries `company_id` to identify the source
            company.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListEnvelope'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/Metric'
        '401':
          $ref: '#/components/responses/AuthError'
        '403':
          $ref: '#/components/responses/ScopePermissionError'
        '429':
          $ref: '#/components/responses/RateLimit'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    ListEnvelope:
      type: object
      required:
        - object
        - data
        - has_more
        - url
      properties:
        object:
          type: string
          enum:
            - list
        data:
          type: array
          items: {}
        next_cursor:
          type:
            - string
            - 'null'
        has_more:
          type: boolean
        url:
          type: string
    Metric:
      type: object
      required:
        - company_id
        - key
        - label
        - currency
        - period
        - source
        - verification
        - confidence
      properties:
        company_id:
          type: string
          example: startup_acme
        key:
          type: string
          example: cash_balance
        label:
          type: string
          example: Cash Balance
        value:
          type:
            - string
            - 'null'
          description: Display-formatted value.
          example: $357,000
        raw_value:
          type:
            - number
            - 'null'
          example: 357000
        currency:
          type: string
          example: USD
        category:
          type:
            - string
            - 'null'
          example: financial
        period:
          type: string
          format: date
          example: '2026-05-17'
        as_of:
          type:
            - string
            - 'null'
          format: date-time
        source:
          $ref: '#/components/schemas/MetricSource'
        verification:
          $ref: '#/components/schemas/MetricVerification'
        confidence:
          type: string
          enum:
            - high
            - medium
            - low
          example: high
    MetricSource:
      type: object
      required:
        - system
        - method
      description: Where the metric value came from.
      properties:
        system:
          type: string
          example: plaid
          description: >-
            Originating system, e.g. plaid, quickbooks, stripe, gusto,
            calculated, manual.
        method:
          type: string
          enum:
            - api
            - derived
            - manual
          example: api
        last_synced:
          type:
            - string
            - 'null'
          format: date-time
    MetricVerification:
      type: object
      required:
        - verified
        - signed
        - signature
        - public_key_url
      description: >
        Forward-compatibility block for Phase 2. In Phase 1 `signed` is always
        false and `signature`/`public_key_url` are always null; consumers can
        parse the block today and receive real signatures in Phase 2 without
        changing their code.
      properties:
        verified:
          type: boolean
          example: true
        signed:
          type: boolean
          example: false
        signature:
          type:
            - string
            - 'null'
        public_key_url:
          type:
            - string
            - 'null'
    ErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
            - documentation_url
          properties:
            type:
              type: string
              enum:
                - authentication_error
                - permission_error
                - invalid_request_error
                - not_found_error
                - rate_limit_error
                - idempotency_error
                - api_error
            code:
              type: string
              example: invalid_api_key
            message:
              type: string
            request_id:
              type: string
            documentation_url:
              type: string
              format: uri
  responses:
    AuthError:
      description: Authentication failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    ScopePermissionError:
      description: >
        Access denied: the API key lacks the `metrics:read` scope (`error.code`
        = `insufficient_scope`). This is the only 403 code returned by `GET
        /v1/metrics`; per-company access codes (`access_required`,
        `access_pending`, `access_revoked`) are not possible on this endpoint
        because companies without approved grants are silently omitted from the
        response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    RateLimit:
      description: >
        Too many requests. The public API is rate limited per API key. Every
        response (not just 429s) carries the RateLimit-* headers below; on a 429
        the Retry-After header gives the seconds to wait before retrying.
      headers:
        RateLimit-Limit:
          description: Requests allowed per window for this key.
          schema:
            type: integer
            example: 120
        RateLimit-Remaining:
          description: Requests remaining in the current window.
          schema:
            type: integer
            example: 0
        RateLimit-Reset:
          description: Seconds until the current window resets.
          schema:
            type: integer
            example: 42
        Retry-After:
          description: Seconds to wait before retrying (present on 429 only).
          schema:
            type: integer
            example: 42
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    ServerError:
      description: An unexpected server-side error occurred.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: vein_sk
      description: 'Authorization: Bearer vein_sk_live_... or vein_sk_test_...'

````