> ## 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.

# Delete an AceDataCloud Platform API Credential

> Platform integration guide - Ace Data Cloud

Permanently delete an API credential. After deletion, it is **immediately irreversible**, and all business APIs using this Token will immediately receive `401`.

> ℹ️ This API belongs to the **AceDataCloud Platform Management API**, with the unified prefix `https://platform.acedata.cloud/api/v1/`.

## API Overview

| Item | Content |
| - | - |
| Method | `DELETE` |
| URL | `https://platform.acedata.cloud/api/v1/credentials/{credential_id}` |
| Authentication | ✅ Account token required |

Both `/credentials/{id}` and `/credentials/{id}/` are currently available; the examples consistently use the form without a trailing slash.

## Authentication Instructions (How to Obtain an Account Token)

Request header:

```http theme={null}
Authorization: Bearer ${PLATFORM_TOKEN}
```

For how to obtain it, see [Manage AceDataCloud Platform Account Tokens](https://platform.acedata.cloud/documents/platform-token).

## Path Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `credential_id` | UUID | ✅ | The credential ID to delete |

## Request Examples

### cURL

```shell theme={null}
curl -X DELETE 'https://platform.acedata.cloud/api/v1/credentials/df3e1b1b-9e72-4c4f-9a83-1e23f7c8b4d6' \
  -H "authorization: Bearer ${PLATFORM_TOKEN}"
```

### Python

```python theme={null}
import os
import requests

cred_id = "df3e1b1b-9e72-4c4f-9a83-1e23f7c8b4d6"
resp = requests.delete(
    f"https://platform.acedata.cloud/api/v1/credentials/{cred_id}",
    headers={"authorization": f"Bearer {os.environ['PLATFORM_TOKEN']}"},
    timeout=10,
)
assert resp.status_code == 204, resp.text
print("✅ Deleted")
```

### Node.js

```javascript theme={null}
const credId = 'df3e1b1b-9e72-4c4f-9a83-1e23f7c8b4d6'
const r = await fetch(`https://platform.acedata.cloud/api/v1/credentials/${credId}`, {
  method: 'DELETE',
  headers: { authorization: `Bearer ${process.env.PLATFORM_TOKEN}` },
})
console.log('status:', r.status) // 204
```

## Response

* **Success**: `HTTP 204 No Content`, **no response body**.
* **Failure**: Returns an error JSON; see the table below.

## Error Handling

| HTTP | code | Meaning |
| - | - | - |
| 401 | `not_authenticated` | Account token is missing |
| 403 | `permission_denied` | The credential does not belong to you |
| 404 | `not_found` | The credential does not exist or has been deleted |

## Practical Tips

* **Deletion is irreversible** — the platform does not retain Token copies. If you only suspect a leak and still want to retain monitoring data, use [Rotate AceDataCloud Platform API Credentials](https://platform.acedata.cloud/documents/platform-credential-rotate) instead of deletion.
* **Deletion does not refund the quota already consumed by this credential**. The Application balance is deducted in real time according to usage, and deleting a credential does not affect the balance ledger.
* After deletion, you can use the [API Credential List](https://platform.acedata.cloud/documents/platform-credential-list) to reconfirm the remaining credentials by `application_id`.
* **Verify callers before bulk cleanup**: the list currently has no last-used-time field; you should confirm that credentials are no longer in use based on deployment configuration and call records before deleting them one by one.

## Related APIs

* [Get AceDataCloud Platform API Credential List](https://platform.acedata.cloud/documents/platform-credential-list)
* [Rotate AceDataCloud Platform API Credentials](https://platform.acedata.cloud/documents/platform-credential-rotate) — Replace only the Token without deleting the credential
* [Create AceDataCloud Platform API Credentials](https://platform.acedata.cloud/documents/platform-credential-create)


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