Skip to main content
POST
/
accounts
/
{address}
/
submit
Submit transaction
curl --request POST \
  --url https://grid.squads.xyz/api/grid/v1/accounts/{address}/submit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-grid-environment: <api-key>' \
  --data '{
  "transaction": "base64encodedtransactionwithsignatures...",
  "kms_payloads": [
    {
      "provider": "privy",
      "signature": "base64signature1"
    }
  ]
}'
{
  "data": {
    "transaction_signature": "<string>",
    "confirmed_at": "2023-11-07T05:31:56Z"
  },
  "metadata": {
    "request_id": "123e4567-e89b-12d3-a456-426614174000",
    "timestamp": "2023-07-15T14:30:00.000Z"
  }
}
This endpoint submits a previously prepared transaction to the blockchain after verifying the required signatures from Grid Account authorization keys.
Using the Grid API directly requires advanced configurations. Grid SDK is the recommended way to submit transactions. It handles transaction preparation, signing, automatic failover, and submission. Learn more about the Grid SDK in the Grid SDK guide.
This endpoint requires a prepared transaction and valid signatures. Use transaction preparation endpoints first, then sign the KMS payload with your decrypted authorization key before calling this endpoint.

Account Type Signing Flows

Grid supports two types of accounts with different signing requirements. Choose the appropriate flow based on how your account was created:
For accounts created with email authentication (using Privy):

High-Level Process

  1. Prepare Transaction: Call transaction preparation endpoints (payments, transfers, etc.)
  2. Receive KMS Payload: Extract the kms_payload from the preparation response
  3. Sign Payload: Use your decrypted Privy authorization key to sign the canonical JSON
  4. Submit Transaction: Call this endpoint with the signature and transaction data

Key Requirements

  • Authorization keys from email account creation/authentication
  • JSON canonicalization of the KMS payload (recursive key sorting)
  • ECDSA P-256 SHA-256 signature algorithm

Complete Implementation Guide

For detailed implementation including HPKE keypair generation, authorization key decryption, JSON canonicalization, payload signing, and language-agnostic examples, see the Primary Provider Integration guide.
For accounts created with Ed25519 public keys:

Signing Process

  1. Prepare Transaction: Call transaction preparation endpoints (payments, transfers, etc.)
  2. Receive Transaction: Extract the prepared Solana transaction from the response
  3. Sign Transaction: Use your Ed25519 private keys with standard Solana transaction signing (e.g., web3.js)
  4. Submit Transaction: Call this endpoint with the signed transaction

Signature Requirements

  • Ed25519 private keys corresponding to the public keys specified during account creation
  • Threshold signatures meeting the account’s signing threshold
  • Standard Solana transaction signing (no KMS payload or JSON canonicalization required)
Signer-based accounts use regular Solana transaction signing with libraries like web3.js. No KMS payload processing or JSON canonicalization is required.
The signed transaction proves you have access to the required number of Grid Account signing keys and authorizes the transaction execution.

Implementation with web3.js

import { Transaction } from '@solana/web3.js';
import { Keypair } from '@solana/web3.js';

// Extract prepared transaction from API response
const preparedTransaction = Transaction.from(
  Buffer.from(response.transaction, 'base64')
);

// Sign with your Ed25519 keypairs (threshold signatures required)
const signers = [keypair1, keypair2]; // Your Ed25519 keypairs
preparedTransaction.sign(...signers);

// Submit the signed transaction
const signedTransaction = preparedTransaction.serialize();

Authorizations

Authorization
string
header
required

API key authentication with Bearer token. Include the API key in the Authorization header as 'Bearer YOUR_API_KEY'

x-grid-environment
string
header
required

Environment identifier for the Grid API. Use 'sandbox' for testing on devnet or 'production' for production on mainnet.

Path Parameters

address
string
required

Account address

Example:

"11111111111111111111111111111112"

Body

application/json
transaction
string
required

Base64 encoded transaction to submit

kms_payloads
object[]

KMS signature payloads from signing services

Response

Transaction submitted successfully

data
object
required

The actual response payload

metadata
object
required
I