POST /deploy/archives
Deploy a static site from an archive (preview)
Scope deploy:create, TEST key only (a live key gets 404 not_found). Served only when Galon Deploy archives are enabled for the account (404 otherwise). Send the files as JSON (files or archive_base64) or the raw archive (zip, tar, tar.gz: the format is read from the file signature). index.html is required at the root; a single top-level folder holding index.html is stripped. Bounds: 25 MiB uploaded, 512 files, 2 MiB per file, 10 MiB in total, 40 MiB decompressed; links, devices, absolute paths, .. and .git are refused. Then advance the returned journey with POST /deploy/journeys/{journey_id}/resume until status is ready. Errors {"detail": {"code"}}. Send `Prefer: wait=20` on `POST /v1/deploy/archives` or `/journeys`: the steps run inside the request (20 s at most) and the response carries the preview, its `preview_access_token` and `wait.outcome`; if `outcome` is not `ready`, continue with `…/resume`.
API key (Bearer), on the public API endpoint.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string · required | |
expires_at | query | string | Raw archive bodies only (a JSON body carries expires_at in the body and accepts no query). |
Prefer | header | string | wait=N (1 to 30 seconds, 25 recommended): run the deploy steps inside the request and return the preview when ready. |
Request body
application/json
| Field | Type | Description |
|---|---|---|
files | object | Relative path -> UTF-8 text content. index.html is required at the root. |
archive_base64 | string | A zip, tar or tar.gz archive, base64-encoded. |
expires_at | string | Preview expiry, UTC with Z, at most 7 days ahead. Default: 00:00 UTC four days after today. |
Responses
| Status | Description | Body |
|---|---|---|
201 | Archive accepted, preview journey created | object |
200 | Idempotent replay | object |
400 | idempotency_key_invalid, content_length_invalid, body_invalid, body_fields_invalid, query_invalid | Error |
401 | Key missing or invalid | Error |
403 | scope_missing, deploy_tenant_not_allowed, journey_source_not_connected | Error |
404 | not_found (live key, or Deploy archives not open to the account) | Error |
409 | idempotency_conflict, deploy_journey_conflict | Error |
413 | deploy_archive_too_large, deploy_archive_too_many_files, deploy_archive_file_too_large, deploy_archive_content_too_large | Error |
415 | content_type_invalid | Error |
422 | deploy_archive_format_invalid, deploy_archive_path_invalid, deploy_archive_link_refused, deploy_archive_entry_refused, deploy_archive_duplicate_path, deploy_archive_index_missing, deploy_archive_empty, journey_preview_expiry_invalid, journey_timestamp_invalid | Error |
429 | deploy_archive_quota_exceeded (Retry-After: 3600), deploy_quota_daily_exceeded | Error |
503 | deploy_auth_unavailable, deploy_archive_storage_unavailable, deploy_archive_storage_not_configured, deploy_temporarily_unavailable | Error |
507 | deploy_archive_storage_full | Error |
Examples
curl
curl -X POST "$GALON_API_BASE/deploy/archives" \
-H "Authorization: Bearer $GALON_API_KEY" \
-H "Idempotency-Key: <unique-key>" \
-H "Content-Type: application/json" \
-d 'null'