Skip to main content
PUT
/
platform
/
admin
/
custodians
/
{id}
/
update_api_keys
Update custodian API keys
curl --request PUT \
  --url https://api.example.com/platform/admin/custodians/{id}/update_api_keys \
  --header 'Content-Type: application/json' \
  --data '
{
  "tenantId": 1024,
  "custodianId": 42,
  "apiKey": "6f58c12d-9d77-47d2-9b7e-8efcf2cb5f15",
  "secretApiKey": "super-secret-key"
}
'
{
  "isSuccess": true,
  "isFailure": false,
  "error": null,
  "value": {
    "id": 42,
    "name": "Example"
  }
}

Description

Replaces the API credentials (API key and secret key) for a custodian provider. The new credentials are validated against the external provider before being saved to ensure connectivity is maintained.

Input

Expects a JSON body containing:
  • tenantId (long, required) — Identifier of the tenant.
  • custodianId (long, required) — The unique identifier of the custodian (auto-populated from route).
  • apiKey (string, required) — The new API key for provider authentication.
  • secretApiKey (string, required) — The new secret key for provider authentication.

Output

Returns a response object containing:
  • success (bool) — Whether the update was successful.
  • validationStatus (bool) — Whether the new credentials were validated successfully.
  • message (string) — Confirmation or error message.

Examples

Request
PUT /api/platform/custodians/42/api-keys
{
  "tenantId": 1024,
  "apiKey": "3e8c5b7a-9d2f-4e1a-8c7b-5f3e2a1d4c6b",
  "secretApiKey": "MIICXAIBAAKBgQCxyz..."
}
Response (200 OK)
{
  "data": {
    "success": true,
    "validationStatus": true,
    "message": "API keys updated and validated successfully"
  },
  "isSuccess": true
}

Errors

  • 400 Bad Request: Invalid payload, missing required fields, or new credentials failed validation.
  • 401 Unauthorized: Authentication required but not provided.
  • 403 Forbidden: Caller does not have permission to update custodians.
  • 404 Not Found: Custodian with specified ID does not exist.
  • 500 Internal Server Error: Connection to provider failed or unexpected error occurred.

Notes

This operation validates the new credentials against the external custodian provider before saving them. If validation fails, the existing credentials are retained. Use this endpoint to rotate API keys for security purposes.

Path Parameters

id
integer<int64>
required

The unique identifier of the custodian to update.

Query Parameters

api-version
string | null

Body

application/json

The request containing the new API credentials.

Request to rotate the API credentials for a custodian.

tenantId
integer<int64>

Identifier of the tenant that owns the custodian.

Example:

1024

custodianId
integer<int64>

Identifier of the custodian whose credentials are being rotated.

Example:

42

apiKey
string

Replacement API key issued by the custodian provider.

Example:

"6f58c12d-9d77-47d2-9b7e-8efcf2cb5f15"

secretApiKey
string

Replacement secret API key that complements the primary key.

Example:

"super-secret-key"

Response

API keys updated successfully.

Wrapper for API operation results containing success status, error information, and return value.

isSuccess
boolean

True if the operation completed successfully, false otherwise.

Example:

true

isFailure
boolean

True if the operation failed, false otherwise.

Example:

false

error
object

Error information returned when the operation fails.

Example:
{
"code": "ValidationError",
"message": "The request parameters failed validation.",
"info": [
"The Name field is required.",
"The Id field must be greater than 0."
]
}
value
object

The result value returned when the operation is successful.

Example:
{
"success": true,
"isWrongCredentials": false
}