cURL
curl --request POST \
--url https://api.relay.link/execute \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"executionKind": "rawCalls",
"data": {
"chainId": 123,
"to": "<string>",
"data": "<string>",
"value": "<string>",
"authorizationList": [
{
"chainId": 123,
"address": "<string>",
"nonce": 123,
"yParity": 123,
"r": "<string>",
"s": "<string>"
}
]
},
"executionOptions": {
"referrer": "<string>",
"subsidizeFees": true
}
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
executionKind: 'rawCalls',
data: {
chainId: 123,
to: '<string>',
data: '<string>',
value: '<string>',
authorizationList: [
{
chainId: 123,
address: '<string>',
nonce: 123,
yParity: 123,
r: '<string>',
s: '<string>'
}
]
},
executionOptions: {referrer: '<string>', subsidizeFees: true}
})
};
fetch('https://api.relay.link/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.relay.link/execute"
payload = {
"executionKind": "rawCalls",
"data": {
"chainId": 123,
"to": "<string>",
"data": "<string>",
"value": "<string>",
"authorizationList": [
{
"chainId": 123,
"address": "<string>",
"nonce": 123,
"yParity": 123,
"r": "<string>",
"s": "<string>"
}
]
},
"executionOptions": {
"referrer": "<string>",
"subsidizeFees": True
}
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"message": "Transaction submitted",
"requestId": "0xabc123..."
}{
"error": "to is required"
}{
"error": "Unauthorized"
}{
"error": "Internal server error"
}API Reference
Execute Gasless Txs
This API executes gasless transactions
POST
/
execute
cURL
curl --request POST \
--url https://api.relay.link/execute \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"executionKind": "rawCalls",
"data": {
"chainId": 123,
"to": "<string>",
"data": "<string>",
"value": "<string>",
"authorizationList": [
{
"chainId": 123,
"address": "<string>",
"nonce": 123,
"yParity": 123,
"r": "<string>",
"s": "<string>"
}
]
},
"executionOptions": {
"referrer": "<string>",
"subsidizeFees": true
}
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
executionKind: 'rawCalls',
data: {
chainId: 123,
to: '<string>',
data: '<string>',
value: '<string>',
authorizationList: [
{
chainId: 123,
address: '<string>',
nonce: 123,
yParity: 123,
r: '<string>',
s: '<string>'
}
]
},
executionOptions: {referrer: '<string>', subsidizeFees: true}
})
};
fetch('https://api.relay.link/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.relay.link/execute"
payload = {
"executionKind": "rawCalls",
"data": {
"chainId": 123,
"to": "<string>",
"data": "<string>",
"value": "<string>",
"authorizationList": [
{
"chainId": 123,
"address": "<string>",
"nonce": 123,
"yParity": 123,
"r": "<string>",
"s": "<string>"
}
]
},
"executionOptions": {
"referrer": "<string>",
"subsidizeFees": True
}
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"message": "Transaction submitted",
"requestId": "0xabc123..."
}{
"error": "to is required"
}{
"error": "Unauthorized"
}{
"error": "Internal server error"
}Headers
Required API key for authentication. Contact the team for getting an API Key
Body
application/json
The kind of gasless transaction to execute. Currently supported: rawCalls
Available options:
rawCalls Raw call parameters for the gasless transaction
Show child attributes
Show child attributes
Options related to gas fee sponsorship, app referrer and destination calls
Show child attributes
Show child attributes
The request ID of the gasless transaction to execute
Was this page helpful?