Skip to main content
POST
/
create-vesting-grant
Vesting
curl --request POST \
  --url https://tokens.shakesco.com/create-vesting-grant \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "total_amount": 123,
  "vesting_duration": "<string>",
  "cliff_duration": "<string>",
  "cliff_percent": 123
}
'
{ "tx_hash": "0xabc..." }

Documentation Index

Fetch the complete documentation index at: https://docs.shakesco.com/llms.txt

Use this file to discover all available pages before exploring further.

For the complete documentation index, see llms.txt. Vesting lets you distribute tokens to customers gradually over time, useful for long-term subscribers, contributors, or employee rewards. Each customer can have one active vesting grant at a time.

Write Endpoints

POST /create-vesting-grant

Create a vesting schedule for a customer. Tokens unlock proportionally after the cliff period.
email
string
required
Customer’s email
total_amount
number
required
Total tokens to vest
vesting_duration
string
required
Total vesting period in seconds
cliff_duration
string
required
Cliff period in seconds. No tokens vest before this.
cliff_percent
integer
required
Percentage (in basis points) of total tokens released at the cliff. E.g. 2500 = 25%
{ "tx_hash": "0xabc..." }

POST /claim-vested-tokens

Claim whatever portion of the grant has vested so far.
email
string
required
Customer’s email
await fetch("https://tokens.shakesco.com/claim-vested-tokens", {
  method: "POST",
  headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ email: "customer@example.com" }),
});
{ "tx_hash": "0xabc..." }

POST /cancel-vesting

Cancel a vesting grant. The customer receives their vested portion; remaining tokens return to the business.
email
string
required
Customer’s email
await fetch("https://tokens.shakesco.com/cancel-vesting", {
  method: "POST",
  headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ email: "customer@example.com" }),
});
{ "tx_hash": "0xabc..." }

Read Endpoints

GET /vesting-info?email=…

Full details about a customer’s active vesting grant.
{
  "total_amount": "1000000000000000000000",
  "start_time": "1715000000",
  "cliff_duration": "7776000",
  "cliff_percent": "2500",
  "vesting_duration": "31536000",
  "claimed": "250000000000000000000",
  "active": true
}

GET /vested-amount?email=…

Amount currently claimable (vested but not yet claimed).
{ "vested_amount": "125000000000000000000" }
Token amounts are returned in wei (18 decimals). Divide by 10^18 to get the human-readable value.