curl --request POST \
--url https://rt.tonapi.io/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"endpoint": "https://your-server.com/webhook"
}
'{
"webhook_id": 5,
"token": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9"
}Create a new webhook and configure its callback endpoint. Returns a webhook ID and a secret token for verifying incoming requests.
curl --request POST \
--url https://rt.tonapi.io/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"endpoint": "https://your-server.com/webhook"
}
'{
"webhook_id": 5,
"token": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9"
}API key from tonconsole.com. Can also be passed as a token query parameter.
Callback URL for receiving events.
"https://your-server.com/webhook"
Was this page helpful?