Skip to main content

Request Format

All GraphQL requests use POST /graphql and pass an allowed document ID from the API reference.

Key terms in this section: documentId, variables, Context token, and X-Project-Context.

Request Body​

GraphQL request body
{
"documentId": "me",
"variables": {}
}
FieldTypeDescription
documentIdStringAllowed document ID from the API reference
variablesObjectOperation variables. Use {} when no variables are required

Reference examples show the full variable set for each operation, including optional fields. Optional fields can be omitted when the scenario does not use them.

To execute a scenario, send the document ID and its variables in the format below.

Required Headers​

HeaderDescription
Accept-LanguagePreferred response languages in standard HTTP format, for example en-US, en;q=0.9, ru;q=0.8
Content-TypeAlways application/json
X-Project-Contextidentity.contextToken from the project configuration
X-Request-IdRequest ID for tracing and support

Context Headers​

HeaderDescription
AuthorizationBearer <sessionId> for an authenticated user

Use identity.contextToken from the downloaded project configuration unchanged. Authenticated operations also pass Authorization: Bearer <sessionId>.

Authenticated operations use the selected server; change it with the changeServer document. Public catalogs and operations targeting a specific server accept gameServerId in variables.

Request Examples​

Operation pages can show the request and response side by side, so the full API exchange is visible at once.

Request
POST /graphql
POST /graphql HTTP/1.1
Accept-Language: en
Content-Type: application/json
X-Project-Context: <project-context-token>
X-Request-Id: optional-request-id

{
"documentId": "me",
"variables": {}
}
Response
200 OK
{
"data": {
"me": {
"id": 1,
"email": "[email protected]"
}
}
}
curl
curl -X POST https://project.example/graphql \
-H "Accept-Language: en" \
-H "Content-Type: application/json" \
-H "X-Project-Context: <project-context-token>" \
-H "X-Request-Id: optional-request-id" \
-d '{"documentId":"me","variables":{}}'

The API honors Accept-Language quality weights and regional tags. If the project does not publish a matching language, it falls back to the profile language, project language, or en.