Sample Move Request
A complete example of a request made to POST /move and a valid Battlesnake response to move up.

Request

POST https://your.battlesnake.server.com/move
1
{
2
"game": {
3
"id": "game-00fe20da-94ad-11ea-bb37",
4
"ruleset": {
5
"name": "standard",
6
"version": "v.1.2.3",
7
"settings": {
8
"foodSpawnChance": 25,
9
"minimumFood": 1,
10
"hazardDamagePerTurn": 14,
11
"hazardMap": "hz_spiral",
12
"hazardMapAuthor": "altersaddle",
13
"royale": {
14
"shrinkEveryNTurns": 5
15
},
16
"squad": {
17
"allowBodyCollisions": true,
18
"sharedElimination": true,
19
"sharedHealth": true,
20
"sharedLength": true
21
}
22
}
23
},
24
"map": "standard",
25
"source": "league",
26
"timeout": 500
27
},
28
"turn": 14,
29
"board": {
30
"height": 11,
31
"width": 11,
32
"food": [
33
{"x": 5, "y": 5},
34
{"x": 9, "y": 0},
35
{"x": 2, "y": 6}
36
],
37
"hazards": [
38
{"x": 3, "y": 2}
39
],
40
"snakes": [
41
{
42
"id": "snake-508e96ac-94ad-11ea-bb37",
43
"name": "My Snake",
44
"health": 54,
45
"body": [
46
{"x": 0, "y": 0},
47
{"x": 1, "y": 0},
48
{"x": 2, "y": 0}
49
],
50
"latency": "111",
51
"head": {"x": 0, "y": 0},
52
"length": 3,
53
"shout": "why are we shouting??",
54
"squad": "",
55
"customizations":{
56
"color":"#FF0000",
57
"head":"pixel",
58
"tail":"pixel"
59
}
60
},
61
{
62
"id": "snake-b67f4906-94ae-11ea-bb37",
63
"name": "Another Snake",
64
"health": 16,
65
"body": [
66
{"x": 5, "y": 4},
67
{"x": 5, "y": 3},
68
{"x": 6, "y": 3},
69
{"x": 6, "y": 2}
70
],
71
"latency": "222",
72
"head": {"x": 5, "y": 4},
73
"length": 4,
74
"shout": "I'm not really sure...",
75
"squad": "",
76
"customizations":{
77
"color":"#26CF04",
78
"head":"silly",
79
"tail":"curled"
80
}
81
}
82
]
83
},
84
"you": {
85
"id": "snake-508e96ac-94ad-11ea-bb37",
86
"name": "My Snake",
87
"health": 54,
88
"body": [
89
{"x": 0, "y": 0},
90
{"x": 1, "y": 0},
91
{"x": 2, "y": 0}
92
],
93
"latency": "111",
94
"head": {"x": 0, "y": 0},
95
"length": 3,
96
"shout": "why are we shouting??",
97
"squad": "",
98
"customizations": {
99
"color":"#FF0000",
100
"head":"pixel",
101
"tail":"pixel"
102
}
103
}
104
}
Copied!

Response

200 OK
1
{
2
"move": "up",
3
"shout": "I guess I'll go up then."
4
}
Copied!
Copy link