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

# List goals

> List financial goals with optional status filter.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/yoshi/openapi.documented.yml get /goals
openapi: 3.1.0
info:
  title: Yoshi API
  version: 1.0.0
  description: Consumer API for accessing your Yoshi financial data programmatically.
servers:
  - url: https://api.yoshi.ai/v1
    description: Production
  - url: https://staging-api.yoshi.ai/v1
    description: Staging
security:
  - bearerAuth: []
paths:
  /goals:
    get:
      tags:
        - Goals
      summary: List goals
      description: List financial goals with optional status filter.
      operationId: listGoals
      parameters:
        - schema:
            type: string
            enum:
              - active
              - paused
              - completed
              - cancelled
          required: false
          name: status
          in: query
      responses:
        '200':
          description: Goals retrieved.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      goals:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            goal_type:
                              type: string
                            status:
                              type: string
                            target_amount:
                              type:
                                - number
                                - 'null'
                            current_value:
                              type:
                                - number
                                - 'null'
                            target_date:
                              type:
                                - string
                                - 'null'
                              format: date
                          required:
                            - id
                            - name
                            - goal_type
                            - status
                            - target_amount
                            - current_value
                            - target_date
                    required:
                      - goals
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: req_a1b2c3d4-e5f6-7890-abcd-ef1234567890
                      timestamp:
                        type: string
                        format: date-time
                        example: '2026-04-10T12:00:00.000Z'
                    required:
                      - request_id
                      - timestamp
                required:
                  - data
                  - meta
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Yoshi from '@yoshi-ai/sdk';

            const client = new Yoshi({
              apiKey: process.env['YOSHI_API_KEY'], // This is the default and can be omitted
            });

            const goals = await client.goals.list();

            console.log(goals.data);
        - lang: Python
          source: |-
            import os
            from yoshi_sdk import Yoshi

            client = Yoshi(
                api_key=os.environ.get("YOSHI_API_KEY"),  # This is the default and can be omitted
            )
            goals = client.goals.list()
            print(goals.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/yoshi-ai-dev/yoshi-go\"\n\t\"github.com/yoshi-ai-dev/yoshi-go/option\"\n)\n\nfunc main() {\n\tclient := yoshi.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tgoals, err := client.Goals.List(context.TODO(), yoshi.GoalListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", goals.Data)\n}\n"
        - lang: CLI
          source: |-
            yoshi goals list \
              --api-key 'My API Key'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Yoshi API key from Settings → API Keys, or a Yoshi OAuth access token
        issued by Sign in with Yoshi.
      x-default: yoshi_test_...

````