Skip to content
HelicarrierDevelopers

Rotate database credentials

Rotate a managed database’s password (generated for you unless you supply one) and invalidate the previous credential.

POST/api/services/{id}/db/passwordHTTPS
Request & response examples
Request exampleServer-side
curl --fail-with-body --request POST \
'https://app.helicarrier.xyz/api/services/YOUR_ID/db/password' \
-H "Authorization: Bearer $HELI_API_KEY"
Response example200
{
"status": "password changed",
"generated": true,
"reveal": "The password is not included. Call GET /api/services/{id}/connection?reveal=true (MCP: get_db_connection with reveal=true) to read it; each reveal is recorded in the audit trail and needs a key that can write.",
"dependents": [
"my-app",
"my-worker"
],
"reconnected": true,
"warning": "these 2 service(s) briefly lose access while they redeploy with the new credential"
}

Illustrative values · selected fields

Authorization

An account key with access to the resource. Project and service keys do not authorize this operation.

Authorization: Bearer <key>Key setup

Path parameters

idstringrequired

Database or bucket service id.

Request body

passwordstringoptional

Optional. Omit to have the platform generate the new password (databases) or secret key (buckets); recommended, so no secret passes through your transcript. If given: at least 6 characters (buckets: 8), no control characters.

accessKeystringoptional

Buckets only: a new S3 access key. Omit to keep the current one.

reconnectDependentsstringoptional

Default true: the services that connect to this one are redeployed so they pick the new credential up, and they briefly lose access while they do. Set false to skip that and deploy them yourself — until you do, they keep using the old credential and will fail. Not available for Redis, which has to be redeployed for a rotation to take effect, and that reconnects its dependents either way.

Response 200

Omit password and the platform generates a strong one (recommended), so no secret passes through your client, transcript or shell history. A supplied password is still accepted. The new value is never returned: generated says who chose it, and get_db_connection with reveal=true reads it. Returns confirmation, the services that connect to this one, and whether they were redeployed to pick the new credential up. They briefly lose access while they redeploy — set reconnectDependents to false to skip that and deploy them yourself, in which case they keep using the old credential and will fail until you do.

Examples show selected response fields with illustrative values. Your response can contain additional fields.

statusstring

Current state of the resource or operation.

generatedboolean
revealstring
dependentsarray
reconnectedboolean
warningstring

Errors

400

Invalid parameters. Check the required fields, types, and resource configuration.

401

The API key is missing, invalid, or revoked.

403

The caller or key scope does not permit this operation.

409

The current resource state prevents the operation. Inspect it before retrying.

500

The operation could not be completed. Check resource state before retrying a write.

503

The request could not be completed.

Error handling and safe retries
ALSO AVAILABLE VIA MCP

rotate_db_credentials

Required MCP arguments: id. Send path, query, and body fields together as tool arguments.

Connect your agent