---
title: "Link wallet"
method: POST
path: "/me/identities/siwe"
tags: ["Me"]
---

# Link wallet

`POST /me/identities/siwe`

## Request

- Base URL: `https://console-api.blockvectra.com/v1`
- URL: `https://console-api.blockvectra.com/v1/me/identities/siwe`
- Auth: HTTP bearer

Submit `purpose=link` challenge message (requested in same session) and signature. Request `Origin` mode must match challenge: browser challenge must send same `Origin` (`https://<stored domain>`), programmatic challenge must omit `Origin`, otherwise returns 400 `siwe_invalid` (reason `domain_mismatch`). New link returns 201; returns 200 idempotently if wallet already belongs to this user.

Scope of support:
- Supported: EOA wallets on Ethereum mainnet (Chain ID 1).
- Not supported: Any other chains (Chain ID is embedded by server; submitting modified Chain ID fails byte-for-byte check returning 400 `siwe_invalid`, reason `signature`), contract wallets (EIP-1271), and smart accounts.

## Request body

- SiweVerifyRequest
  - `message` string, required: EIP-4361 message (LF line endings, no trailing newline), up to 2048 bytes.
  - `signature` string, required: 65-byte ECDSA signature (r||s||v).

## Response `200`

Wallet already linked to this user (idempotent).

- IdentityView
  - `identity_id` string, required
  - `provider` 'siwe' | 'github' | 'google', required
  - `subject` string, required: SIWE: `eip155:1:<lowercase address>`; GitHub: numeric id; Google: `sub`.
  - `display` string, nullable, required: EIP-55 address for SIWE, login for GitHub (display only), null for Google.
  - `created_at` string, date-time, required: RFC 3339 UTC, second precision, ending in `Z` (`2026-09-26T08:00:00Z`); no fractional seconds, without `+00:00` timezone offsets.
  - `last_login_at` string, date-time, required: RFC 3339 UTC, second precision, ending in `Z` (`2026-09-26T08:00:00Z`); no fractional seconds, without `+00:00` timezone offsets.

## Other responses

- `201`: Newly linked identity.
- `400`: Verification failed (including challenge purpose not link, or not requested in this session).
- `401`: Missing or invalid session (without distinguishing cause).
- `409`: Wallet already linked to another user, or user already has 5 linked identities.
- `413`: Request body exceeds 64 KiB limit. Exceeding this limit returns 413 (`payload_too_large`).
- `429`: Rate limit exceeded.
- `500`: Internal server error.

---

[API](https://skmtc.dev/blockvectra/apis/blockvectra-console-api.md) · [All operations](https://skmtc.dev/blockvectra/apis/blockvectra-console-api/llms.txt) · [OpenAPI document](https://skmtc.dev/blockvectra/apis/blockvectra-console-api/revisions/28c91298f433?raw)
