## Documentation Index

Fetch the complete documentation index at: [/llms.txt](https://docs.relay.link/llms.txt)

Use this file to discover all available pages before exploring further.

### cURL

```bash
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
  }
}
'
```

```javascript
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));
```

```python
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)
```

### Response Codes

- **200**: Transaction successfully queued for execution
- **400**: Bad request, possibly due to incorrect parameters
- **401**: Unauthorized, invalid API key
- **500**: Internal server error

### Sample Responses

```json
{
  "message": "Transaction submitted",
  "requestId": "0xabc123..."
}
```

```json
{
  "error": "to is required"
}
```

```json
{
  "error": "Unauthorized"
}
```

```json
{
  "error": "Internal server error"
}
```

### Headers

- **x-api-key**: required, string - Required API key for authentication. Contact the team for getting an API Key.

### Body

- **executionKind**: required, enum<string> - The kind of gasless transaction to execute. Available options: `rawCalls`.
- **data**: required, object - Raw call parameters for the gasless transaction.
- **executionOptions**: required, object - Options related to gas fee sponsorship, app referrer, and destination calls.
