---
title: "Retrieves a service account in the project."
url: "https://kongair.terwilligar.com/apis/openai-api-2-3-0/versions/ea92d048-c746-4ead-a6a8-da28d93137d1/operations/retrieve-project-service-account"
---

> Full API specification: https://kongair.terwilligar.com/apis/openai-api-2-3-0/versions/ea92d048-c746-4ead-a6a8-da28d93137d1.md

# Retrieves a service account in the project.

`GET` `/organization/projects/{project_id}/service_accounts/{service_account_id}`

Operation ID: `retrieve-project-service-account`

## Path parameters

- `project_id` (string, required) - The ID of the project.
- `service_account_id` (string, required) - The ID of the service account.

## Responses

- `200` - Project service account retrieved successfully.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: OpenAI API
  version: 2.3.0
servers:
  - url: https://api.openai.com/v1
paths:
  /organization/projects/{project_id}/service_accounts/{service_account_id}:
    get:
      summary: Retrieves a service account in the project.
      operationId: retrieve-project-service-account
      tags:
        - Projects
      parameters:
        - name: project_id
          in: path
          description: The ID of the project.
          required: true
          schema:
            type: string
        - name: service_account_id
          in: path
          description: The ID of the service account.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Project service account retrieved successfully.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProjectServiceAccount"
      x-oaiMeta:
        name: Retrieve project service account
        group: administration
        returns: The
          [ProjectServiceAccount](/docs/api-reference/project-service-accounts/object)
          object matching the specified ID.
        examples:
          request:
            curl: |
              curl https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc \
                -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
                -H "Content-Type: application/json"
          response: |
            {
                "object": "organization.project.service_account",
                "id": "svc_acct_abc",
                "name": "Service Account",
                "role": "owner",
                "created_at": 1711471533
            }
security:
  - ApiKeyAuth: []
components:
  schemas:
    ProjectServiceAccount:
      type: object
      description: Represents an individual service account in a project.
      properties:
        object:
          type: string
          enum:
            - organization.project.service_account
          description: The object type, which is always
            `organization.project.service_account`
          x-stainless-const: true
        id:
          type: string
          description: The identifier, which can be referenced in API endpoints
        name:
          type: string
          description: The name of the service account
        role:
          type: string
          enum:
            - owner
            - member
          description: "`owner` or `member`"
        created_at:
          type: integer
          description: The Unix timestamp (in seconds) of when the service account was
            created
      required:
        - object
        - id
        - name
        - role
        - created_at
      x-oaiMeta:
        name: The project service account object
        example: |
          {
              "object": "organization.project.service_account",
              "id": "svc_acct_abc",
              "name": "Service Account",
              "role": "owner",
              "created_at": 1711471533
          }
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
```
