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

# List API keys

> Returns a list of all API keys.




## OpenAPI

````yaml https://spec.speakeasy.com/latitude/latitude/latitude-sh-api-with-code-samples get /auth/api_keys
openapi: 3.0.1
info:
  title: Latitude.sh API
  version: '2023-06-01'
  description: >-
    The Latitude.sh API is a RESTful API to manage your Latitude.sh account. It
    allows you to perform the same actions as the Latitude.sh dashboard.
servers:
  - url: https://api.latitude.sh
    variables:
      latitude_api_key:
        default: <insert your api key here>
  - url: http://api.latitude.sh
    variables:
      latitude_api_key:
        default: <insert your api key here>
security: []
tags:
  - name: API keys
  - name: Billing
  - name: Elastic Ips
  - name: Events
  - name: Firewalls
  - name: IP Addresses
  - name: Kubernetes Clusters
  - name: Operating Systems
  - name: Plans
  - name: Private Networks
  - name: Projects
  - name: Regions
  - name: Roles
  - name: SSH Keys
  - name: Servers
  - name: Storage
  - name: Tags
  - name: Teams
  - name: Team members
  - name: Traffic
  - name: User data
  - name: User profile
  - name: VPN Sessions
  - name: Virtual machines
paths:
  /auth/api_keys:
    get:
      tags:
        - API keys
      summary: List API keys
      description: |
        Returns a list of all API keys.
      operationId: get-api-keys
      responses:
        '200':
          description: Success
          content:
            application/vnd.api+json:
              examples:
                Success:
                  value:
                    data:
                      - id: tok_6VE1Wd37dXnZJ
                        type: api_keys
                        attributes:
                          name: Dor Daidelos
                          token_last_slice: 2daaa
                          api_version: '2023-06-01'
                          read_only: false
                          allowed_ips: []
                          created_at: '2026-01-14T15:56:29+00:00'
                          updated_at: '2026-01-14T14:56:29+00:00'
                          last_used_at: null
                          user:
                            id: user_Wel4PnEAmauQYZz3Vz83CkyV2BW
                            email: beckie.prosacco@willms.test
                    meta: {}
              schema:
                $ref: '#/components/schemas/api_keys'
      security:
        - Bearer: []
      x-codeSamples:
        - lang: python
          label: Python (SDK)
          source: |-
            from latitudesh_python_sdk import Latitudesh
            import os


            with Latitudesh(
                bearer=os.getenv("LATITUDESH_BEARER", ""),
            ) as latitudesh:

                res = latitudesh.api_keys.list()

                # Handle response
                print(res)
        - lang: go
          label: Go (SDK)
          source: "package main\n\nimport(\n\t\"context\"\n\t\"os\"\n\tlatitudeshgosdk \"github.com/latitudesh/latitudesh-go-sdk\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := latitudeshgosdk.New(\n        latitudeshgosdk.WithSecurity(os.Getenv(\"LATITUDESH_BEARER\")),\n    )\n\n    res, err := s.APIKeys.List(ctx)\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.APIKeys != nil {\n        // handle response\n    }\n}"
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { Latitudesh } from "latitudesh-typescript-sdk";

            const latitudesh = new Latitudesh({
              bearer: process.env["LATITUDESH_BEARER"] ?? "",
            });

            async function run() {
              const result = await latitudesh.apiKeys.list();

              console.log(result);
            }

            run();
components:
  schemas:
    api_keys:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/api_key'
        meta:
          type: object
    api_key:
      type: object
      properties:
        id:
          type: string
          format: (?-mix:^[a-zA-Z]+_[a-zA-Z0-9]+$)
        type:
          type: string
          enum:
            - api_keys
        attributes:
          type: object
          properties:
            name:
              type: string
              description: Name of the API Key
            api_version:
              type: string
              description: The API version associated with this API Key
            token:
              type: string
              description: The full token (only returned on create or rotate)
            token_last_slice:
              type: string
              description: The last 5 characters of the token created for this API Key
            read_only:
              type: boolean
              nullable: true
              description: Whether this API Key is read-only
            allowed_ips:
              type: array
              nullable: true
              items:
                type: string
              description: List of allowed IP addresses for this API Key
            last_used_at:
              type: string
              nullable: true
              format: date-time
              description: The last time a request was made to the API using this API Key
            user:
              type: object
              description: The owner of the API Key
              properties:
                id:
                  type: string
                  format: (?-mix:^[a-zA-Z]+_[a-zA-Z0-9]+$)
                email:
                  type: string
                  format: email
            created_at:
              type: string
              format: date-time
              description: The time when the API Key was created
            updated_at:
              type: string
              format: date-time
              description: The time when the API Key was updated
  securitySchemes:
    Bearer:
      type: apiKey
      name: Authorization
      in: header

````