Endpoint
Authentication
Requires a Personal API Access Token.Header
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer | Yes |
| Content-Type | application/json | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
Request Body
Full JSON Body Example - Update Both Keys
Full JSON Body Example - Update Only Public Key
Full JSON Body Example - Update Only Secret Key
Request Body Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| publicKey | string | No | - | API Proxy public key (API Key). If provided, must not be blank |
| secretKey | string | No | - | API Proxy secret key. If provided, must not be blank |
Notes
- At least one of
publicKeyorsecretKeymust be provided - If a key is provided, it must not be blank (empty string or whitespace)
- Keys are stored securely and used for API Proxy authentication
- Public Key is typically used for identification
- Secret Key is used for authentication and should be kept confidential
- Keys can be updated independently (you can update only one key if needed)
Response
Success Response (200 OK)
Response Fields
| Field | Type | Description |
|---|---|---|
| success | boolean | Indicates if the request was successful |
Error Response (400 Bad Request)
Common Causes
- Both
publicKeyandsecretKeyare missing or null - Provided key is blank (empty string or whitespace)
Error Response (401 Unauthorized)
Error Response (404 Not Found)
cURL Example
Example 1: Update Both Keys
Example 2: Update Only Public Key
Example 3: Update Only Secret Key
Notes and Warnings
- Key Format:
- Keys can be any non-blank string
- Common formats include prefixes like
ak_for public keys andsk_for secret keys - Keys are case-sensitive
- Key Security:
- Secret keys should be kept confidential
- Do not expose secret keys in logs, documentation, or version control
- Rotate keys regularly for security
- Partial Updates:
- You can update only one key if needed
- The other key will remain unchanged
- Blank Values:
- Keys cannot be blank (empty string or whitespace)
- If a key is provided, it must contain at least one non-whitespace character
- Key Uniqueness:
- Keys should be unique across API Proxies
- Duplicate keys may cause authentication conflicts
Permissions
User must haveAPI_MANAGEMENT + MANAGE permission in the project.
- Immediate Effect:
- Key changes take effect immediately
- Existing authenticated sessions may be affected
- Key Storage:
- Keys are stored securely in the database
- Keys are encrypted at rest
- API Proxy Identification:
- Public keys are often used for API Proxy identification
- Secret keys are used for authentication and authorization
Related Documentation
- Get API Proxy - Get API proxy details (includes current keys)
- Update Metadata - Update API proxy metadata
- Create API Proxy - Create new API proxy

