NAME
OpenAPI::Client::OpenAI::Path::organization-projects-project_id-api_keys-api_key_id - Documentation for the /organization/projects/{project_id}/api_keys/{api_key_id} path.
OPERATIONS
DELETE /organization/projects/{project_id}/api_keys/{api_key_id}
delete-project-api-key
$client->delete_project_api_key({
body => { ... },
});
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/query parameters
project_id(in path, required, string) - The ID of the project.api_key_id(in path, required, string) - The ID of the API key.
Responses
200 - Project API key deleted successfully.
Content-Type: application/json
Example:
{
"deleted" : false,
"id" : "string",
"object" : "organization.project.api_key.deleted"
}
400 - Error response for various conditions.
Content-Type: application/json
Example:
{
"error" : {
"code" : "string",
"message" : "string",
"param" : "string",
"type" : "string"
}
}
GET /organization/projects/{project_id}/api_keys/{api_key_id}
retrieve-project-api-key
$client->retrieve_project_api_key({
body => { ... },
});
Retrieves an API key in the project.
Path/query parameters
project_id(in path, required, string) - The ID of the project.api_key_id(in path, required, string) - The ID of the API key.
Responses
200 - Project API key retrieved successfully.
Content-Type: application/json
Example:
{
"created_at" : 1711471533,
"id" : "key_abc",
"last_used_at" : 1711471534,
"name" : "My API Key",
"object" : "organization.project.api_key",
"owner" : {
"type" : "user",
"user" : {
"created_at" : 1711471533,
"email" : "user@example.com",
"id" : "user_abc",
"name" : "First Last",
"role" : "owner"
}
},
"redacted_value" : "sk-abc...def"
}
SCHEMAS
Error
Properties:
code(anyOf, required)message(string, required)param(anyOf, required)type(string, required)
ErrorResponse
Properties:
error(Error, required)See "Error" below for shape.
ProjectApiKey
Properties:
created_at(integer, required) - The Unix timestamp (in seconds) of when the API key was createdid(string, required) - The identifier, which can be referenced in API endpointslast_used_at(anyOf, required) - The Unix timestamp (in seconds) of when the API key was last used.name(string, required) - The name of the API keyobject(string, required) - The object type, which is alwaysorganization.project.api_keyAllowed values: organization.project.api_key
owner(object, required)redacted_value(string, required) - The redacted value of the API key
ProjectApiKeyDeleteResponse
Properties:
deleted(boolean, required)id(string, required)object(string, required)Allowed values: organization.project.api_key.deleted
ProjectApiKeyOwnerServiceAccount
Properties:
created_at(integer, required) - The Unix timestamp (in seconds) of when the service account was created.id(string, required) - The identifier, which can be referenced in API endpointsname(string, required) - The name of the service account.role(string, required) - The service account's project role.
ProjectApiKeyOwnerUser
Properties:
created_at(integer, required) - The Unix timestamp (in seconds) of when the user was created.email(string, required) - The email address of the user.id(string, required) - The identifier, which can be referenced in API endpointsname(string, required) - The name of the user.role(string, required) - The user's project role.
SEE ALSO
COPYRIGHT AND LICENSE
Copyright (C) 2023-2026 by Nelson Ferraz
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.