---
title: "Submit a contract write call"
method: POST
path: "/contracts/v1/call"
tags: ["Contracts"]
---

# Submit a contract write call

`POST /contracts/v1/call`

## Request

- Base URL: `https://api.run402.com`
- URL: `https://api.run402.com/contracts/v1/call`
- Auth: HTTP bearer

Submit a write call to a smart contract from a signer. The gateway validates the contract address, encodes the call via viem, signs the digest with the signer's key, which never leaves the platform's key custody, and broadcasts to the chain. Lifecycle-gated for non-active projects. Idempotent on optional Idempotency-Key header with request fingerprinting; mismatched replays return 409 carrying the stored call's status/call_error/tx_hash. A matched replay of a call that failed before anything was broadcast (e.g. an estimate-gas revert) re-executes under the same call_id; a matched replay of a broadcast-phase or legacy failure returns the stored failure as 502 with retryable: false and a new_idempotency_key next-action. Cost: chain gas at-cost + $0.000005 signing fee per call. Returns 202 with call_id and tx_hash.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `signer_id` string, required
  - `chain` string, required
  - `contract_address` string, required
  - `abi_fragment` unknown[], required
    - unknown
  - `function_name` string, required
  - `args` unknown[], required
    - unknown
  - `value` string: Optional native-token value in wei (non-negative decimal string; legacy alias for value_wei)
  - `value_wei` string: Optional native-token value in wei (non-negative decimal string)

## Response `202`

Submitted, returns { call_id, tx_hash, status: pending }

- ContractCallSubmitted
  - `call_id` string, required
  - `tx_hash` string, required
  - `status` 'pending' | 'failed', required

## Other responses

- `400`: Invalid request, invalid_value_wei, ABI parse failure, or function not in ABI
- `403`: Insufficient native balance, wallet suspended for unpaid rent, or project is past_due/frozen/dormant
- `404`: Wallet not found
- `409`: Idempotency-Key was reused with a different request fingerprint. The body carries the stored call's call_id, status, call_error, and tx_hash so the caller can poll an in-flight/confirmed call or mint a new Idempotency-Key for a terminally failed one.
- `410`: Wallet deleted
- `502`: RPC broadcast failure. retryable: true when the failure happened before broadcast (a same-key retry re-executes); retryable: false plus a new_idempotency_key next-action when the send was ambiguous (broadcast-phase) or the stored failure predates failure-phase tracking.

---

[API](https://skmtc.dev/run402/apis/run402-api.md) · [All operations](https://skmtc.dev/run402/apis/run402-api/llms.txt) · [OpenAPI document](https://skmtc.dev/run402/apis/run402-api/revisions/893607557f50?raw)
