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

# Get Identity

> Retrieve identity information by ZKS ID or wallet address

## Overview

Get detailed information about a ZKScore identity, including their ZKS ID, wallet address, activation status, and metadata.

## Parameters

<ParamField path="identity" type="string" required>
  ZKS ID (e.g., `alice.zks`) or wallet address (e.g., `0x742d35Cc...`)
</ParamField>

<Note>
  **ZKS ID Requirements**: If using a ZKS ID, it must be activated (soulbound). The API will return the primary wallet address and aggregated data across all linked wallets.
</Note>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

<ResponseField name="zksId" type="string | null">
  The ZKS ID (without .zks suffix), or null if not set
</ResponseField>

<ResponseField name="address" type="string">
  The primary wallet address
</ResponseField>

<ResponseField name="identity" type="object">
  <Expandable title="properties">
    <ResponseField name="tokenId" type="number">
      The NFT token ID of the identity
    </ResponseField>

    <ResponseField name="name" type="string">
      The ZKS ID name (without .zks suffix)
    </ResponseField>

    <ResponseField name="ownerAddress" type="string">
      The wallet address that owns this identity
    </ResponseField>

    <ResponseField name="isActivated" type="boolean">
      Whether the identity is activated (soulbound)
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO 8601 timestamp of when the identity was minted
    </ResponseField>

    <ResponseField name="activatedAt" type="string | null">
      ISO 8601 timestamp of when the identity was activated
    </ResponseField>
  </Expandable>
</ResponseField>

## Examples

<CodeGroup>
  ```bash cURL (ZKS ID) theme={null}
  curl https://api.onzks.com/v1/identity/alice.zks \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```bash cURL (Wallet Address) theme={null}
  curl https://api.onzks.com/v1/identity/0x742d35Cc6635C0532925a3b844D1FF4e1321 \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.onzks.com/v1/identity/alice.zks', {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  });

  const data = await response.json();
  console.log(data.identity);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.onzks.com/v1/identity/alice.zks',
      headers={'Authorization': 'Bearer YOUR_API_KEY'}
  )

  data = response.json()
  print(data['identity'])
  ```
</CodeGroup>

## Response Example

```json theme={null}
{
  "success": true,
  "zksId": "alice",
  "address": "0x742d35cc6635c0532925a3b844d1ff4e1321",
  "identity": {
    "tokenId": 12345,
    "name": "alice",
    "ownerAddress": "0x742d35cc6635c0532925a3b844d1ff4e1321",
    "isActivated": true,
    "createdAt": "2024-01-15T10:30:00Z",
    "activatedAt": "2024-01-15T11:00:00Z"
  }
}
```

## Error Responses

<ResponseExample>
  ```json 404 Not Found theme={null}
  {
    "success": false,
    "error": "Identity 'alice.zks' not found or not activated"
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "success": false,
    "error": "Invalid identity format. Must be a wallet address or a ZKS ID (e.g., 'alice.zks')"
  }
  ```
</ResponseExample>

## Use Cases

### 1. Profile Lookup

Use ZKS ID for a cleaner user experience:

```javascript theme={null}
// User enters their ZKS ID
const identity = await getIdentity('alice.zks');
displayProfile(identity);
```

### 2. Identity Verification

Check if an identity exists and is activated:

```javascript theme={null}
const identity = await getIdentity('alice.zks');
if (identity.identity.isActivated) {
  console.log('Identity is verified and soulbound');
}
```

### 3. Address Resolution

Resolve a ZKS ID to a wallet address:

```javascript theme={null}
const identity = await getIdentity('alice.zks');
const walletAddress = identity.address;
```

## Related Endpoints

* [Mint Identity](/api-reference/identity/mint-identity) - Create a new identity
* [Activate Identity](/api-reference/identity/activate-identity) - Make an identity soulbound
* [Check Availability](/api-reference/identity/check-availability) - Check if a name is available
