Skip to main content
POST
/
set-event-details
Set Event Details
curl --request POST \
  --url https://tokens.shakesco.com/set-event-details \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "event_name": "<string>",
  "allocation": 123,
  "should_not_claim_twice": true
}
'
import requests

url = "https://tokens.shakesco.com/set-event-details"

payload = {
"event_name": "<string>",
"allocation": 123,
"should_not_claim_twice": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({event_name: '<string>', allocation: 123, should_not_claim_twice: true})
};

fetch('https://tokens.shakesco.com/set-event-details', 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://tokens.shakesco.com/set-event-details",
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([
'event_name' => '<string>',
'allocation' => 123,
'should_not_claim_twice' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$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://tokens.shakesco.com/set-event-details"

payload := strings.NewReader("{\n \"event_name\": \"<string>\",\n \"allocation\": 123,\n \"should_not_claim_twice\": true\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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://tokens.shakesco.com/set-event-details")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event_name\": \"<string>\",\n \"allocation\": 123,\n \"should_not_claim_twice\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://tokens.shakesco.com/set-event-details")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event_name\": \"<string>\",\n \"allocation\": 123,\n \"should_not_claim_twice\": true\n}"

response = http.request(request)
puts response.read_body
{ "tx_hash": "0xabc123..." }
For the complete documentation index, see llms.txt. Defines (or updates) an event that customers can claim tokens for. Events are the unit your backend hooks into: when something happens in your app (signup, birthday, purchase), you call /claim-tokens referencing the event’s name. You can also manage events from the Customer Rewards dashboard.

Request Body

event_name
string
required
Lowercase event identifier (e.g. "signup", "birthday", "buy-ticket")
allocation
number
required
Tokens awarded per claim. Decimals allowed.
should_not_claim_twice
boolean
required
true for one-time events (signup, birthday). false for repeatable events (purchase, daily check-in).

Response

tx_hash
string
Reference identifier for the configuration
await fetch("https://tokens.shakesco.com/set-event-details", {
  method: "POST",
  headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    event_name: "signup",
    allocation: 5,
    should_not_claim_twice: true,
  }),
});
{ "tx_hash": "0xabc123..." }