> ## Documentation Index
> Fetch the complete documentation index at: https://docs.acedata.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Rotate AceDataCloud Platform API Credentials

> Platform integration guide - Ace Data Cloud

Generate a new Token or password for an existing Credential. The credential ID, Application association, quota, and other fields remain unchanged, and the old secret becomes invalid immediately.

> Rotation will interrupt clients that are still using the old secret. Prepare secure distribution and rollback plans before performing the write operation.

## API Overview

| Item | Content |
| - | - |
| Method | `POST` |
| URL | `https://platform.acedata.cloud/api/v1/credentials/{credential_id}/rotate/` |
| Authentication | Account Token |
| Body | None or `{}` |

Obtain `credential_id` from the [credential list](https://platform.acedata.cloud/documents/platform-credential-list):

```shell theme={null}
export PLATFORM_TOKEN='your account token'
export CREDENTIAL_ID='Credential ID to rotate'

curl -X POST \
  "https://platform.acedata.cloud/api/v1/credentials/${CREDENTIAL_ID}/rotate/" \
  -H "Authorization: Bearer ${PLATFORM_TOKEN}"
```

A successful response returns the updated Credential. When `type=Token`, read the new `token`; when `type=Identity`, read the new `password`. Treat the complete response as a secret and update callers immediately.

## Error Handling

* `401`: Account Token is invalid.
* `403`: No permission to manage this credential.
* `404`: Credential ID does not exist.

## Related APIs

* [Get API Credential List](https://platform.acedata.cloud/documents/platform-credential-list)
* [Create API Credential](https://platform.acedata.cloud/documents/platform-credential-create)
* [Delete API Credential](https://platform.acedata.cloud/documents/platform-credential-delete)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.