# 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="retrieve-user-credentials"> 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 %}
