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

# Delete credential

> Delete a credential

Delete a credential. This operation fails if the credential is linked to any active registrations — unlink the credential from all registrations first.

## Path parameters

<ParamField path="id" type="string" required>
  The unique identifier (UUID) of the credential to delete.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request DELETE \
    --url 'https://transaction-tax.api.in.commenda.io/api/v1/credentials/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
    --header 'Authorization: Bearer <your_token>'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "message": "Successfully deleted credential.",
    "data": {
      "credential": {
        "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "deleted": true
      }
    }
  }
  ```

  ```json 404 - Not found theme={null}
  {
    "error": {
      "type": "CREDENTIAL_NOT_FOUND",
      "title": "Credential not found.",
      "detail": {
        "description": "The credential does not exist or you don't have access."
      },
      "status": 404,
      "instance": "/api/v1/credentials/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    }
  }
  ```

  ```json 400 - Has active registrations theme={null}
  {
    "error": {
      "type": "CREDENTIAL_HAS_ACTIVE_REGISTRATIONS",
      "title": "Cannot delete credential with active registrations.",
      "detail": {
        "description": "This credential is linked to one or more active registrations. Remove the credential from all registrations before deleting."
      },
      "status": 400,
      "instance": "/api/v1/credentials/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    }
  }
  ```
</ResponseExample>
