Back to Callbacks Endpoints
POST /v1/callbacks
Full Scope Required
Create a new server callback configuration that will receive vote data from VotePipe. Callbacks enable automatic in-game rewards by sending vote information directly to your game server when players vote. You can configure the endpoint URL, authentication, timeout settings, and customize the payload format using template variables. Once created and enabled, VotePipe will automatically send vote data to your configured endpoint.
Request
http
POST https://api.votepipe.com/v1/callbacks
Authorization: Bearer mr_live_your_api_key_here
Content-Type: application/json
{
"name": "Game Server Callback",
"url": "https://my-server.com/api/vote",
"auth_secret": "my_secret_key",
"timeout_ms": 5000,
"enabled": true,
"priority": 0,
"payload_template": {
"event": "vote",
"player": "{{voter_name}}",
"provider": "{{provider_key}}",
"vote_id": "{{vote_id}}"
}
}Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Callback name (1-100 chars) |
| url | string | Yes | Callback URL (must be valid URL) |
| auth_secret | string | No | Secret sent in Authorization header |
| timeout_ms | integer | No | Timeout in ms (1000-30000, default: 1000) |
| enabled | boolean | No | Enable callback (default: true) |
| priority | integer | No | Execution priority (default: 0) |
| payload_template | object | No | Custom payload template (uses default if not provided) |
Response (201 Created)
json
{
"data": {
"id": "1",
"name": "Game Server Callback",
"url": "https://my-server.com/api/vote",
"timeout_ms": 5000,
"enabled": true,
"priority": 0,
"payload_template": { ... },
"created_at": "2026-01-02T15:30:00Z",
"updated_at": "2026-01-02T15:30:00Z"
}
}