layer-groupLevels

Public level operations

List levels

get

Retrieve a paginated, filterable list of levels.

Query parameters
pageinteger · min: 1OptionalDefault: 1
limitinteger · min: 1OptionalDefault: 10
sortstring · enumOptionalDefault: playsPossible values:
reversed_orderstring · enumOptionalDefault: falsePossible values:
authorstringOptional

Filter by author name (partial match)

is_waterstring · enumOptionalPossible values:
versionintegerOptional
tokenstringOptional

One-time token to fetch a specific level by ID. Ignores all other filters when provided.

Responses
chevron-right
200

Paginated list of levels

application/json
get
/api/levels

Upload a level

post

Upload a new level in IZL3 binary format. Rate limited to 1 upload per 60 seconds per IP.

The request body must be sent as raw binary (Content-Type: application/octet-stream) containing the IZL3 level file.

Validation includes: IZL3 format check, name/author content moderation (OpenAI + bad-words filter), plant/zombie placement rules, and optional Turnstile CAPTCHA verification.

Query parameters
authorstring · max: 11Required

Author name (max 11 characters)

turnstileResponsestringOptional

Cloudflare Turnstile CAPTCHA token (required if Turnstile is enabled)

Responses
post
/api/levels

Get a level by ID

get
Path parameters
idintegerRequired

Level ID

Responses
chevron-right
200

Level details

application/json
idintegerRequired
namestringRequired
authorstringRequired
created_atintegerRequired

Unix timestamp

sunintegerRequired
is_waterbooleanRequired
favoritesintegerRequired
playsintegerRequired
difficultyintegerRequired
versionintegerRequired
featuredinteger · enumRequiredPossible values:
featured_atinteger · nullableRequired

Unix timestamp

get
/api/levels/{id}

Download a level file

get

Downloads the IZL3 level file. Increments the play count. Rate limited to 5 downloads per 5 seconds per IP.

Path parameters
idintegerRequired

Level ID

Responses
chevron-right
200

Level file download

application/octet-stream
Responsestring · binary
get
/api/levels/{id}/download

Report a level

post
Path parameters
idintegerRequired

Level ID

Body
reasonstringRequired

Description of why the level is being reported

Responses
chevron-right
200

Report submitted

application/json
successbooleanRequiredExample: true
post
/api/levels/{id}/report

Toggle favorite on a level

post

Toggles the favorite state for the requesting IP. Rate limited to 30 actions per 10 seconds per IP.

Path parameters
idintegerRequired

Level ID

Responses
chevron-right
200

Favorite toggled

application/json
successbooleanRequiredExample: true
post
/api/levels/{id}/favorite

Last updated