Sample - OpenAI API
POST/organization/projects/{project_id}/service_accounts/{service_account_id}

Update a project service account

Updates a service account in a specific project. Provide the service account identifier and the fields you want to change, using role to assign either the member or owner role.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters · 2 body fields
project_idstringrequired
The unique identifier of the project containing the service account.
service_account_idstringrequired
The unique identifier of the service account to update.

Fields for updating a project service account.

namestringoptional
The updated service account name.
rolestringoptional
The updated service account role.
Allowed:memberowner

1 status code
200Returns the updated project service account with its object type, identifier, name, role, and creation timestamp.
objectstringrequired
The object type, which is always `organization.project.service_account`
Allowed:organization.project.service_account
idstringrequired
The identifier, which can be referenced in API endpoints
namestringrequired
The name of the service account
rolestringrequired
`owner`, `member`, or `none`
Allowed:ownermembernone
created_atintegerrequired
The Unix timestamp (in seconds) of when the service account was created

Error handling

project_id and service_account_id must identify the project service account to update. If supplied, role must be either member or owner; provide name when changing the service account name.