Skip to main content
POST
/
create-vesting-grant
Create Vesting Grant
curl --request POST \
  --url https://tokens.shakesco.com/create-vesting-grant \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer_ref": "<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. Creates a vesting grant for a customer. Tokens are released gradually: a percentage unlocks at the cliff, and the rest unlocks linearly over the remaining vesting period. Each customer can have at most one active grant at a time.
Treat this as a transaction. If you don’t get a 200 OK, check /vesting-info before retrying. A successful retry over an existing grant returns 409.

Request Body

customer_ref
string
required
Your unique identifier for this customer
total_amount
number
required
Total tokens to vest. Decimals allowed.
vesting_duration
string
required
Total vesting period in seconds
cliff_duration
string
required
Cliff period in seconds. No tokens vest before this point.
cliff_percent
number
required
Percent of total released at the cliff (25 = 25%). Decimals allowed.

Response

tx_hash
string
Reference identifier for the grant
await fetch("https://tokens.shakesco.com/create-vesting-grant", {
  method: "POST",
  headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    customer_ref: "customer-123",
    total_amount: 1000,
    vesting_duration: "31536000",
    cliff_duration: "7776000",
    cliff_percent: 25,
  }),
});
{ "tx_hash": "0xabc..." }