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": {
"subsidizeFees": true,
"referrer": "<string>"
}
}
'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: {subsidizeFees: true, referrer: '<string>'}
})
};
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": {
"subsidizeFees": True,
"referrer": "<string>"
}
}
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": "DELEGATION_REDEEM_FAILED",
"errorCode": "INVALID_REQUEST_PARAMS",
"message": "Delegation redemption reverted without data. Verify the signed delegation is unredeemed and matches the current chain, mode, and account.",
"requestId": "0xabc123...",
"details": {
"topLevel": {
"type": "<string>",
"address": "<string>",
"contract": "<string>",
"function": "<string>",
"selector": "<string>",
"error": "<string>",
"revertReason": "<string>",
"gasUsed": "<string>"
},
"innermost": {
"type": "<string>",
"address": "<string>",
"contract": "<string>",
"function": "<string>",
"selector": "<string>",
"error": "<string>",
"revertReason": "<string>",
"gasUsed": "<string>"
},
"path": [
{
"type": "<string>",
"address": "<string>",
"contract": "<string>",
"function": "<string>",
"selector": "<string>",
"error": "<string>",
"revertReason": "<string>",
"gasUsed": "<string>"
}
],
"revert": {
"type": "errorString",
"label": "DELEGATION_REDEEM_FAILED",
"message": "Delegation redemption reverted without data. Verify the signed delegation is unredeemed and matches the current chain, mode, and account.",
"selector": "0x08c379a0",
"name": "Error",
"args": {},
"rawArgsHex": "<string>"
}
}
}{
"error": "Unauthorized",
"errorCode": "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": {
"subsidizeFees": true,
"referrer": "<string>"
}
}
'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: {subsidizeFees: true, referrer: '<string>'}
})
};
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": {
"subsidizeFees": True,
"referrer": "<string>"
}
}
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": "DELEGATION_REDEEM_FAILED",
"errorCode": "INVALID_REQUEST_PARAMS",
"message": "Delegation redemption reverted without data. Verify the signed delegation is unredeemed and matches the current chain, mode, and account.",
"requestId": "0xabc123...",
"details": {
"topLevel": {
"type": "<string>",
"address": "<string>",
"contract": "<string>",
"function": "<string>",
"selector": "<string>",
"error": "<string>",
"revertReason": "<string>",
"gasUsed": "<string>"
},
"innermost": {
"type": "<string>",
"address": "<string>",
"contract": "<string>",
"function": "<string>",
"selector": "<string>",
"error": "<string>",
"revertReason": "<string>",
"gasUsed": "<string>"
},
"path": [
{
"type": "<string>",
"address": "<string>",
"contract": "<string>",
"function": "<string>",
"selector": "<string>",
"error": "<string>",
"revertReason": "<string>",
"gasUsed": "<string>"
}
],
"revert": {
"type": "errorString",
"label": "DELEGATION_REDEEM_FAILED",
"message": "Delegation redemption reverted without data. Verify the signed delegation is unredeemed and matches the current chain, mode, and account.",
"selector": "0x08c379a0",
"name": "Error",
"args": {},
"rawArgsHex": "<string>"
}
}
}{
"error": "Unauthorized",
"errorCode": "UNAUTHORIZED"
}{
"error": "Internal server error"
}Headers
Body
application/json
Was this page helpful?