Delete Credential
Endpoint
DELETE /apiops/projects/{projectName}/credentials/{username}/
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| username | string | Yes | Username of the credential to delete |
Request Body
None.
Response
Success Response (200 OK)
{
"status": "SUCCESS",
"deploymentResult": {
"success": true,
"responseTime": 120,
"detailList": [
{
"envName": "production",
"podName": "worker-abc123",
"podIp": "10.0.0.1",
"success": true,
"responseTime": 120
}
]
}
}
Error Response (400 Bad Request)
{
"status": "FAILURE",
"resultMessage": "Credential (username: api-user) was not found!"
}
or, when the credential is managed by directory synchronization (LDAP, Database, or API):
{
"status": "FAILURE",
"resultMessage": "Sync-managed credential cannot be deleted manually; use directory sync."
}
Common Causes
- Credential username does not exist
- Project not found or insufficient access
- The credential is managed by a still-active directory synchronization source and can only be removed by that source's own reconciliation
Error Response (401 Unauthorized)
{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}
Error Response (409 Conflict)
{
"status": "FAILURE",
"resultMessage": "Delete refused: dependent records or holds exist"
}
Common Causes
- The credential still owns API clients not yet revoked. Revoke them from the manager interface first (see Suspending, Resuming and Revoking an API Client); already-revoked clients never block the delete
- A delete is already in progress for this credential — sent by any surface, including the manager interface. Retry once the other delete finishes; if the response keeps recurring long after nothing is actually deleting the credential, see Concurrent Deletion
cURL Example
curl -X DELETE \
"https://demo.apinizer.com/apiops/projects/MyProject/credentials/api-user/" \
-H "Authorization: Bearer YOUR_TOKEN"
Permissions
- User must have
IDENTITY+MANAGEpermission in the project - For automatic undeployment, user must also have
IDENTITY+DEPLOY_UNDEPLOYpermission
Notes and Warnings
-
Permanent Deletion:
- Credential is permanently deleted
- This action cannot be undone
- A credential still holding access grants or rate-limit history is deleted along with them — unlike a credential organization or a portal application, a credential's own access grants are never a reason its delete is refused
- Its API clients are the one exception: a credential still owning API clients not yet revoked is refused with
409 Conflictuntil they are revoked
-
Sync-Managed Credentials:
- A credential managed by directory synchronization (LDAP, Database, or API) cannot be deleted through this endpoint, or any other surface, manually
- It is removed only through its own provider's synchronization run, which retires it in place rather than deleting the row — see Credential Synchronization
-
Concurrent Deletes:
- Only one delete can be in progress for a given credential at a time; a second request while one is running is refused with
409 Conflict
- Only one delete can be in progress for a given credential at a time; a second request while one is running is refused with
-
Automatic Undeployment:
- Credential is automatically undeployed from all environments
- Undeployment results are returned in the response
-
Access Revocation:
- All access grants for this credential are also removed
- Credential will no longer have access to any API Proxies or Groups
-
Pilot teardown order: In the pilot collection, run
12 Credentials — Teardown (deferred)after 07 RLCL and 11 Connections — Teardown (deferred); deletescol-{runId}-credentialcreated in 06 Credentials Flow (also used by 07 RLCL and 10 Gateway Token Tests).
Related Documentation
- List Credentials - List all credentials
- Create Credential - Create a new credential
- Revoke Access - Revoke access from API Proxy or Group