Delete a credential. Deletion cannot be undone.
Endpoint
DELETE /vaults/{vault_id}/credentials/{credential_id}
Paths are relative to the Base URL. Send Authorization: Bearer $DASHSCOPE_API_KEY on every request. For authentication details, see Authentication.
Path parametersvault_idstring (required)Parent vault ID. Treat it as an opaque IDcredential_id string (required)Credential ID. Treat it as an opaque ID | Request example |
Response fields200, returns a delete envelope:id stringID of the deleted credentialobject stringCredential deletion result object type, fixed as vault.credential.deleteddeleted booleanWhether deletion succeeded, true on successAfter deletion, retrieve and delete return 404. Deleting a credential does not delete its parent vault. | Response example |
Error codes
For the error response structure, see Errors.
| HTTP status | Error type / code | Solution |
|---|---|---|
401 | authentication_error / invalid_api_key | Send a valid Authorization: Bearer $DASHSCOPE_API_KEY header |
404 | not_found_error / not_found_error | The credential does not exist, is deleted, does not belong to the parent vault, or belongs to another workspace |
500 | server_error / server_error | Retry later. If it keeps failing, submit a ticket with x-request-id |