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

# Collect New Wallet

> Submit a stakeholder's newly collected wallet for a target token via a signed message, creating the corresponding allocation.

Submit a stakeholder's newly collected wallet for a target (e.g. pre-sale)
token. The request carries a signed message proving wallet ownership; on success
Magna creates the allocation on the target token using that token's pre-sale
configuration.

**Route:** `POST /api/external/v1/allocations/collect-new-wallet`

## Headers

| Header              | Required | Description                |
| ------------------- | -------- | -------------------------- |
| `Content-Type`      | Yes      | Must be `application/json` |
| `x-magna-api-token` | Yes      | Your Magna API token       |

## Body parameters

| Field           | Type          | Required | Description                                                                   |
| --------------- | ------------- | -------- | ----------------------------------------------------------------------------- |
| `tokenId`       | string (uuid) | Yes      | The source token the allocation currently belongs to                          |
| `walletAddress` | string        | Yes      | The wallet address that signed the message                                    |
| `message`       | string        | Yes      | The signed message (SIWE-style; the statement section is base64-encoded JSON) |
| `signature`     | string        | Yes      | Signature of `message` produced by `walletAddress`                            |

The encoded statement decodes to: `distributionId`, `oldWallet`, `newWallet`, `targetTokenId`.

## Request example

```sh theme={null}
curl -X POST https://app.magna.so/api/external/v1/allocations/collect-new-wallet \
-H 'Content-Type: application/json' \
-H 'x-magna-api-token: YOUR_API_KEY' \
-d '{
  "tokenId": "b3f1c0d2-1111-2222-3333-444455556666",
  "walletAddress": "0xAbC...123",
  "message": "<siwe-message>",
  "signature": "0x<signature>"
}'
```

## Response example

```json theme={null}
{
  "processed": true
}
```

<Note>
  If the message can't be verified or the wallet/token don't match the
  allocation, the request is not processed and returns `{ "isProcessed": false }`.
</Note>
