POST
/
token
/
approve
Approve ERC20 allowance (EVM)
curl --request POST \
  --url https://app.afkcrypto.com/api/v1/token/approve \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "chain": "<string>",
  "from": "<string>",
  "token": "<string>",
  "spender": "<string>",
  "amount": "<string>",
  "simulate": true
}'
{ "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

Body

application/json

Response

200
application/json

Submission accepted

The response is of type object.