Endpoint
Authentication
Requires a Personal API Access Token.Header
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| username | string | Yes | Username of the credential |
| keyName | string | Yes | Name of the public key to assign |
Notes
- Public key must exist in the project or in the admin project
- Key must be of type
PUBLIC_KEY - Credential must exist
- Only one public key can be assigned to a credential at a time
- Assigning a new public key replaces the existing one if present
Response
Success Response (200 OK)
Error Response (400 Bad Request)
Error Response (401 Unauthorized)
Error Response (404 Not Found)
cURL Example
Notes and Warnings
-
Public Key Requirements:
- Public key must exist in the project or admin project
- Key must be of type
PUBLIC_KEY - Key name is case-sensitive
-
Credential Requirements:
- Credential must exist
- Credential must be in the same project or accessible from the project
-
Replacement Behavior:
- Assigning a new public key replaces any existing public key
- Previous public key assignment is automatically removed
-
Automatic Deployment:
- Credential is automatically deployed to all environments after public key assignment
- Deployment results are returned in the response
Permissions
- User must have
IDENTITY+MANAGEpermission in the project - For automatic deployment, user must also have
IDENTITY+DEPLOY_UNDEPLOYpermission
Related Documentation
- Remove Public Key - Remove public key from credential
- Set Private Key - Assign private key to credential
- List Credentials - List all credentials

