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

# Revoke Identity

> Revoke an on-chain identity verification

Revokes a previously verified identity on-chain and marks the off-chain customer record `revoked`. Use this when a customer fails ongoing compliance checks or when their verification must be invalidated.

Call it once without `txHash` to get the calldata, and again with `txHash` once you have broadcast it. The record is updated on the second call.

## Request Body

<ParamField body="walletAddress" type="string" required>
  Ethereum wallet address to revoke.
</ParamField>

<ParamField body="txHash" type="string">
  Hash of the transaction you broadcast. Send it to confirm the revocation and update the record. Omit it to receive the calldata.
</ParamField>

## Response Fields

<ResponseField name="data" type="object">
  <Expandable>
    <ResponseField name="action" type="string">`SIGN_TRANSACTION`. Returned when `txHash` is omitted.</ResponseField>
    <ResponseField name="transaction" type="object">`to` (the identity registry) and `data`. Returned when `txHash` is omitted.</ResponseField>
    <ResponseField name="functionName" type="string">Always `revokeIdentity`. Returned when `txHash` is omitted.</ResponseField>
    <ResponseField name="confirmWith" type="object">Where to send the hash once broadcast, as `endpoint` and `field`. Returned when `txHash` is omitted.</ResponseField>
    <ResponseField name="walletAddress" type="string">Checksummed address.</ResponseField>
    <ResponseField name="status" type="string">Always `revoked`. Returned when confirming with `txHash`.</ResponseField>
    <ResponseField name="txHash" type="string">The confirmed transaction hash. Returned when confirming with `txHash`.</ResponseField>
    <ResponseField name="gasUsed" type="string">Gas consumed. Returned when confirming with `txHash`.</ResponseField>
  </Expandable>
</ResponseField>

<Note>
  Confirmation checks that the transaction called `revokeIdentity` on the address you named. A receipt that revokes a different address is rejected and no record changes.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.trusset.org/customers/api/identity/revoke" \
    -H "Content-Type: application/json" \
    -H "X-API-Key: trusset_abc123xy_secret..." \
    -d '{ "walletAddress": "0xAbC123dEf456789012345678901234567890AbCd" }'
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch(
    'https://api.trusset.org/customers/api/identity/revoke',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'X-API-Key': 'trusset_abc123xy_secret...'
      },
      body: JSON.stringify({
        walletAddress: '0xAbC123dEf456789012345678901234567890AbCd'
      })
    }
  );
  const { data } = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json Calldata Response theme={null}
  {
    "success": true,
    "data": {
      "action": "SIGN_TRANSACTION",
      "transaction": {
        "to": "0x5B3c9D1e7F2a4B6c8D0e2F4a6B8c0D2e4F6a8B0c",
        "data": "0x7b1e9c40..."
      },
      "functionName": "revokeIdentity",
      "description": "Revoke 0xabc123def456789012345678901234567890abcd on the identity registry",
      "walletAddress": "0xabc123def456789012345678901234567890abcd",
      "confirmWith": {
        "endpoint": "POST /customers/api/identity/revoke",
        "field": "txHash"
      }
    },
    "metadata": {
      "requestId": "550e8400-e29b-41d4-a716-446655440000",
      "timestamp": "2025-06-15T12:00:00.000Z"
    }
  }
  ```

  ```json Confirmed Response theme={null}
  {
    "success": true,
    "data": {
      "walletAddress": "0xabc123def456789012345678901234567890abcd",
      "status": "revoked",
      "txHash": "0xabc123def456789012345678901234567890abc123def456789012345678901234",
      "gasUsed": "42150"
    },
    "metadata": {
      "requestId": "550e8400-e29b-41d4-a716-446655440000",
      "timestamp": "2025-06-15T12:00:00.000Z"
    }
  }
  ```
</ResponseExample>
