Maps API
The Maps API provides CRUD operations for map data stored on the ctx.gg platform.
Endpoints
Section titled “Endpoints”GET /maps
Section titled “GET /maps”List all public maps, with optional filtering.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1) |
limit | number | Results per page (default: 20, max: 100) |
search | string | Search by map name |
author | string | Filter by author user ID |
Response:
{ "maps": [ { "id": "map-uuid", "name": "Arena v2", "author": { "id": "user-uuid", "username": "player1" }, "createdAt": "2026-02-01T12:00:00Z", "updatedAt": "2026-02-10T15:30:00Z" } ], "total": 42, "page": 1, "limit": 20}GET /maps/:id
Section titled “GET /maps/:id”Get a specific map, including its full entity data.
Response:
{ "id": "map-uuid", "name": "Arena v2", "version": 1, "author": { "id": "user-uuid", "username": "player1" }, "entities": [...], "createdAt": "2026-02-01T12:00:00Z", "updatedAt": "2026-02-10T15:30:00Z"}POST /maps
Section titled “POST /maps”Create a new map. Requires authentication.
Request Body:
{ "name": "My New Map", "entities": [...]}Response: 201 Created with the created map object.
PUT /maps/:id
Section titled “PUT /maps/:id”Update an existing map. Only the map author can update.
Request Body:
{ "name": "Updated Map Name", "entities": [...]}DELETE /maps/:id
Section titled “DELETE /maps/:id”Delete a map. Only the map author can delete.
Response: 204 No Content