Skip to main content

Battlesnake

{
"id": "totally-unique-snake-id",
"name": "Sneky McSnek Face",
"health": 54,
"body": [
{"x": 0, "y": 0},
{"x": 1, "y": 0},
{"x": 2, "y": 0}
],
"latency": "123",
"head": {"x": 0, "y": 0},
"length": 3,
"shout": "why are we shouting??",
"squad": "1",
"customizations":{
"color":"#26CF04",
"head":"smile",
"tail":"bolt"
}
}
PropertyTypeDescription
idstringUnique identifier for this Battlesnake in the context of the current Game.Example: "totally-unique-snake-id"
namestringName given to this Battlesnake by its author.Example: "Sneky McSnek Face"
healthintegerHealth value of this Battlesnake, between 0 and 100 inclusively.Example: 54
bodyarrayArray of coordinates representing this Battlesnake's location on the game board. This array is ordered from head to tail.Example: [{"x": 0, "y": 0}, ..., {"x": 2, "y": 0}]
latencystringThe previous response time of this Battlesnake, in milliseconds. If the Battlesnake timed out and failed to respond, the game timeout will be returned (game.timeout)Example: "500"
headobjectCoordinates for this Battlesnake's head. Equivalent to the first element of the body array.Example: {"x": 0, "y": 0}
lengthintegerLength of this Battlesnake from head to tail. Equivalent to the length of the body array.Example: 3
shoutstringMessage shouted by this Battlesnake on the previous turn.Example: "why are we shouting??"
squadstringThe squad that the Battlesnake belongs to. Used to identify squad members in Squad Mode games.Example: "1"
customizationsobjectThe collection of customizations that control how this Battlesnake is displayed. Example: {"color":"#888888", "head":"default", "tail":"default" }