---
title: "Verify a SIWE signature"
method: POST
path: "/siwe/verify"
tags: ["auth", "siwe"]
---

# Verify a SIWE signature

`POST /siwe/verify`

## Request

- Base URL: `https://api.namefi.io/v-next`
- URL: `https://api.namefi.io/v-next/siwe/verify`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Verify a signed SIWE message, consume its nonce, and return a session token plus stored session details.

## Headers

- `x-namefi-eip7702-account` string
- `x-namefi-eip1271-account` string
- `x-namefi-erc1271-account` string

## Request body

- object: Input required to verify a signed SIWE message and create a session.
  - `signature` string, required: Hex-encoded signature produced for the SIWE message.
  - `message` object, required: EIP-4361 Sign-In with Ethereum message payload.
    - `address` string, required: Wallet address that signed the SIWE message.
    - `chainId` integer, required: EIP-155 chain ID the SIWE session is bound to.
    - `domain` string, required: Domain requesting the SIWE signature.
    - `expirationTime` string, date-time: ISO 8601 timestamp for a SIWE temporal field.
    - `issuedAt` string, date-time: ISO 8601 timestamp for a SIWE temporal field.
    - `nonce` string, required: Nonce previously issued by the server for this signer.
    - `notBefore` string, date-time: ISO 8601 timestamp for a SIWE temporal field.
    - `requestId` string: Optional identifier used to correlate the SIWE request.
    - `resources` string[]: Optional resources referenced by the SIWE message.
    - `scheme` string: Optional URI scheme for the relying party.
    - `statement` string: Human-readable statement presented during signing.
    - `uri` string, uri, required: URI that is the subject of the SIWE sign-in.
    - `version` '1', required: SIWE message version.
  - `address` string, required: Expected signer wallet address used to cross-check the SIWE message.

## Response `200`

OK

- union: Result of verifying a SIWE message and creating a session token.
  - object: Successful SIWE signature verification response.
    - `valid` unknown, required
    - `recoveredAddress` unknown
    - `token` string, uuid, required: Opaque SIWE session token to send on authenticated requests.
    - `session` object, required: Stored SIWE session details returned with the session token.
      - `address` unknown
      - `delegatorAddress` unknown
      - `chainId` integer, required: EIP-155 chain ID bound to the created SIWE session.
      - `createdAt` string, date-time, required: ISO timestamp describing when the SIWE session was created.
      - `maxAgeSeconds` integer, required: Session lifetime in seconds.
  - object: Failed SIWE signature verification response.
    - `valid` unknown, required
    - `error` string, required: Reason the SIWE signature could not be verified.

## Other responses

- `400`: 400
- `401`: 401
- `402`: 402
- `403`: 403
- `404`: 404
- `406`: 406
- `408`: 408
- `409`: 409
- `412`: 412
- `429`: 429
- `500`: 500

---

[API](https://skmtc.dev/namefi/apis/namefi-api.md) · [All operations](https://skmtc.dev/namefi/apis/namefi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/namefi/apis/namefi-api/revisions/3c7c3ade95c9?raw)
