Skip to content
Primary navigation

Delete project API key

DELETE/organization/projects/{project_id}/api_keys/{key_id}

Deletes an API key from the project.

Returns confirmation of the key deletion, or an error if the key belonged to a service account.

Path ParametersExpand Collapse
project_id: string
key_id: string
ReturnsExpand Collapse
id: string
deleted: boolean
object: "organization.project.api_key.deleted"

Delete project API key

curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/api_keys/key_abc \
  -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
  -H "Content-Type: application/json"
{
    "object": "organization.project.api_key.deleted",
    "id": "key_abc",
    "deleted": true
}
Returns Examples
{
    "object": "organization.project.api_key.deleted",
    "id": "key_abc",
    "deleted": true
}