Deletes an API key from the project.

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

Path parameters

  • project_id string Required

    The ID of the project.

  • key_id string Required

    The ID of the API key.

Responses

  • 200 application/json

    Project API key deleted successfully.

    Hide response attributes Show response attributes object
    • object string Required

      Value is organization.project.api_key.deleted.

    • id string Required
    • deleted boolean Required
  • 400 application/json

    Error response for various conditions.

    Hide response attribute Show response attribute object
    • error object Required
      Hide error attributes Show error attributes object
      • code string | null Required
      • message string Required
      • param string | null Required
      • type string Required
DELETE /organization/projects/{project_id}/api_keys/{key_id}
curl \
 --request DELETE 'https://api.openai.com/v1/organization/projects/{project_id}/api_keys/{key_id}' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "object": "organization.project.api_key.deleted",
  "id": "string",
  "deleted": true
}
Response examples (400)
{
  "error": {
    "code": "string",
    "message": "string",
    "param": "string",
    "type": "string"
  }
}