relayer_sendTransaction
curl --request POST \
--url https://api.gelato.cloud/rpc \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "relayer_sendTransaction",
"params": {
"chainId": "137",
"payment": {
"type": "sponsored"
},
"to": "0x55f3a93f544e01ce4378d25e927d7c493b863bd7",
"data": "0x29cb0f49...",
"context": "<string>",
"authorizationList": [
{
"address": "<string>",
"chainId": 123,
"nonce": 123,
"r": "<string>",
"s": "<string>",
"yParity": 123
}
]
}
}
'import requests
url = "https://api.gelato.cloud/rpc"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "relayer_sendTransaction",
"params": {
"chainId": "137",
"payment": { "type": "sponsored" },
"to": "0x55f3a93f544e01ce4378d25e927d7c493b863bd7",
"data": "0x29cb0f49...",
"context": "<string>",
"authorizationList": [
{
"address": "<string>",
"chainId": 123,
"nonce": 123,
"r": "<string>",
"s": "<string>",
"yParity": 123
}
]
}
}
headers = {
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 1,
jsonrpc: '2.0',
method: 'relayer_sendTransaction',
params: {
chainId: '137',
payment: {type: 'sponsored'},
to: '0x55f3a93f544e01ce4378d25e927d7c493b863bd7',
data: '0x29cb0f49...',
context: '<string>',
authorizationList: [
{
address: '<string>',
chainId: 123,
nonce: 123,
r: '<string>',
s: '<string>',
yParity: 123
}
]
}
})
};
fetch('https://api.gelato.cloud/rpc', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gelato.cloud/rpc",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 1,
'jsonrpc' => '2.0',
'method' => 'relayer_sendTransaction',
'params' => [
'chainId' => '137',
'payment' => [
'type' => 'sponsored'
],
'to' => '0x55f3a93f544e01ce4378d25e927d7c493b863bd7',
'data' => '0x29cb0f49...',
'context' => '<string>',
'authorizationList' => [
[
'address' => '<string>',
'chainId' => 123,
'nonce' => 123,
'r' => '<string>',
's' => '<string>',
'yParity' => 123
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gelato.cloud/rpc"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"relayer_sendTransaction\",\n \"params\": {\n \"chainId\": \"137\",\n \"payment\": {\n \"type\": \"sponsored\"\n },\n \"to\": \"0x55f3a93f544e01ce4378d25e927d7c493b863bd7\",\n \"data\": \"0x29cb0f49...\",\n \"context\": \"<string>\",\n \"authorizationList\": [\n {\n \"address\": \"<string>\",\n \"chainId\": 123,\n \"nonce\": 123,\n \"r\": \"<string>\",\n \"s\": \"<string>\",\n \"yParity\": 123\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gelato.cloud/rpc")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"relayer_sendTransaction\",\n \"params\": {\n \"chainId\": \"137\",\n \"payment\": {\n \"type\": \"sponsored\"\n },\n \"to\": \"0x55f3a93f544e01ce4378d25e927d7c493b863bd7\",\n \"data\": \"0x29cb0f49...\",\n \"context\": \"<string>\",\n \"authorizationList\": [\n {\n \"address\": \"<string>\",\n \"chainId\": 123,\n \"nonce\": 123,\n \"r\": \"<string>\",\n \"s\": \"<string>\",\n \"yParity\": 123\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gelato.cloud/rpc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"relayer_sendTransaction\",\n \"params\": {\n \"chainId\": \"137\",\n \"payment\": {\n \"type\": \"sponsored\"\n },\n \"to\": \"0x55f3a93f544e01ce4378d25e927d7c493b863bd7\",\n \"data\": \"0x29cb0f49...\",\n \"context\": \"<string>\",\n \"authorizationList\": [\n {\n \"address\": \"<string>\",\n \"chainId\": 123,\n \"nonce\": 123,\n \"r\": \"<string>\",\n \"s\": \"<string>\",\n \"yParity\": 123\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"jsonrpc": "2.0",
"result": "0x0e670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}{
"jsonrpc": "2.0",
"id": 123,
"error": {
"code": 123,
"message": "<string>"
}
}{
"jsonrpc": "2.0",
"id": 123,
"error": {
"code": 123,
"message": "<string>"
}
}Relayer API Endpoints
relayer_sendTransaction
Submits a signed transaction intent to the relayer for on-chain execution. Returns a unique task ID for tracking.
POST
/
rpc
relayer_sendTransaction
curl --request POST \
--url https://api.gelato.cloud/rpc \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "relayer_sendTransaction",
"params": {
"chainId": "137",
"payment": {
"type": "sponsored"
},
"to": "0x55f3a93f544e01ce4378d25e927d7c493b863bd7",
"data": "0x29cb0f49...",
"context": "<string>",
"authorizationList": [
{
"address": "<string>",
"chainId": 123,
"nonce": 123,
"r": "<string>",
"s": "<string>",
"yParity": 123
}
]
}
}
'import requests
url = "https://api.gelato.cloud/rpc"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "relayer_sendTransaction",
"params": {
"chainId": "137",
"payment": { "type": "sponsored" },
"to": "0x55f3a93f544e01ce4378d25e927d7c493b863bd7",
"data": "0x29cb0f49...",
"context": "<string>",
"authorizationList": [
{
"address": "<string>",
"chainId": 123,
"nonce": 123,
"r": "<string>",
"s": "<string>",
"yParity": 123
}
]
}
}
headers = {
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 1,
jsonrpc: '2.0',
method: 'relayer_sendTransaction',
params: {
chainId: '137',
payment: {type: 'sponsored'},
to: '0x55f3a93f544e01ce4378d25e927d7c493b863bd7',
data: '0x29cb0f49...',
context: '<string>',
authorizationList: [
{
address: '<string>',
chainId: 123,
nonce: 123,
r: '<string>',
s: '<string>',
yParity: 123
}
]
}
})
};
fetch('https://api.gelato.cloud/rpc', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gelato.cloud/rpc",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 1,
'jsonrpc' => '2.0',
'method' => 'relayer_sendTransaction',
'params' => [
'chainId' => '137',
'payment' => [
'type' => 'sponsored'
],
'to' => '0x55f3a93f544e01ce4378d25e927d7c493b863bd7',
'data' => '0x29cb0f49...',
'context' => '<string>',
'authorizationList' => [
[
'address' => '<string>',
'chainId' => 123,
'nonce' => 123,
'r' => '<string>',
's' => '<string>',
'yParity' => 123
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gelato.cloud/rpc"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"relayer_sendTransaction\",\n \"params\": {\n \"chainId\": \"137\",\n \"payment\": {\n \"type\": \"sponsored\"\n },\n \"to\": \"0x55f3a93f544e01ce4378d25e927d7c493b863bd7\",\n \"data\": \"0x29cb0f49...\",\n \"context\": \"<string>\",\n \"authorizationList\": [\n {\n \"address\": \"<string>\",\n \"chainId\": 123,\n \"nonce\": 123,\n \"r\": \"<string>\",\n \"s\": \"<string>\",\n \"yParity\": 123\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gelato.cloud/rpc")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"relayer_sendTransaction\",\n \"params\": {\n \"chainId\": \"137\",\n \"payment\": {\n \"type\": \"sponsored\"\n },\n \"to\": \"0x55f3a93f544e01ce4378d25e927d7c493b863bd7\",\n \"data\": \"0x29cb0f49...\",\n \"context\": \"<string>\",\n \"authorizationList\": [\n {\n \"address\": \"<string>\",\n \"chainId\": 123,\n \"nonce\": 123,\n \"r\": \"<string>\",\n \"s\": \"<string>\",\n \"yParity\": 123\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gelato.cloud/rpc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"relayer_sendTransaction\",\n \"params\": {\n \"chainId\": \"137\",\n \"payment\": {\n \"type\": \"sponsored\"\n },\n \"to\": \"0x55f3a93f544e01ce4378d25e927d7c493b863bd7\",\n \"data\": \"0x29cb0f49...\",\n \"context\": \"<string>\",\n \"authorizationList\": [\n {\n \"address\": \"<string>\",\n \"chainId\": 123,\n \"nonce\": 123,\n \"r\": \"<string>\",\n \"s\": \"<string>\",\n \"yParity\": 123\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"jsonrpc": "2.0",
"result": "0x0e670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}{
"jsonrpc": "2.0",
"id": 123,
"error": {
"code": 123,
"message": "<string>"
}
}{
"jsonrpc": "2.0",
"id": 123,
"error": {
"code": 123,
"message": "<string>"
}
}Headers
Gelato API key for authentication.
Body
application/json
⌘I