POST
/
reward
/
credit
curl --request POST \
  --url https://api.openformat.tech/v1/reward/credit \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "chain": "arbitrum-sepolia",
  "action_id": "dragon_slayed",
  "receiver": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
  "app_id": "0x9716fb655f2a72b1fc1b4db02b8ad20b6747442a",
  "token_address": "0xd1f09c70f6f2838a3ab6209c1465af68594667ec",
  "amount": 123,
  "mint": false
}'
{
  "success": true,
  "unsignedTransaction": {
    "to": "0x3f0431f04c76623481d5a27056174d550cff5e55",
    "data": "0x609512c90000000000000000000000008102a11ecb4f81da915e1d21b2e525d0a67e83b3012dc3a010c7d01b50e0d17dc79e0b646865725f6a756d7000000000000000000000000000000000000000000000414354494f4e0000000000000000000000000000000000000000000000",
    "maxPriorityFeePerGas": "1020840008",
    "maxFeePerGas": "1035102698",
    "gas": "99572",
    "gasLimit": "99572",
    "nonce": 36,
    "chainId": 31337,
    "type": 2
  }
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
chain
string
required

Blockchain network to use

Required string length: 1 - 255
action_id
string
required

Action Id

Required string length: 1 - 32
receiver
string
required

Ethereum addres of the receiver

app_id
string
required

Ethereum address of the application

token_address
string
required

Ethereum address of the Credit token

amount
number
required

Amount of tokens to reward

Required range: x > 0
mint
boolean
default:
false

Whether to mint the Credit tokens instead of doing a transfer

Response

200
application/json
Rewards Credit token
success
boolean
required

Success response

unsignedTransaction
any | null

Unsigned transaction object for the user to sign