> For the complete documentation index, see [llms.txt](https://sodex.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sodex.com/documentation/for-developers/api-reference/relayer-api/submit-transaction.md).

# Submit Transaction

`POST /api/v1/relayer/tx`

Submit a contract call for relay. Protected by IP rate limiting.

**Request body** (`Content-Type: application/json`)

| Field            | Type   | Required | Description                                                                                                                                                                   |
| ---------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `target`         | string | yes      | Target contract address (checksum)                                                                                                                                            |
| `calldata`       | string | yes      | Call data (hex)                                                                                                                                                               |
| `integration_id` | string | yes      | Assigned, whitelisted integrator identifier. See [Register an integration ID](/documentation/for-developers/developers/valuechain-evm/relayer.md#register-an-integration-id). |

```json
{
  "target": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
  "calldata": "0x",
  "integration_id": "partner-a"
}
```

**Success result**

```json
{
  "tx_hash": "0xabc..."
}
```

| Field     | Type   | Description                |
| --------- | ------ | -------------------------- |
| `tx_hash` | string | Broadcast transaction hash |

**Common errors** (`status: "40001"`)

| Message                                                           | Cause                                              |
| ----------------------------------------------------------------- | -------------------------------------------------- |
| `invalid json body`                                               | JSON parse failure                                 |
| `ip is denied`                                                    | Client IP is denied                                |
| `invalid target address`                                          | Invalid `target`                                   |
| `target address must be checksummed`                              | Address is not EIP-55 checksummed                  |
| `target address is not an allowed contract`                       | Contract not whitelisted                           |
| `calldata is required`                                            | Empty `calldata`                                   |
| `invalid calldata: ...`                                           | Hex decode failure                                 |
| `integration_id is not allowed`                                   | Integration ID not whitelisted                     |
| `invalid gas limit: exceeds max gas limit (estimated: N, max: M)` | Estimated gas limit exceeds `sender.max_gas_limit` |

***

## Request example

Set `TARGET`, `CALLDATA`, and `INTEGRATION_ID` for your approved integration. This command broadcasts a contract call.

```bash
curl -sS https://mainnet-gw.sodex.dev/api/v1/relayer/tx \
  -H 'Content-Type: application/json' \
  --data "{\"target\":\"$TARGET\",\"calldata\":\"$CALLDATA\",\"integration_id\":\"$INTEGRATION_ID\"}"
```
