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

# List Service Accounts

> Retrieve all service accounts in the organization. Returns each service account's ID, name, and the ID of the user who created it. Pass a returned `id` as `service_account_id` to `POST /v1/manage/apikey` to create a key under that service account. Requires an API key with manage read or write permission.

List all service accounts in your organization. Returns each service account's ID, name, and the user ID of the member who created it.

Pass a returned `id` as `service_account_id` to [Create API Key](https://docs.requesty.ai/api-reference/endpoint/manage-apikey/manage-api-key-create.md) to issue a key under that service account.

[Service Accounts docs →](https://docs.requesty.ai/features/service-accounts.md#with-the-management-api)


## OpenAPI

````yaml GET /v1/manage/service-account
openapi: 3.0.3
info:
  title: Requesty Management API
  description: >-
    Requesty Management API for API key management, groups, members, and
    organization settings.
  version: 1.0.0
servers:
  - url: https://api-v2.requesty.ai
    description: Management API endpoint
security:
  - BearerAuth: []
paths:
  /v1/manage/service-account:
    servers:
      - url: https://api-v2.requesty.ai
        description: Management API endpoint
    get:
      summary: List service accounts
      description: >-
        Retrieve all service accounts in the organization. Returns each service
        account's ID, name, and the ID of the user who created it. Pass a
        returned `id` as `service_account_id` to `POST /v1/manage/apikey` to
        create a key under that service account. Requires an API key with manage
        read or write permission.
      operationId: listServiceAccounts
      responses:
        '200':
          description: Successfully retrieved service accounts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListServiceAccountsResponse'
              example:
                service_accounts:
                  - id: 3f6c2a1e-8b4d-4c7a-9e2f-5d1b7a9c0e42
                    name: Production API
                    author_id: user_2abcDEF123ghiJKL456mno
                  - id: 9a1d4e7b-2c3f-4b5a-8d6e-0f1a2b3c4d5e
                    name: CI pipeline
                    author_id: user_2abcDEF123ghiJKL456mno
        '401':
          description: Unauthorized - missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - API key does not have manage permissions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ListServiceAccountsResponse:
      type: object
      properties:
        service_accounts:
          type: array
          items:
            $ref: '#/components/schemas/ServiceAccount'
          description: >-
            Service accounts in the organization. Omitted when the organization
            has no service accounts.
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - origin
            - message
          properties:
            origin:
              type: string
              enum:
                - router
                - provider
              description: >-
                Whether the error originated from Requesty's router or an
                upstream provider.
            message:
              type: string
              description: Human-readable error description.
    ServiceAccount:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
          format: uuid
          description: >-
            Unique identifier of the service account. Use it as
            `service_account_id` when creating an API key.
          example: 3f6c2a1e-8b4d-4c7a-9e2f-5d1b7a9c0e42
        name:
          type: string
          description: Name of the service account
          example: Production API
        author_id:
          type: string
          description: User ID of the member who created the service account
          example: user_2abcDEF123ghiJKL456mno
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key for authentication

````

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