Ana içeriğe atla

Endpoint

Authentication

Requires a Personal API Access Token.

Request

Headers

Path Parameters

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

Notes

  • At least one of publicKey or secretKey must 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)

When deploy=true is specified:

Response Fields

Error Response (400 Bad Request)

Common Causes

  • Both publicKey and secretKey are 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

Example 4: Save and Deploy

Notes and Warnings

  • Key Format:
    • Keys can be any non-blank string
    • Common formats include prefixes like ak_ for public keys and sk_ 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 have API_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
  • Deploy: When deploy=true, the API proxy is automatically deployed to the specified environments after saving
  • API Proxy Identification:
    • Public keys are often used for API Proxy identification
    • Secret keys are used for authentication and authorization