apyhub
DEVELOPER TOOLS · SMART GENERATION

Puzzle Generator API

What it does

PlaySocket Game Generator gives you a GraphQL endpoint that creates puzzle boards for Sudoku and Schulte table use cases. Send a query in body.query, and optionally pass body.variables and body.operationName when your GraphQL document uses variables or multiple named operations.

For Sudoku, newSudokuBoard returns a wrapper with results, message, and grids. Each grid includes a value 2D array for the puzzle, a solution 2D array for the solved board, and a difficulty value of EASY, MEDIUM, or HARD. That makes it useful when you need reproducible puzzle content for games, training exercises, or quiz-style experiences.

For Schulte tables, newSchulteTable returns a message and a randomized schulteBoard 2D integer grid sized according to the request. You can use it anywhere you need a generated layout for attention, timing, or brain-training gameplay.

The response is GraphQL-shaped: successful payloads come back under data, and validation or execution issues appear in errors with optional path and locations. Use it when your app needs generated game boards without building the puzzle logic yourself.

POST
PlaySocket GraphQL Gateway
https://api.eu.apyverse.com/pankajretestflows/playsocket-game-generator

QUICKSTART

GUIDE

Quickstart

Run a GraphQL query to generate a Sudoku board.

curl -X POST "https://api.eu.apyverse.com/pankajretestflows/playsocket-game-generator" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query":"query { newSudokuBoard(limit: 1, difficulty: \"HARD\", size: 9) { grids { value solution difficulty } results message } }"}'

What you'll get back

Returns a JSON object with optional data and errors fields. On success, data is a nullable object that can contain newSudokuBoard, which includes grids (an array of puzzle objects), results (the number of grids returned), and message (a status string).

{
  "data": {
    "newSudokuBoard": {
      "grids": [
        {
          "value": [["1"," ","3"]],
          "solution": [["1","2","3"]],
          "difficulty": "HARD"
        }
      ],
      "results": 1,
      "message": "Data fetched successfully."
    }
  }
}
TRY ITLIVE · 1000 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Executes a GraphQL query against the PlaySocket GraphQL Gateway and returns the matching GraphQL response payload. The request body must include a GraphQL query, and can optionally include variables and operationName.

Request Body

ParameterTypeMandatoryDescription
queryStringYesThe GraphQL query document to execute.
variablesObjectNoOptional map of GraphQL variables referenced in the query. Nullable.
operationNameStringNoOptional name of the operation to execute if the query contains multiple named operations. Nullable.

Response

Returns a JSON object with nullable data and errors fields. When the query succeeds, data is a nullable object that can contain newSudokuBoard and/or newSchulteTable depending on the selected fields in the GraphQL query; errors is a nullable array of GraphQL error objects when execution fails.

ParameterTypeMandatoryDescription
dataObjectNoNullable response container for successful GraphQL payloads. Contains newSudokuBoard and/or newSchulteTable depending on the fields selected in the request query.
errorsObject ArrayNoNullable array of GraphQL error objects, present when execution fails.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.