v1

latestOpenAPI 3.0.22026-08-062794201004.1 KB
Api Keys

Rotate API Key

Rotate the secret of a given API key under an organization.

Organization Owners can rotate any API key inside the Organization.

To learn more, see Organization, Project, and Database Access Overview.

post/v4/organizations/{organizationId}/apikeys/{ApiKeyId}/rotate

Request body

secretstring

A secret associated with API key. One has to follow the secret key policy, such as allowed characters and a length of 64 characters. If this field is left empty, a secret will be auto-generated.

Example request

{
  "secret": "jawuXxSXYaWdr@uSSphmV1aJ4siKKcHHXnhhtbE8h8H!O2nbIQJ62M40stDATiBp"
}

Response

Successfully rotated the API key.

secretKeystring required

The Secret key is a confidential piece of information that is paired with the Access key. The API key is made of an Access key and a Secret key.

tokenstring required

The Token is a confidential piece of information that is used to authorize requests made to v4 endpoints.

Example response

{
  "secretKey": "<YOUR_SECRET_KEY_HERE>",
  "token": "QktxVUtFU1dKV1FlMmxwbzJBYXdnTVlRemFZdlRDZTg6eFh4dzU4JUYjekJVYWZPY3lqdUwwYkJoTjZSTmlzRWFIRHF0b1h4a08yazBpQjJ1bms1OW4yTUhAenRib3IhVQ=="
}