Distribute Tokens
Distribute tokens to your users on Base. This endpoint allows you to distribute tokens from your app balance to specified addresses.
POSTapi.metal.build/token/:address/distribute
Distribute tokens
This endpoint initiates a token distribution.
Required attributes
- Name
sendTo
- Type
- string
- Description
The address to receive the tokens.
- Name
amount
- Type
- number
- Description
The amount of tokens to send.
Request
POST
api.metal.build/token/:address/distributeconst response = await fetch(
'https://api.metal.build/token/0x1234567890abcdef1234567890abcdef12345678/distribute',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR-API-KEY',
},
body: JSON.stringify({
sendTo: '0xabcdef1234567890abcdef1234567890abcdef12',
amount: 100
}),
}
)
const distribute = await response.json()
Response
{ "success": true }