Skip to main content
The “Try It” feature is disabled for this endpoint because it requires completing a WebAuthn passkey ceremony first. Use the Integration Guide for the complete account creation flow.
Creates a complete Grid smart account with a passkey as the initial signer. This endpoint combines passkey registration with smart account deployment in a single operation.

Key Features

  • One-Step Creation: Creates both passkey and smart account
  • 1/1 Threshold: Deploys account with single-signer configuration
  • Full Permissions: Passkey gets all permissions (mask=7: CAN_INITIATE | CAN_VOTE | CAN_EXECUTE)
  • Database Integration: Stores account in Grid database with full lifecycle management
  • Devnet Funding: Automatically funds sandbox accounts with 1 USDC

Account Configuration

Accounts created through this endpoint have:
  • Threshold: 1/1 (one signature required)
  • Initial Signer: The passkey with full permissions
  • Permission Mask: 7 (CAN_INITIATE | CAN_VOTE | CAN_EXECUTE)
  • Database Record: GridSmartAccount and GridUser entries created
  • Creation Record: Full audit trail of account creation

Response

Returns complete account details:
{
  "address": "5nP...xyz", // Smart account Solana address
  "type": "email", // or "signers" for multi-sig
  "status": "active",
  "policies": {
    "threshold": 1,
    "signers": [
      {
        "address": "7xK...abc", // Passkey address
        "permissions": 7
      }
    ]
  },
  "authentication": {
    "type": "passkey",
    "passkey_address": "7xK...abc"
  },
  "created_at": "2024-01-15T12:00:00Z",
  "expires_at": null
}

Implementation Flow

1

Create Passkey

Use POST /passkeys to create a passkey session
2

Complete WebAuthn

User completes passkey creation in hosted UI
3

Submit Response

Submit WebAuthn response to POST /passkeys/submit
4

Create Account

Call this endpoint with passkey details to create smart account
5

Use Account

Smart account is immediately ready for transactions

Sandbox Benefits

In the sandbox environment, newly created accounts receive:
  • 1 USDC: Automatically deposited for testing
  • Immediate Access: Ready for transactions without manual funding
  • Full Functionality: All Grid features available
Environment Isolation: Smart accounts have different addresses in sandbox vs production. Never send production funds to sandbox addresses or vice versa.

Important Notes

  • Passkey Required: Must have a valid passkey before calling this endpoint
  • Single Operation: Creates complete functional smart account in one call
  • Default Configuration: Uses secure defaults (1/1 threshold, full permissions)
  • Database Backed: Full Grid database integration for account management
  • Immediate Use: Account is active and ready for transactions immediately

Database Records Created

This endpoint creates:
  1. GridUser: User identity record
  2. GridSmartAccount: Smart account metadata and configuration
  3. CreationRecord: Audit trail with creation details

Error Handling

Common errors:
  • NoValidExternallySignedAccount: Passkey not found or invalid
  • InvalidPasskeyAddress: Passkey address format invalid
  • AccountCreationFailed: On-chain account creation failed
  • DatabaseError: Failed to store account metadata

Account Properties

Threshold

  • Default: 1/1
  • Requires one signature to execute transactions
  • Can be modified later through account updates

Passkey Permissions

Permission mask 7 includes:
  • CAN_INITIATE (1): Can create transaction proposals
  • CAN_VOTE (2): Can approve or reject proposals
  • CAN_EXECUTE (4): Can execute approved transactions
Total: 1 + 2 + 4 = 7 (full permissions)