Guides & API

Documentation

Learn how to use the Map Editor, Animator, and API.

API Reference

Export project data and integrate with your game engine or build pipeline.

Authentication

All API requests require a Bearer token in the Authorization header:

Authorization: Bearer <token>

Create a token in Settings > API Keys. Keys are organization-scoped - one key grants access to all projects in that organization.

Error responses
  • 401 - missing, invalid, revoked, or expired token
  • 403 - token belongs to a different organization
  • 404 - project ID does not exist

Base URL

All endpoints are prefixed with:

https://longlost.no/api/v1/share/:project_id

The project_id is a UUID found in the project's URL or settings page.

Endpoints

GET

/info

Returns project metadata.

// Response { "id": "uuid", "name": "My Project", "description": "A cool game level", "type": "editor" | "animator", "updated_at": "2026-01-25T12:00:00Z" }
GET

/hash

Returns a content hash for change detection. Compare to your stored value to check for modifications.

// Response { "hash": "a1b2c3d4e5f6...", "updated_at": "2026-01-25T12:00:00Z" }
GET

/changes

Opens a Server-Sent Events (SSE) stream for real-time change notifications.

Parameter Type Description
once string If "true", sends initial event then closes.

Event types:

  • ready - sent immediately with current hash
  • changed - sent when project hash differs
  • deleted - sent when project is removed
GET

/download

Downloads the full project as a ZIP archive.

Parameter Type Description
hash string Optional. Returns 304 if the project hash matches.
GET

/manifest

Returns a per-file manifest with content hashes and sizes for incremental sync.

// Response { "project_hash": "abc123...", "files": { "path/to/file.json": { "hash": "def456...", "size": 1234 } } }
POST

/sync

Send your local file hashes and receive only what changed, was added, or was deleted.

// Request body { "files": { "path/to/file.json": "your_local_hash" } }
// Response { "project_hash": "abc123...", "changed": [ {"path": "maps/level1.json", "hash": "...", "content": "<base64>"} ], "added": [ {"path": "maps/level2.json", "hash": "...", "content": "<base64>"} ], "deleted": ["maps/old_level.json"], "images": ["resources/tilesets/forest.png"] }
  • changed / added - include path, new hash, and base64-encoded content
  • deleted - array of paths that no longer exist
  • images - binary resources that changed; fetch via /resource
GET

/resource

Downloads an individual binary resource such as a tileset image.

Parameter Type Description
path string Required. Resource path, must be under resources/.

Supports If-None-Match for ETag caching. Returns 304 if unchanged.

Typical workflow

1

Poll /hash periodically, or connect to /changes SSE for real-time notifications.

2

When a change is detected, call /manifest to get the current file list.

3

Call /sync with your local hashes to receive only what changed.

4

Fetch new or updated images via /resource.

Simpler alternative: Call /download for a full ZIP export whenever a change is detected - no manifest or sync needed.