Skip to main content
POST
/
webhooks
Create webhook
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"
}

Authorizations

Authorization
string
header
required

API key from tonconsole.com. Can also be passed as a token query parameter.

Body

application/json
endpoint
string
required

Callback URL for receiving events.

Example:

"https://your-server.com/webhook"

Response

Webhook created

webhook_id
integer
required

Webhook identifier.

Example:

5

token
string
required

Secret token sent as Authorization header with every webhook request.

Example:

"eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9"