Skip to main content
POST
/
accounts
/
verify
cURL
curl --request POST \
  --url https://grid.squads.xyz/api/grid/v1/accounts/verify \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "<string>",
  "kms_provider_config": {
    "encryption_public_key": "<string>",
    "otp_id": "<string>"
  },
  "otp_code": "<string>"
}'
{
  "data": {
    "address": "<string>",
    "authentication": [
      {
        "provider": "privy",
        "session": {
          "Privy": {
            "privy_access_token": "<string>",
            "refresh_token": "<string>",
            "session": {
              "authorization_key": "<string>",
              "encrypted_authorization_key": null,
              "expires_at": 1,
              "wallets": [
                {
                  "additional_signers": [
                    {}
                  ],
                  "address": "<string>",
                  "chain_type": "solana",
                  "created_at": 1,
                  "exported_at": 1,
                  "id": "<string>",
                  "imported_at": 1,
                  "owner_id": "<string>",
                  "policy_ids": [
                    "<string>"
                  ],
                  "public_key": "<string>"
                }
              ]
            },
            "token": "<string>",
            "user_id": "<string>"
          }
        }
      }
    ],
    "grid_user_id": "<string>",
    "policies": {
      "admin_address": "<string>",
      "signers": [
        {
          "address": "<string>",
          "permissions": [
            "CAN_INITIATE"
          ],
          "provider": "privy",
          "role": "primary"
        }
      ],
      "threshold": 1,
      "time_lock": 1
    },
    "status": "<string>"
  },
  "metadata": {
    "request_id": "<string>",
    "timestamp": "2023-11-07T05:31:56Z"
  }
}
This endpoint verifies the OTP received via email and completes the account creation process by deploying a Grid Account on the Solana blockchain with TEE-encrypted authorization keys.
Using the Grid API directly requires advanced configurations. Grid SDK is the recommended way to create accounts. It handles account creation, key management, authentication, automatic failover, and transaction signing. Learn more about the Grid SDK in the Grid SDK guide.
This is step 2 of the email-based Grid Account creation flow. You must have called the Create Account endpoint to initiate account creation before calling this endpoint.

OTP Limits

  • Attempts: Maximum 3 verification attempts per OTP
  • Expiration: 15-minute window from account creation
  • Retry: Must initiate new account creation if limits exceeded
The decrypted authorization key can be used to sign transactions on behalf of the Grid Account address.

Required Configuration

When using Privy as the authentication provider (default), you must include a kms_provider_config with your HPKE public key to receive encrypted authorization keys. This enables secure transaction signing for your Grid Account.

Complete Implementation Guide

For comprehensive implementation details including:
  • kms_provider_config creation
  • HPKE keypair generation with P-256 curve and DER formatting
  • Authorization key decryption using ECDH + HKDF + ChaCha20-Poly1305
  • Transaction payload signing with JSON canonicalization
  • Error handling and security best practices
  • Language-agnostic examples
See the Primary Provider Integration guide.

Authorizations

Authorization
string
header
required

Your Grid API key from the Grid Dashboard

Body

application/json
email
string
required
kms_provider_config
object
required
  • Option 1
  • Option 2
otp_code
string
required

Response

Account verified and created successfully

data
object
required
metadata
object
required