cURL
curl --request POST \
--url https://api.openformat.tech/v1/reward/point \
--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
}
'import requests
url = "https://api.openformat.tech/v1/reward/point"
payload = {
"chain": "arbitrum-sepolia",
"action_id": "dragon_slayed",
"receiver": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
"app_id": "0x9716fb655f2a72b1fc1b4db02b8ad20b6747442a",
"token_address": "0xd1f09c70f6f2838a3ab6209c1465af68594667ec",
"amount": 123
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chain: 'arbitrum-sepolia',
action_id: 'dragon_slayed',
receiver: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
app_id: '0x9716fb655f2a72b1fc1b4db02b8ad20b6747442a',
token_address: '0xd1f09c70f6f2838a3ab6209c1465af68594667ec',
amount: 123
})
};
fetch('https://api.openformat.tech/v1/reward/point', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openformat.tech/v1/reward/point",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'chain' => 'arbitrum-sepolia',
'action_id' => 'dragon_slayed',
'receiver' => '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
'app_id' => '0x9716fb655f2a72b1fc1b4db02b8ad20b6747442a',
'token_address' => '0xd1f09c70f6f2838a3ab6209c1465af68594667ec',
'amount' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.openformat.tech/v1/reward/point"
payload := strings.NewReader("{\n \"chain\": \"arbitrum-sepolia\",\n \"action_id\": \"dragon_slayed\",\n \"receiver\": \"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266\",\n \"app_id\": \"0x9716fb655f2a72b1fc1b4db02b8ad20b6747442a\",\n \"token_address\": \"0xd1f09c70f6f2838a3ab6209c1465af68594667ec\",\n \"amount\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.openformat.tech/v1/reward/point")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chain\": \"arbitrum-sepolia\",\n \"action_id\": \"dragon_slayed\",\n \"receiver\": \"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266\",\n \"app_id\": \"0x9716fb655f2a72b1fc1b4db02b8ad20b6747442a\",\n \"token_address\": \"0xd1f09c70f6f2838a3ab6209c1465af68594667ec\",\n \"amount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openformat.tech/v1/reward/point")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chain\": \"arbitrum-sepolia\",\n \"action_id\": \"dragon_slayed\",\n \"receiver\": \"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266\",\n \"app_id\": \"0x9716fb655f2a72b1fc1b4db02b8ad20b6747442a\",\n \"token_address\": \"0xd1f09c70f6f2838a3ab6209c1465af68594667ec\",\n \"amount\": 123\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"unsignedTransaction": {
"to": "0x014b680bed2433b1861239cf812dbe660fe339f2",
"data": "0x609512c90000000000000000000000009574e9ba92cb0966c9d2ff1a9ab9e11949b9b873000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000de0b6b3a7640000647261676f6e5f736c6179656400000000000000000000000000000000000000414354494f4e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000",
"maxPriorityFeePerGas": "30000000000",
"maxFeePerGas": "30000000015",
"gasLimit": "95935",
"nonce": 2484,
"chainId": 80001,
"type": 2
}
}
{
"success": false,
"error": {
"issues": [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": ["action_id"],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": ["receiver"],
"message": "Required"
}
],
"name": "ZodError"
}
}
{
"status": "failed",
"error": "No Token found"
}
Rewards
Mint Point/ERC-20
Reward users with points for completing specific actions in your application. This endpoint is designed to incentivise user engagement by awarding points for various activities such as:
- User registration
- Task completion
- Video watching
- Comment posting
- Other custom actions
The endpoint returns an unsigned transaction that needs to be signed using your application’s private key (stored securely in server environment variables). After signing, you can broadcast the transaction using either:
- Execute Transaction endpoint for immediate submission
- Execute Transaction and Wait endpoint if you need to wait for transaction confirmation
This reward system helps build user engagement and loyalty while maintaining transparency through blockchain-based point distribution.
POST
/
reward
/
point
cURL
curl --request POST \
--url https://api.openformat.tech/v1/reward/point \
--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
}
'import requests
url = "https://api.openformat.tech/v1/reward/point"
payload = {
"chain": "arbitrum-sepolia",
"action_id": "dragon_slayed",
"receiver": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
"app_id": "0x9716fb655f2a72b1fc1b4db02b8ad20b6747442a",
"token_address": "0xd1f09c70f6f2838a3ab6209c1465af68594667ec",
"amount": 123
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chain: 'arbitrum-sepolia',
action_id: 'dragon_slayed',
receiver: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
app_id: '0x9716fb655f2a72b1fc1b4db02b8ad20b6747442a',
token_address: '0xd1f09c70f6f2838a3ab6209c1465af68594667ec',
amount: 123
})
};
fetch('https://api.openformat.tech/v1/reward/point', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openformat.tech/v1/reward/point",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'chain' => 'arbitrum-sepolia',
'action_id' => 'dragon_slayed',
'receiver' => '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
'app_id' => '0x9716fb655f2a72b1fc1b4db02b8ad20b6747442a',
'token_address' => '0xd1f09c70f6f2838a3ab6209c1465af68594667ec',
'amount' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.openformat.tech/v1/reward/point"
payload := strings.NewReader("{\n \"chain\": \"arbitrum-sepolia\",\n \"action_id\": \"dragon_slayed\",\n \"receiver\": \"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266\",\n \"app_id\": \"0x9716fb655f2a72b1fc1b4db02b8ad20b6747442a\",\n \"token_address\": \"0xd1f09c70f6f2838a3ab6209c1465af68594667ec\",\n \"amount\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.openformat.tech/v1/reward/point")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chain\": \"arbitrum-sepolia\",\n \"action_id\": \"dragon_slayed\",\n \"receiver\": \"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266\",\n \"app_id\": \"0x9716fb655f2a72b1fc1b4db02b8ad20b6747442a\",\n \"token_address\": \"0xd1f09c70f6f2838a3ab6209c1465af68594667ec\",\n \"amount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openformat.tech/v1/reward/point")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chain\": \"arbitrum-sepolia\",\n \"action_id\": \"dragon_slayed\",\n \"receiver\": \"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266\",\n \"app_id\": \"0x9716fb655f2a72b1fc1b4db02b8ad20b6747442a\",\n \"token_address\": \"0xd1f09c70f6f2838a3ab6209c1465af68594667ec\",\n \"amount\": 123\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"unsignedTransaction": {
"to": "0x014b680bed2433b1861239cf812dbe660fe339f2",
"data": "0x609512c90000000000000000000000009574e9ba92cb0966c9d2ff1a9ab9e11949b9b873000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000de0b6b3a7640000647261676f6e5f736c6179656400000000000000000000000000000000000000414354494f4e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000",
"maxPriorityFeePerGas": "30000000000",
"maxFeePerGas": "30000000015",
"gasLimit": "95935",
"nonce": 2484,
"chainId": 80001,
"type": 2
}
}
{
"success": false,
"error": {
"issues": [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": ["action_id"],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": ["receiver"],
"message": "Required"
}
],
"name": "ZodError"
}
}
{
"status": "failed",
"error": "No Token found"
}
{
"status": "success",
"unsignedTransaction": {
"to": "0x014b680bed2433b1861239cf812dbe660fe339f2",
"data": "0x609512c90000000000000000000000009574e9ba92cb0966c9d2ff1a9ab9e11949b9b873000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000de0b6b3a7640000647261676f6e5f736c6179656400000000000000000000000000000000000000414354494f4e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000",
"maxPriorityFeePerGas": "30000000000",
"maxFeePerGas": "30000000015",
"gasLimit": "95935",
"nonce": 2484,
"chainId": 80001,
"type": 2
}
}
{
"success": false,
"error": {
"issues": [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": ["action_id"],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": ["receiver"],
"message": "Required"
}
],
"name": "ZodError"
}
}
{
"status": "failed",
"error": "No Token found"
}
Body
application/json