This feature is only available with paid plans. Contact us to know more.
- Receive Winners API (webhook created by you where we push data)
- Gamezop Get Match Result API (Gamezop API endpoint from which you can pull data for any match)
Create Match API
You will have to give us a POST API endpoint where we will send the user objects and theroom_id when our servers group players into a match. Once we are able to find a match honouring the details you send in the roomDetails object, we will make a request to this endpoint, and you will have to return a match_id.
Here’s the difference between a room_id and a match_id. Let’s say Alice and Bob are playing a Tic Tac Toe game in room ABC01. Alice wins. Now both Alice and Bob see an option to play again. They do so and now Bob wins. In this manner, players with the same room_id may play the game multiple times. While the room_id will remain same each time, the winners may differ across matches. That is why winners are scoped against a match_id and not against a room_id.
Your API endpoint
POSThttps://api.publisher-xyz.com/games/create-match
Headers
Request body
HTTP response codes
You must respond with a 200 when you return amatch_id
Expected response body:
Note for partners charging an entry fee to usersIf you are charging an entry fee, then in case of the
MATCH_FOUND status, check buy-in validity again for all users in the request body before generating a match_id.If any player has not paid to join that match, then refund the entry fees charged to all other players and do not return a match_id. We will show a “No match found” screen to the user in this case.When we send you a NO_MATCH_FOUND status, then you should refund the entry fee charged, if any, for the users in the request body.Receive Winners API
This will be another POST API endpoint that you create where, at the end of each match, we will send the user objects along with their ranks and scores back to your system. If you need to reward a player or take any other action on the basis of this data, you can do so upon receiving our hit on this endpoint.Your API endpoint
POSThttps://api.publisher-xyz.com/games/receive-winners
You must build and maintain this endpoint. Gamezop posts data on match winners to your system at the end of each multiplayer match via this endpoint.
Headers
Request body
HTTP response codes
You must respond with a 200 when you record winners successfully. Here’s the response body we expect:prize value, along with an icon for your currency in the currency_icon value. Both of these values are optional. This is what the screen looks like:

We can also dispatch client-side callbacks for key events related to multiplayer matches. More on it here.In addition to us posting match winners’ data to you on your endpoint, if you also want to pull data from our system for any specific match, you can use our Get Match Result API.