POST
/
reward
/
badge
curl --request POST \
  --url https://api.openformat.tech/v1/reward/badge \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "chain": "arbitrum-sepolia",
  "action_id": "dragon_slayed",
  "receiver": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
  "app_id": "0x9716fb655f2a72b1fc1b4db02b8ad20b6747442a",
  "amount": 123,
  "badge_name": "Valiant warrior",
  "base_uri": "ipfs://abc...",
  "badge_id": "0xd1f09c70f6f2838a3ab6209c1465af68594667ec"
}'
{
    "status": "success",
    "unsignedTransaction": {
        "to": "0x014b680bed2433b1861239cf812dbe660fe339f2",
        "data": "0x609512c90000000000000000000000009574e9ba92cb0966c9d2ff1a9ab9e11949b9b873000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000de0b6b3a7640000647261676f6e5f736c6179656400000000000000000000000000000000000000414354494f4e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000",
        "maxPriorityFeePerGas": "30000000000",
        "maxFeePerGas": "30000000015",
        "gasLimit": "95935",
        "nonce": 2484,
        "chainId": 80001,
        "type": 2
    }
}
{
    "status": "success",
    "unsignedTransaction": {
        "to": "0x014b680bed2433b1861239cf812dbe660fe339f2",
        "data": "0x609512c90000000000000000000000009574e9ba92cb0966c9d2ff1a9ab9e11949b9b873000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000de0b6b3a7640000647261676f6e5f736c6179656400000000000000000000000000000000000000414354494f4e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000",
        "maxPriorityFeePerGas": "30000000000",
        "maxFeePerGas": "30000000015",
        "gasLimit": "95935",
        "nonce": 2484,
        "chainId": 80001,
        "type": 2
    }
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
chain
string
required

Blockchain network to use

Required string length: 1 - 255
Example:

"arbitrum-sepolia"

action_id
string
required

Action Id

Required string length: 1 - 32
Example:

"dragon_slayed"

receiver
string
required

Ethereum address of the receiver

Example:

"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"

app_id
string
required

Ethereum address of the application

Example:

"0x9716fb655f2a72b1fc1b4db02b8ad20b6747442a"

amount
integer
required

Amount of badges to reward

Required range: x >= 1
Example:

123

badge_name
string

Name of badge to reward, specify this or the badge_id

Required string length: 1 - 256
Example:

"Valiant warrior"

base_uri
string

URI of badge to reward

Maximum length: 512
Example:

"ipfs://abc..."

badge_id
string

Ethereum address of badge to reward, specify this or badge name

Example:

"0xd1f09c70f6f2838a3ab6209c1465af68594667ec"

Response

200
application/json
Rewards Badge
status
enum<string>
required

Success response status

Available options:
success
Example:

"success"

unsignedTransaction
any | null

Unsigned transaction object for the user to sign