Skip to main content
Create a new API key for a target. The key secret is returned only once.

POST /:target/:target_id/api_keys

Path Parameters

ParameterTypeRequiredDescription
targetstringYesResource type: orgs or blobs.
target_idstringYesThe unique ID of the target resource.

Request Body

ParameterTypeRequiredDescription
rolestringYesread or write.
descriptionstringNoDescription of the key’s purpose.

Response

ParameterTypeDescription
api_keyobjectThe created API key object including the secret.

Example

{
  "role": "read",
  "description": "CI/CD Integration"
}