cURL
curl --request POST \ --url https://api.spikelabs.com/v1/game-sessions/{session_id}/move \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "move": {}, "message": "<string>" } '
{ "session": { "id": "gs_abc123", "object": "game_session", "game_id": "<string>", "personality_id": "<string>", "status": "waiting", "created_at": "2023-11-07T05:31:56Z", "user_id": "<string>", "current_turn": "user", "state": {}, "winner": "user", "move_count": 123, "personality_commentary": "<string>", "updated_at": "2023-11-07T05:31:56Z" }, "user_move_valid": true, "user_move_error": "<string>", "personality_move": {}, "personality_message": "<string>" }
Submit a move in a game session. Returns the personality’s response move.
API key authentication. Use your secret key (starts with sk_) as a Bearer token.
sk_
Game-specific move data
Optional message to the personality
Move result
Show child attributes
"gs_abc123"
game_session
waiting
active
completed
abandoned
user
personality
Game-specific state
draw
Personality's latest comment
Personality's response/commentary