# IsDelegate API

The IsDelegate API is a **public** endpoint (no authentication) that checks whether an Ethereum wallet has a valid IsDelegate attestation chain. Use it to verify that a wallet is delegated to act on behalf of a verified identity before trusting it (e.g. in agents, integrations, or access control).

**Endpoint:** `GET /api/v1/is-delegate/{walletAddress}`\
**Category:** [Zipwire Attest](https://docs.zipwire.io/api#zipwire-attest)

***

## Request

```
GET https://zipwire.io/api/v1/is-delegate/{walletAddress}
```

| Parameter       | Type   | Description                                     |
| --------------- | ------ | ----------------------------------------------- |
| `walletAddress` | string | Ethereum wallet address (0x-prefixed, any case) |

***

## Response

The endpoint **always returns HTTP 200 OK**. Success or failure is indicated in the response body. Check the `success` field to determine the result.

### Success

The wallet has a valid IsDelegate attestation chain.

```json
{
  "success": true,
  "message": "IsDelegate attestation verified successfully",
  "code": null,
  "walletAddress": "0x775d3B494d98f123BecA7b186D7F472026EdCeA2",
  "attestations": [
    {
      "attestationUid": "0x7e08febe71e51acbdcb1d2c6175fb36958594074bed0f1e85b12adc6274eb8b2",
      "attestationExplorerUrl": "https://base.easscan.org/attestation/0x7e08febe71e51acbdcb1d2c6175fb36958594074bed0f1e85b12adc6274eb8b2",
      "valid": true,
      "pointsToHuman": true,
      "validationFailureCode": null,
      "validationFailureMessage": null
    }
  ]
}
```

| Field                    | Description                                                         |
| ------------------------ | ------------------------------------------------------------------- |
| `attestationUid`         | On-chain attestation identifier.                                    |
| `attestationExplorerUrl` | Link to view the attestation in the chain explorer.                 |
| `valid`                  | Whether this attestation passed validation.                         |
| `pointsToHuman`          | Whether the delegation chain resolves to a verified human identity. |

### Invalid wallet address

The address format is not a valid Ethereum address.

```json
{
  "success": false,
  "message": "Invalid Ethereum wallet address: not-an-address",
  "code": "InvalidWalletAddress",
  "walletAddress": null,
  "attestations": null
}
```

### No attestations found

The wallet has no IsDelegate attestations.

```json
{
  "success": false,
  "message": "No delegation attestations found for wallet",
  "code": "NoAttestationsFound",
  "walletAddress": null,
  "attestations": null
}
```

***

## Error codes

| Code                       | Meaning                                                  |
| -------------------------- | -------------------------------------------------------- |
| `InvalidWalletAddress`     | Wallet address format is invalid.                        |
| `NoAttestationsFound`      | No IsDelegate attestations exist for this wallet.        |
| `ValidationFailed`         | Attestation failed validation (e.g. revoked or expired). |
| `ProofPackValidationError` | ProofPack validation failed.                             |
| `InternalError`            | Server error; try again later.                           |

***

## How validation works

* The wallet address is checked against standard Ethereum address rules.
* Each attestation is validated (revocation, expiration, and chain integrity).
* The delegation chain is followed to a trusted root (e.g. Zipwire identity attestations).
* Authority continuity is checked so the chain is consistent.

For more on IsDelegate and how to use it in your app, see [IsDelegate: Agent Delegation & Authorization](https://docs.zipwire.io/fundamentals/security/attestations/isdelegate-agent-delegation) and [IsDelegate REST API](https://docs.zipwire.io/fundamentals/security/attestations/is-delegate-rest-api).
