---
updatedAt: 2026-08-10T09:26:50.000Z
agentTools:
  projectIndex: https://docs.cast.ai/llms.txt
---

# ListOrganizationServiceAccountKeys lists all service account keys for the given organization across all service accounts.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "servers": [
    {
      "url": "https://api.cast.ai/",
      "description": "US endpoint"
    },
    {
      "url": "https://api.eu.cast.ai/",
      "description": "EU endpoint"
    }
  ],
  "info": {
    "title": "CAST.AI API documentation",
    "version": "1.0.0",
    "description": "### Feature maturity indicators (may appear on resources, operations and request/response fields)\n - **(BETA)** - new or experimental features, subject to change\n - **(Deprecated)** - outdated or replaced features (a reason and removal date will be provided in the description)\n"
  },
  "tags": [
    {
      "name": "ServiceAccountsAPI"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    },
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/v1/organizations/{organizationId}/service-accounts/keys": {
      "get": {
        "operationId": "ServiceAccountsAPI_ListOrganizationServiceAccountKeys",
        "parameters": [
          {
            "description": "OrganizationID is the id of the organization to list service account keys for.",
            "in": "path",
            "name": "organizationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page.limit",
            "schema": {
              "format": "uint64",
              "type": "string"
            }
          },
          {
            "description": "Cursor that defines token indicating where to start the next page.\nEmpty value indicates to start from beginning of the dataset.",
            "in": "query",
            "name": "page.cursor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/castai.serviceaccounts.v1beta1.ListOrganizationServiceAccountKeysResponse"
                }
              }
            },
            "description": "A successful response."
          }
        },
        "summary": "ListOrganizationServiceAccountKeys lists all service account keys for the given organization across all service accounts.",
        "tags": [
          "ServiceAccountsAPI"
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    },
    "schemas": {
      "castai.pagination.v1beta1.Page": {
        "description": "Page defines how many and which fields should be returned.",
        "properties": {
          "limit": {
            "format": "uint64",
            "type": "string"
          },
          "cursor": {
            "description": "Cursor that defines token indicating where to start the next page.\nEmpty value indicates to start from beginning of the dataset.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "castai.serviceaccounts.v1beta1.ListOrganizationServiceAccountKeysResponse": {
        "description": "ListOrganizationServiceAccountKeysResponse is the response for listing all service account keys for an organization.",
        "properties": {
          "keys": {
            "description": "Keys is the list of service account keys.",
            "items": {
              "$ref": "#/components/schemas/castai.serviceaccounts.v1beta1.ListOrganizationServiceAccountKeysResponse.Key"
            },
            "readOnly": true,
            "type": "array"
          },
          "nextPage": {
            "$ref": "#/components/schemas/castai.pagination.v1beta1.Page"
          },
          "totalCount": {
            "description": "TotalCount is the total number of service account keys in the dataset.",
            "format": "uint64",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "keys",
          "nextPage",
          "totalCount"
        ],
        "type": "object"
      },
      "castai.serviceaccounts.v1beta1.ListOrganizationServiceAccountKeysResponse.Key": {
        "description": "Key is a service account key with its parent service account context.",
        "properties": {
          "id": {
            "description": "ID is the unique identifier of the key.",
            "readOnly": true,
            "type": "string"
          },
          "name": {
            "description": "Name is the name of the key.",
            "readOnly": true,
            "type": "string"
          },
          "prefix": {
            "description": "Prefix is the prefix of the key.",
            "readOnly": true,
            "type": "string"
          },
          "lastUsedAt": {
            "description": "LastUsedAt is the last time the key was used.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "expiresAt": {
            "description": "ExpiresAt is the expiration time of the key.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "active": {
            "description": "Active determines if the key is active.",
            "readOnly": true,
            "type": "boolean"
          },
          "createdAt": {
            "description": "CreatedAt is the creation time of the key.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "createdBy": {
            "$ref": "#/components/schemas/castai.serviceaccounts.v1beta1.ServiceAccount.Author"
          },
          "serviceAccount": {
            "$ref": "#/components/schemas/castai.serviceaccounts.v1beta1.ListOrganizationServiceAccountKeysResponse.ServiceAccount"
          }
        },
        "type": "object"
      },
      "castai.serviceaccounts.v1beta1.ListOrganizationServiceAccountKeysResponse.ServiceAccount": {
        "description": "ServiceAccount is a summary of the parent service account for a key.",
        "properties": {
          "id": {
            "description": "ID is the unique identifier of the service account.",
            "readOnly": true,
            "type": "string"
          },
          "name": {
            "description": "Name is the name of the service account.",
            "readOnly": true,
            "type": "string"
          },
          "createdAt": {
            "description": "CreatedAt is the creation time of the service account.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "email": {
            "description": "Email is the email of the service account.",
            "readOnly": true,
            "type": "string"
          },
          "description": {
            "description": "Description is the description of the service account.",
            "readOnly": true,
            "type": "string"
          },
          "author": {
            "$ref": "#/components/schemas/castai.serviceaccounts.v1beta1.ServiceAccount.Author"
          },
          "managedBy": {
            "description": "ManagedBy is the method used to create the service account, eg.: console, terraform.",
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "castai.serviceaccounts.v1beta1.ServiceAccount.Author": {
        "description": "Author is the author of the service account.",
        "properties": {
          "id": {
            "description": "ID is the unique identifier of the author.",
            "readOnly": true,
            "type": "string"
          },
          "kind": {
            "description": "Kind is the kind of the author.",
            "readOnly": true,
            "type": "string"
          },
          "email": {
            "description": "Email is the email of the author.",
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      }
    }
  }
}
```