Skip to content
Primary navigation

Retrieve project service account

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

Retrieves a service account in the project.

Path ParametersExpand Collapse
project_id: string
service_account_id: string
ReturnsExpand Collapse
ProjectServiceAccount = object { id, created_at, name, 2 more }

Represents an individual service account in a project.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

The Unix timestamp (in seconds) of when the service account was created

name: string

The name of the service account

object: "organization.project.service_account"

The object type, which is always organization.project.service_account

role: "owner" or "member"

owner or member

One of the following:
"owner"
"member"

Retrieve project service account

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"
{
    "object": "organization.project.service_account",
    "id": "svc_acct_abc",
    "name": "Service Account",
    "role": "owner",
    "created_at": 1711471533
}
Returns Examples
{
    "object": "organization.project.service_account",
    "id": "svc_acct_abc",
    "name": "Service Account",
    "role": "owner",
    "created_at": 1711471533
}