APIAPI Reference

API Reference

The Logic64 REST API is available at https://api.logic64.com. Every endpoint listed here is public-facing and callable by any HTTP client — including the Logic64 CLI, CI pipelines, and custom integrations. All requests require a valid API key in the Authorization header.

Base URL

text
https://api.logic64.com

All endpoint paths are relative to this base. HTTPS is enforced on all requests; HTTP connections are rejected.

Authentication

Every request must include your API key in the Authorization header using the Bearer scheme. Keys follow the format l64_{prefix8}_{hex32}.

http
Authorization: Bearer l64_abc12345_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4
  • API keys are scoped to your account and carry your plan's rate limits.
  • The legacy header X-API-Key: l64_... is accepted for backwards compatibility, but Authorization: Bearer is canonical.
  • Generate and rotate keys from Settings → API Keys. A key is displayed only at creation time.
  • For a full explanation of key scopes and security practices, see Authentication.
GET/bundles/:id

Returns metadata for a single bundle. Use this endpoint to check a bundle's current status before attempting a download, or to retrieve file counts and timestamps after a pull.

Request
bash
$ curl https://api.logic64.com/bundles/a3f2bc89-4d1e-47a0-b8c6-2e5f91340abc \
-H "Authorization: Bearer l64_YOUR_API_KEY"
Response 200
json
{
"bundleId": "a3f2bc89-4d1e-47a0-b8c6-2e5f91340abc",
"projectId": "proj_7f3e1a2b",
"status": "pending_download",
"fileCount": 23,
"createdAt": "2026-05-15T10:42:00.000Z"
}
Errors
CodeMeaning
401Missing or invalid API key.
404Bundle not found or does not belong to this account.
410Bundle has already been downloaded or has expired.
GET/bundles/:id/download

Streams the bundle as a binary ZIP archive. The response body is the raw ZIP; write it directly to disk and unzip locally. After a successful download, confirm the pull by calling POST /bundles/:id/ack.

This endpoint is rate-limited to 10 requests per minute per user. Exceeding this limit returns 429 with a Retry-After header.

Request
bash
$ curl https://api.logic64.com/bundles/a3f2bc89-4d1e-47a0-b8c6-2e5f91340abc/download \
-H "Authorization: Bearer l64_YOUR_API_KEY" \
--output bundle.zip
Response headers (200)
  • Content-Type: application/zip
  • Content-Disposition: attachment; filename="bundle-{id}.zip"
Errors
CodeMeaning
401Missing or invalid API key.
404Bundle not found or does not belong to this account.
410Bundle already downloaded or expired. Request a repackage to get a fresh bundle.
429Rate limit exceeded (10 req/min/user). Respect the Retry-After header.
POST/bundles/:id/ack

Confirms that the bundle ZIP was successfully received and written to disk. Calling this endpoint marks the bundle as downloaded and triggers immediate deletion of the server-side ZIP. This endpoint is idempotent — sending it more than once for the same bundle is safe and returns 200 each time.

This endpoint is not rate-limited. The CLI retries ACK up to 3 times with exponential backoff before writing a .logic64.ack-pending sentinel file locally.

Request
bash
$ curl -X POST \
https://api.logic64.com/bundles/a3f2bc89-4d1e-47a0-b8c6-2e5f91340abc/ack \
-H "Authorization: Bearer l64_YOUR_API_KEY"
Response 200
json
{
"bundleId": "a3f2bc89-4d1e-47a0-b8c6-2e5f91340abc",
"status": "downloaded",
"downloadedAt": "2026-05-15T10:45:12.000Z"
}
Errors
CodeMeaning
401Missing or invalid API key.
404Bundle not found or does not belong to this account.
GET/bundles/latest

Returns the most recent bundle with status pending_download for the authenticated user. Use this when you want to pull the latest workspace without knowing the bundle ID in advance — for example, immediately after Studio generates a bundle.

Query parameters
  • projectId (optional) — filter to the latest bundle for a specific project.
Request
bash
# Latest bundle across all projects
$ curl https://api.logic64.com/bundles/latest \
-H "Authorization: Bearer l64_YOUR_API_KEY"
# Latest bundle for a specific project
$ curl "https://api.logic64.com/bundles/latest?projectId=proj_7f3e1a2b" \
-H "Authorization: Bearer l64_YOUR_API_KEY"
Response 200
json
{
"bundleId": "a3f2bc89-4d1e-47a0-b8c6-2e5f91340abc",
"projectId": "proj_7f3e1a2b",
"status": "pending_download",
"fileCount": 23,
"createdAt": "2026-05-15T10:42:00.000Z"
}
Errors
CodeMeaning
401Missing or invalid API key.
404No pending_download bundle found for this account (or the given projectId).
POST/projects/:projectId/bundles/repackage

Re-emits a new bundle from persisted project state without making any generation calls. Use this when a bundle has already been pulled and acknowledged (status downloaded) and you need a fresh one — for example, to set up the same workspace on a second machine.

This endpoint is rate-limited to 3 requests per minute per user. It supports the Idempotency-Key header with a 60-second deduplication window.

Request headers
  • Authorization: Bearer l64_... — required.
  • Idempotency-Key: <client-generated-uuid> — optional, recommended. Prevents duplicate bundles if the request is retried.
Request
bash
$ curl -X POST \
https://api.logic64.com/projects/proj_7f3e1a2b/bundles/repackage \
-H "Authorization: Bearer l64_YOUR_API_KEY" \
-H "Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000"
Response 200
json
{
"bundleId": "d91e4f72-8c3b-41a0-b7d9-3f6e82150fed",
"fileCount": 12,
"totalSizeBytes": 48210
}

After receiving a 200, use the returned bundleId with GET /bundles/:id/download to download the new bundle. The CLI equivalent is logic64 export <projectId>.

Errors
CodeMeaning
401Missing or invalid API key.
404Project not found or does not belong to this account.
409 PROJECT_EMPTYNo files have been persisted for this project yet. Run a generation from Studio first.
413 PROJECT_TOO_LARGEProject exceeds the 500-file or 25 MB cap. Response body includes limit and actual fields.
429Rate limit exceeded (3 req/min/user). Respect the Retry-After header.
502The bundle assembly service is temporarily unreachable. Retry after a short delay.

Status codes

The following HTTP status codes are used consistently across all Logic64 API endpoints.

CodeMeaningCLI action
200SuccessContinue
401Invalid or missing API keyPrint hint (Run: logic64 login), exit 1
404Bundle or project not found, or wrong ownerPrint error, exit 1
409Conflict — e.g. project has no persisted files yetPrint error, exit 1
410Bundle already downloaded or expiredPrint info, exit 0
413Project exceeds size or file-count capPrint error with limit details, exit 1
429Rate limit exceededWait and retry with exponential backoff
502Bundle assembly service unreachablePrint error, exit 1

Bundle lifecycle

Every bundle moves through a fixed set of states from creation to deletion. Understanding this lifecycle helps you handle edge cases correctly in integrations.

text
Engine generates ZIP
|
v
status = pending_download <-- bundle is ready to download
|
| CLI: GET /bundles/:id/download
v
| CLI: POST /bundles/:id/ack
v
status = downloaded <-- ACK received; server-side ZIP deleted immediately
|
| (if ACK never arrives within 24 hours)
v
status = expired <-- hourly cron deletes the ZIP
  • pending_download — the bundle is packaged and waiting. A GET /download is valid.
  • downloaded — the ACK was received. The ZIP is deleted from the server immediately. The bundle record remains queryable for audit purposes.
  • expired — 24 hours elapsed without an ACK. A cleanup job deleted the ZIP. Use POST repackage to produce a new bundle from persisted project state.

Idempotency

The POST /projects/:projectId/bundles/repackage endpoint supports the Idempotency-Key request header. If you send the same key twice within 60 seconds, the second call returns the identical response as the first — no second bundle is created.

How it works
  • Generate a UUID client-side and include it as Idempotency-Key: <uuid> on the request.
  • If the server has seen this key within the last 60 seconds, it returns the cached response with the additional header Idempotency-Replayed: true.
  • If the key has not been seen, the request is processed normally and the response is stored for 60 seconds.
  • After 60 seconds, the key expires; a new request with the same key starts a fresh repackage operation.
Example — replayed response
http
HTTP/2 200
Idempotency-Replayed: true
Content-Type: application/json
{
"bundleId": "d91e4f72-8c3b-41a0-b7d9-3f6e82150fed",
"fileCount": 12,
"totalSizeBytes": 48210
}

Using Idempotency-Key is strongly recommended in any automated pipeline or retry loop to prevent duplicate bundles accumulating against your rate limit.

Next steps

Explore the rest of the Logic64 API surface and CLI tooling.