Skip to content
Primary navigation

Delete project service account

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

Deletes a service account from the project.

Returns confirmation of service account deletion, or an error if the project is archived (archived projects have no service accounts).

Path ParametersExpand Collapse
project_id: string
service_account_id: string
ReturnsExpand Collapse
id: string
deleted: boolean
object: "organization.project.service_account.deleted"

Delete project service account

curl -X DELETE 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.deleted",
    "id": "svc_acct_abc",
    "deleted": true
}
Returns Examples
{
    "object": "organization.project.service_account.deleted",
    "id": "svc_acct_abc",
    "deleted": true
}