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

# Claim Vault Referral Code

> Claim a referral code for an existing vault.

```http theme={null}
POST /api/v1/lake/claim_referral_code
```

The operation type for signing is `"claim_lake_referral"`.

Only the vault creator can claim a referral code for an existing vault.

#### Request Body

<table><thead><tr><th width="180">Field</th><th width="110">Type</th><th width="90">Need</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><code>"account"</code></td><td>string</td><td>required</td><td>Creator wallet address</td><td><code>42trU9A5...</code></td></tr><tr><td><code>"signature"</code></td><td>string</td><td>required</td><td>Cryptographic signature</td><td><code>5J3mBbAH...</code></td></tr><tr><td><code>"timestamp"</code></td><td>integer</td><td>required</td><td>Current timestamp in milliseconds</td><td><code>1716200000000</code></td></tr><tr><td><code>"lake"</code></td><td>string</td><td>required</td><td>Vault address</td><td><code>AbCdEfGh123456789...</code></td></tr><tr><td><code>"code"</code></td><td>string</td><td>required</td><td>Referral code to claim</td><td><code>testcode</code></td></tr><tr><td><code>"agent\_wallet"</code></td><td>string</td><td>optional</td><td>Agent wallet address</td><td><code>69trU9A5...</code></td></tr><tr><td><code>"expiry\_window"</code></td><td>integer</td><td>optional</td><td>Signature expiry in milliseconds</td><td><code>30000</code></td></tr></tbody></table>

```json theme={null}
{
  "account": "42trU9A5...",
  "signature": "5J3mBbAH...",
  "timestamp": 1716200000000,
  "lake": "AbCdEfGh123456789...",
  "code": "testcode"
}
```

#### Response

* Status 200: Referral code claimed successfully

```json theme={null}
{
  "success": true,
  "data": {
    "success": true
  },
  "error": null,
  "code": null
}
```

* Status 400: Invalid request parameters or caller is not the vault creator
* Status 401: Unauthorized access
* Status 500: Internal server error
