Webhooks

Webhooks are designed to receive platform feedback.

They are received when:

  • a new game has started
  • a new user has registered
  • a user has updated their details
  • a user has claimed a prize

Workflow

stateDiagram-v2
    direction LR
    [*] --> PLAY_GAME
    PLAY_GAME --> REGISTER_PLAYER
    REGISTER_PLAYER --> UPDATE_PLAYER
    REGISTER_PLAYER --> CLAIMED_PRIZE
    UPDATE_PLAYER --> CLAIMED_PRIZE
    CLAIMED_PRIZE --> [*]

Getting Started

To start receiving webhook feedback, you must register your API URL in your admin panel.

Register your webhook

First, navigate to the admin panel in "Settings" > "Callback URLs" and click on "Create a callback URL". Fill out the form and submit it. The "Verification token" is a token of your choice to verify requests coming from our servers.

Prepare your API

Before receiving your first events, we will validate your endpoint by sending a verification request.

Verification request

A verification request is sent periodically to check the availability of your endpoint.

Path for verification request

GET

/?verify_token={verifyToken}&challenge={challenge}

Query string parameters

FieldTypeRequiredDescription
verify_tokenstringRequiredThe verification token register upon webhook registration
challengeintegerRequiredThe challenge value you have to return
Example
GET
/?verify_token=d2052c79-7c48-41e5-b710-57311dfa630c&challenge=12345

Expected response

Response must be challenge value as plain text and status code must be 200 OK.

Events request

We send a request to your endpoint when an event occurs for your company.

Path for events request

POST

/?verify_token={verifyToken}

Query path parameters

FieldTypeRequiredDescription
verify_tokenstringRequiredThe verification token registered upon webhook registration
Example
POST
/?verify_token=d2052c79-7c48-41e5-b710-57311dfa630c

JSON Body parameters

FieldTypeRequiredDescription
messageIdstringRequiredThe message identifier
eventsEvent[]RequiredThe events

Event type

FieldTypeRequiredDescription
eventIdstringRequiredThe event identifier
eventTypeEventTypeRequiredThe event type
playerPlayerRequiredThe player
establishmentEstablishmentRequiredThe establishment
prizePrizeThe claimed prize
(for PLAY_GAME and CLAIMED_PRIZE events)
playPlayThe play
(for PLAY_GAME and CLAIMED_PRIZE events)
gameGameThe game
(for PLAY_GAME and CLAIMED_PRIZE events)
Example
{
  "eventId": "5647a0b0-631c-437c-8885-80038cc56ceb",
  "eventType": "REGISTER_PLAYER",
  "createdAt": "2025-05-20T15:25:44Z",
  "player": {
    "playerId": "0e0d2a3a-0b9e-44f9-8b4c-b093c1fe03e4",
    "partnerUserId": "11111111",
    "givenName": "foo",
    "familyName": "bar",
    "email": "foo.bar@suggpro.com",
    "phoneNumber": "+33123456789"
  },
  "prize": null
}
json

EventType type

EventType is an enum with the following values:

  • PLAY_GAME
  • REGISTER_PLAYER
  • UPDATE_PLAYER
  • CLAIMED_PRIZE

Player type

FieldTypeRequiredDescription
playerIdstringRequiredThe player identifier
partnerUserIdstringThe partner user identifier
givenNamestringThe user given name
familyNamestringThe user family name
emailstringThe user email
phoneNumberstringThe user phone number (in E.164 format)
postalCodestringThe postal code
postalCodeLabelstringThe postal code label (mainly city name)
countrystringThe country code (in ISO 3166-1 alpha-2 format)
latitudefloat64The latitude
longitudefloat64The longitude
Example
{
  "playerId": "0e0d2a3a-0b9e-44f9-8b4c-b093c1fe03e4",
  "partnerUserId": "11111111",
  "givenName": "foo",
  "familyName": "bar",
  "email": "foo.bar@suggpro.com",
  "phoneNumber": "+33123456789"
}
json

Establishment type

FieldTypeRequiredDescription
establishmentIdstringRequiredThe establishment identifier
namestringRequiredThe establishment name
Example
{
  "establishmentId": "a2673bdc-3d24-4890-816c-2f5c02de156e",
  "name": "Test"
}
json

Prize type

FieldTypeRequiredDescription
prizeIdstringRequiredThe prize identifier
typePrizeTypeRequiredThe prize type
namestringRequiredThe prize name
Example
{
  "prizeId": "4a8670c9-881e-4cfe-ab94-50a0e59dcbeb",
  "type": "PHYSICAL",
  "name": "a nice gift"
}
json

PrizeType type

PrizeType is an enum with the following values:

  • PHYSICAL
  • VIRTUAL

Play type

FieldTypeRequiredDescription
playIdstringRequiredThe play identifier
languagelanguage codeRequiredThe language code (in ISO 639-1 format)
claimLinkstringRequiredThe link address to claim his prize
claimMinimumAtdateThe minimum date to claim his prize
(in RFC3339 format)
claimMaximumAtdateThe maximum date to claim his prize
(in RFC3339 format)
claimedAtdateThe claimed date
(in RFC3339 format)
createdAtdateThe initial play date
(in RFC3339 format)
Example
{
  "playId": "bb8e586f-5ac4-4c7a-9ad0-d99e4f738060",
  "language": "FR",
  "claimLink": "https://test.gaming.suggpro.com/0e0d2a3a-0b9e-44f9-8b4c-b093c1fe03e4/fr/14e677fa-248b-4bee-bb74-dce5f3170f95/claim/4a8670c9-881e-4cfe-ab94-50a0e59dcbeb",
  "claimMaximumAt": null,
  "claimMinimumAt": "2025-09-29T14:40:41Z",
  "createdAt": "2025-09-29T14:39:54Z"
}
json

Game type

FieldTypeRequiredDescription
gameIdstringRequiredThe game identifier
namestringRequiredThe name
Example
{
  "gameId": "b53d951b-c65f-42fb-b1ab-38527a583418",
  "name": "Venez jouer avec nous"
}
json

Expected response

Response must have a status code between 200 and 299.

If the response code is different, we will retry sending request up to four times at different timings. If we can't succeed, your event will be discarded.

Access log

To check and debug your API, you can check logs in your admin panel by clicking on "Display logs".