Skip to main content
POST
AddGasSponsor

Overview

AddGasSponsor registers a new gas sponsor for your project on the Relayer’s chain. Once a sponsor is active, the Transactions API relays matching transactions from your users without charging them gas — the cost is drawn from your project’s gas tank balance. You can sponsor:
  • A wallet address — any transaction sent from that wallet on this chain is sponsored.
  • A contract address — any user’s interaction with that contract on this chain is sponsored.
  • An arbitrary address — native-token transfers to that address are sponsored.
The same feature is available in Sequence Builder under Gas Sponsorship — the API is what powers it, and is the right choice when you need to manage sponsors programmatically (e.g. onboarding a new user cohort from your backend).

Authentication

AddGasSponsor is a privileged write endpoint. Every request must include both headers: Sending only the access key returns 403 PermissionDenied. Sending only the secret key returns 401 AccessKeyNotFound. Both keys must be present.
The Admin API Secret Key is a privileged JWT credential. Only use it from a trusted backend — never expose it in a browser, mobile app, or public repository.
If either section on the API Keys page is empty (You have no API Keys), create the missing key with + Add Public API Access Key or + Add Admin API Secret Key before calling this endpoint.

Endpoint URL

AddGasSponsor is exposed on each network’s Relayer host. Use the host matching the chain you want to sponsor on — for example:
  • Base mainnet: https://base-relayer.sequence.app/rpc/Relayer/AddGasSponsor
  • Polygon mainnet: https://polygon-relayer.sequence.app/rpc/Relayer/AddGasSponsor
  • Arbitrum mainnet: https://arbitrum-relayer.sequence.app/rpc/Relayer/AddGasSponsor
The full list of Relayer hosts is on the Transactions API overview.

Example request

cURL

Common errors

Authorizations

X-Access-Key
string
header
required

Public project access key for authenticating requests obtained on Sequence Builder. Example Test Key: AQAAAAAAAEGvyZiWA9FMslYeG_yayXaHnSI

Authorization
string
header
required

Secret JWT token for authenticating requests obtained from Sequence Builder - should not be exposed publicly.

Body

application/json
projectId
number
address
string
name
string
active
boolean

Response

OK

status
boolean
gasSponsor
object