Skip to main content
POST
/
contracts
/
send
Send contract transaction (EVM)
curl --request POST \
  --url https://api.afkcrypto.com/v1/contracts/send \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "chain": "<string>",
  "from": "<string>",
  "to": "<string>",
  "data": "<string>",
  "value": "<string>"
}'
{ "id": "tx_...", "status": "SUBMITTED", "hash": "0x..." }
{ "id": "tx_...", "status": "SUBMITTED", "hash": "0x..." }

Authorizations

x-api-key
string
header
required

Headers

Idempotency-Key
string<uuid>
required

Provide a unique Idempotency-Key per user to ensure single submission.

Body

application/json
chain
string
required

EVM chain slug.

to
string
required

Target contract address.

data
string
required

Calldata hex string (0x-prefixed).

from
string | null

Optional sender wallet; defaults to user's default wallet for the chain.

value
string | null

Optional native value in wei as a string.

Response

Submission accepted

id
string
required

AFK transaction id for the submitted action.

status
enum<string>
required

Submission status.

Available options:
SUBMITTED
hash
string | null
required

On-chain transaction hash/signature (may be null at submission time).

I