Complete reference for Activity Editor REST API endpoints.
Development: http://localhost:5000
Production: https://your-deployment.replit.app
Currently using session-based authentication. Future versions will support token-based auth.
GET /api/projectsResponse:
[
{
"id": "uuid",
"name": "My Project",
"description": "Project description",
"figmaFileKey": "abc123",
"figmaPageId": null,
"figmaLastSyncedAt": "2025-12-02T00:00:00.000Z",
"figmaBranch": null,
"createdAt": "2025-12-02T00:00:00.000Z",
"updatedAt": "2025-12-02T00:00:00.000Z"
}
]GET /api/projects/:idPOST /api/projects
Content-Type: application/json
{
"name": "New Project",
"description": "Optional description"
}PUT /api/projects/:id
Content-Type: application/json
{
"name": "Updated Name",
"figmaFileKey": "new-key"
}DELETE /api/projects/:idGET /api/projects/:id/exportReturns complete ActivityDefinition object.
POST /api/projects/import
Content-Type: application/json
{
"activity": ActivityDefinition
}GET /api/screensQuery parameters:
projectId: Filter by project
GET /api/screens/:idPOST /api/screens
Content-Type: application/json
{
"title": "Screen Name",
"width": 1920,
"height": 1080,
"projectId": "uuid"
}PUT /api/screens/:id
Content-Type: application/json
{
"title": "New Title"
}DELETE /api/screens/:idGET /api/screens/:screenId/objectsGET /api/objects/:idPOST /api/screens/:screenId/objects
Content-Type: application/json
{
"name": "Object 1",
"type": "shape",
"x": 100,
"y": 100,
"width": 200,
"height": 200,
"customId": "my-object",
"classes": ["interactive"],
"tags": ["clickable"]
}PUT /api/objects/:id
Content-Type: application/json
{
"x": 150,
"y": 150,
"rotation": 45
}DELETE /api/objects/:idGET /api/screens/:screenId/scenesGET /api/scenes/:idPOST /api/screens/:screenId/scenes
Content-Type: application/json
{
"name": "Scene Name",
"isDefault": false
}PUT /api/scenes/:id
Content-Type: application/json
{
"name": "Updated Name",
"isDefault": true
}DELETE /api/scenes/:idGET /api/scenes/:sceneId/object-statesPOST /api/scenes/:sceneId/object-states
Content-Type: application/json
{
"objectId": "uuid",
"x": 200,
"y": 300,
"opacity": 0.5
}DELETE /api/object-states/:idGET /api/scenes/:sceneId/triggersPOST /api/scenes/:sceneId/triggers
Content-Type: application/json
{
"event": "click",
"targetSelector": "#my-object",
"action": "goToScene",
"actionPayload": {
"sceneId": "target-scene-uuid"
}
}PUT /api/triggers/:idDELETE /api/triggers/:idGET /api/objects/:objectId/animationsGET /api/animations/:idPOST /api/objects/:objectId/animations
Content-Type: application/json
{
"name": "My Animation",
"duration": 2,
"loop": false,
"autoplay": false
}PUT /api/animations/:id
Content-Type: application/json
{
"duration": 3,
"loop": true
}DELETE /api/animations/:idGET /api/animations/:animationId/keyframesPOST /api/keyframes
Content-Type: application/json
{
"animationId": "uuid",
"time": 1.5,
"property": "x",
"value": { "value": 300 },
"ease": "power2.inOut"
}PUT /api/keyframes/:id
Content-Type: application/json
{
"time": 2,
"value": { "value": 400 }
}DELETE /api/keyframes/:idGET /api/vocabularyQuery parameters:
projectId: Filter by projectcategory: Filter by category
POST /api/vocabulary
Content-Type: application/json
{
"projectId": "uuid",
"word": "Hello",
"translation": "Háw'aa",
"category": "greetings",
"imageUrl": "https://...",
"audioUrl": "https://..."
}PUT /api/vocabulary/:idDELETE /api/vocabulary/:idGET /api/figma/statusResponse:
{
"configured": true
}POST /api/figma/sync-frames
Content-Type: application/json
{
"fileUrl": "https://www.figma.com/file/abc123/File-Name",
"projectId": "uuid"
}POST /api/figma/sync-layers
Content-Type: application/json
{
"screenId": "uuid"
}const ws = new WebSocket('ws://localhost:5000/ws/dev-sync');
ws.onopen = () => {
console.log('Connected to DevSync');
};
ws.onmessage = (event) => {
const message = JSON.parse(event.data);
console.log('Received:', message);
};
// Send message
ws.send(JSON.stringify({
type: 'activity_update',
componentId: 'activity-123',
payload: activityData
}));See NACA Integration for complete message reference.
All endpoints return errors in the following format:
{
"error": "Error message here"
}HTTP Status Codes:
200- Success201- Created400- Bad Request404- Not Found500- Internal Server Error
Currently no rate limiting. Future versions will implement per-session limits.
Endpoints that return lists may support pagination:
Query parameters:
limit: Number of items (default: 100)offset: Offset for pagination (default: 0)