Skip to content
dartpilot
Esc
↑↓navigate↵open⌘Jpreview

Get a game

Returns a game the key owner may view (their own, one they participate in, a friend’s, or a public game), including its config and current state. Send If-None-Match with the previous ETag, or ?since=<stateUpdatedAt>, to get a 304 / { "unchanged": true } while nothing has moved.

GET/games/{id}
Authorization
x-api-keyAPI key · headerrequired

A user (dp_) or organization (dp_org_) API key with read scopes.

Path parameters
idstringrequired

The entity id.

Query parameters
sincestring<date-time>

Returns { "unchanged": true } when the game has not changed since this stateUpdatedAt timestamp.

Responses
200

The game.

idstringrequired
typestringrequired
statusstringrequired
playersGamePlayer[]required
Show properties
Array of GamePlayer
namestringrequired
userIdstring | nullrequired
imagestring | nullrequired
createdAtstringrequired
updatedAtstringrequired
configobjectrequired
stateobject | nullrequired
Show properties
Any of:
object
object
null
null
stateUpdatedAtstringrequired
400

Invalid request.

messagestringrequired
401

Missing or invalid API key.

messagestringrequired
403

The API key is missing a required scope or is the wrong type for this endpoint.

messagestringrequired
404

Entity not found.

messagestringrequired
429

Rate limit exceeded. See the Retry-After header.

messagestringrequired
500

Internal server error.

messagestringrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.dartpilot.app/v1/games/string' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Accept: application/json'
Response
{
  "id": "string",
  "type": "string",
  "status": "string",
  "players": [
    {
      "name": "string",
      "userId": "string",
      "image": "string"
    }
  ],
  "createdAt": "string",
  "updatedAt": "string",
  "config": {
    "property1": null,
    "property2": null
  },
  "state": {
    "property1": null,
    "property2": null
  },
  "stateUpdatedAt": "string"
}

Was this page helpful?