# Revoke credential

## Why Credentials Can’t Be Deleted

Due to the nature of credentials, they cannot be deleted.\
To invalidate a specific credential for a user, you must revoke it.

Once revoked:

* The credential will no longer appear in the List Credentials endpoint.
* It will be excluded from all fit score calculations.

{% hint style="warning" %}
**You can only revoke credentials that your application originally assigned to the user**. \
Credentials issued by other apps or agents cannot be revoked by you.
{% endhint %}

## Credential Revocation

<mark style="color:green;">`POST`</mark> `/api.moojo.id/revoke-credential`

**Headers**

| Name         | Value                               |
| ------------ | ----------------------------------- |
| Content-Type | `application/json`                  |
| x-api-key    | `Your API KEY as provided by Moojo` |

**Body**

| Name           | Type   | Description                                                                                                                                                               |
| -------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `credentialId` | string | <p>A unique ID representing the credential you want to revoke.<br><br>You can get the ID by<a href="/pages/RoRBOcN4CCtnWJ1P9dbX"> listing the user's credentials</a>.</p> |

**Request example**

{% tabs %}
{% tab title="body" %}
{% code overflow="wrap" %}

```json
{
    "credentialID": "0x5dad0dcec629aebab6d0d458bfc4c044714a1d.....",
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

**Response example**

{% tabs %}
{% tab title="200" %}

```json
{
    "status": "success",
    "traceId": "b1adc9d8-1bb2-43c2-98d7-2ce6573f8b63",
    "data": {}
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.moojo.id/user-credentials/revoke-credential.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
