Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Finalize a version

Compiles and activates an uploaded version. Waits for completion by default. Pass async=1 to get an operation handle to poll instead.

POST/v1/spaces/{spaceId}/versions/{versionId}/finalize
Authorization
AuthorizationBearer token · headerrequired

Space key (sfc_…) for an unclaimed anonymous Space. Also the fragment of its claim URL and the token of its /__/<key> door. A publish without a credential returns it in claim with the claim link. With the key, getSpace extends the Space's expiry window, getSpaceVersion follows its publish, createSpaceOpenLink returns its reusable open link, and restoreSpace undoes a deleteSpace while the claim window remains open.

or
AuthorizationBearer token · headerrequired

Better Auth session, OAuth access token, OAuth client-credentials token, or sfm_ Space machine credential.

Path parameters
spaceIdstringrequired
versionIdstringrequired
Query parameters
asyncstring

Finalize in the background and return the operation handle instead of waiting (true/1).

Allowed:01truefalse
Header parameters
Idempotency-Keystring

Optional client-generated key, at most 255 characters, that makes this write safe to retry. The first request with a given key stores its outcome, scoped to your tenant, credential, and route. A retry with the same key and an identical body does not execute again: the server replays the stored response and marks it Idempotency-Replayed: true. A request that reuses a key with a different body fails with 409 idempotency_key_reused. A duplicate request that arrives while the first is still in flight fails with 409 idempotency_conflict_in_progress. The server keeps each key for 24 hours.

max length 255
Request body
requiredapplication/json
channelstring | null

Omit for live publish, use production as an alias for live, or pass null to finalize the version without promoting it.

Show properties
Any of:
string
string
null
null
Responses
200

Response for status 200

$schemastring<uri>

Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.

dataobjectrequired
Show properties
idstringrequired
refstring | nullrequired

Human ref "v{number}"; null until the version reaches ready.

numberinteger | nullrequired
Show properties
Any of:
integer
integer
null
null
spaceIdstringrequired
sourceobject | nullrequired

Publish provenance: who/what produced this version.

Show properties
Any of:
object
kindstringrequired

How this version was produced.

Allowed:direct_uploadclidashboardapigitimportagentbuildvariable_updateconfig_update
clientstring

Publishing client attribution, for example spacefast-cli/1.2.3.

max length 255
branchstring

Git branch the publish came from.

max length 255
commitstring

Git commit SHA the publish came from.

max length 64
messagestring

Plain-language description of the publish (the version changelog entry, commit message, or release note). This is THE spelling for the publish description; the version files-diff API is the fallback when none is given.

max length 2000
dirtyboolean

Whether the working tree had uncommitted changes at publish time.

metadataobject

Additional provenance (repository, CI run URL, workflow, actor, ...).

gitobject
Show properties
repositorystring | null
repositoryFullNamestring | null
repositoryUrlstring | null
refstring | null
branchstring | null
branchAliasUrlstring | null
commitstring | null
commitShastring | null
pullRequestNumbernumber | null
null
null
publisherobject | nullrequired

The actor that published the version. The value is null for a legacy version with no attribution.

Show properties
Any of:
object
typestringrequired

The type of actor that published the version.

Allowed:userapi_keypartner_tokenoauth_clientanonymous_claimsystem
displayNamestringrequired

The display name of the person, agent, or system that published the version.

avatarUrlstring | nullrequired

The publisher's avatar URL. The value is null when no avatar exists.

authorizedByobject | nullrequired

The person who authorized the publisher. The value is null when the publisher is a person or has no known authorizing person.

Show properties
Any of:
object
displayNamestringrequired

The person's display name.

avatarUrlstring | nullrequired

The person's avatar URL. The value is null when no avatar exists.

null
null
null
null
statusstringrequired
Allowed:buildingpreparedcreateduploadinguploadedfinalizingreadyfailedexpiredcanceled
failureCodestring | nullrequired
failureMessagestring | nullrequired
failedStagestring | nullrequired
manifestHashstring | nullrequired
buildIdstring | nullrequired
gitCommitShastring | nullrequired

Commit the build for this version was made from; null for direct uploads.

importedFromVersionIdstring | nullrequired
variablesnullrequired

Variable dependency provenance is not publicly exposed.

fileCountinteger | nullrequired
Show properties
Any of:
integer
integer
null
null
totalBytesinteger | nullrequired
Show properties
Any of:
integer
integer
null
null
filesAddedCountintegerrequired

Paths this version added against the version it replaced.

min 0 · max 9007199254740991
filesChangedCountintegerrequired

Paths whose bytes changed against the version this one replaced.

min 0 · max 9007199254740991
filesRemovedCountintegerrequired

Paths this version removed against the version it replaced.

min 0 · max 9007199254740991
pendingUploadsobject[]required
Show properties
Array of object
pathstringrequired

Version-relative POSIX path. Canonicalized at intake to UTF-8 NFC, percent-decoded exactly once; max 1,024 bytes in canonical form.

sizeintegerrequired

File size in bytes.

min 0 · max 9007199254740991
sha256string

Optional SHA-256 content digest, 64 lowercase hex characters without the sha256: prefix. Omit it to let the runtime hash uploaded bytes; include it to upload by content address, with the digest verified as the bytes land.

matches ^[0-9a-f]{64}$
sourceUrlstring<uri>

Optional HTTPS URL the runtime can fetch directly for this file instead of receiving bytes from the client.

skippedPathsstring[]required
immutableUrlstring | nullrequired

Permanent version URL ({label}--v{number}.space.fast form, under the space's own apex), computed once and stored at ready; survives slug changes, transfers, and channel repointing. Null before ready.

immutableUrlStatusstring | nullrequired

Whether the immutable version URL is ready. pending means the URL might not resolve yet.

Show properties
Any of:
string
string
null
null
isCurrentProductionbooleanrequired
siteTitlestringrequired
configobject | nullrequired

SpaceConfig overlay snapshot the version was finalized with.

Show properties
Any of:
object
indexstring | boolean

Homepage file served at /; false serves no homepage. Folders always serve their own index.html.

Show properties
Any of:
string
string
boolean
boolean
fallbackstring | boolean | object

Document served when no file matches. "/index.html" means SPA. Inferred for a single-page app build (200.html, _shell.html, or index.html beside a JS bundle with no root 404.html); false turns that off and serves the nearest 404.html.

Show properties
Any of:
string
string
boolean
boolean
object
pathstringrequired

Committed file served when no exact route matches.

min length 1
statusintegerrequired

Response status for the fallback.

min 100 · max 599
cleanUrlsboolean

Serve flat <name>.html files at their extensionless URL (/about serves about.html). Defaults to on, so a committed page wins over the fallback; false hands extensionless URLs to the fallback.

listingboolean

Enable automatic directory listings.

metaobject

Listing, viewer, sharing, and browser icon metadata.

Show properties
titlestring
min length 1 · max length 300
descriptionstring
max length 1000
imagestring
max length 2000
faviconstring
max length 2000
superpowersobject

Platform-managed built-ins and custom JavaScript snippets.

Show properties
enabledboolean

Enable customer-configured page enhancements.

disable_all_injectionboolean

When true, suppresses every platform-managed script/tag injection.

googleAnalyticsobject
Show properties
enabledboolean
measurementIdstring
max length 64
googleTagManagerobject
Show properties
enabledboolean
containerIdstring
max length 64
javascriptTagsobject[]
max items 16
Show properties
Array of object
idstring
max length 128
namestring
max length 160
enabledboolean
codestringrequired
max length 8192
tagsobject
Show properties
inheritanceobject
Show properties
inheritedboolean
overridesobject[]
max items 128
Show properties
Array of object
tagIdstringrequired
min length 1
disabledbooleanrequired
default: false
reasonstring | null
Show properties
Any of:
string
string
null
null
requireReviewboolean

When true, integration changes must go through review before release.

templatesstring[]

Files that receive {{ vars.NAME }} substitution at finalize.

max items 100
themeobject

Visual tokens for every Spacefast-authored page.

Show properties
accentstring

Accent color for Spacefast-authored pages.

max length 64 · matches ^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\([0-9.,\s%/]{1,64}\)|hsla?\([0-9.,\s%deg/]{1,64}\)|[a-zA-Z]{3,30})$
backgroundstring

Background color for Spacefast-authored pages.

max length 64 · matches ^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\([0-9.,\s%/]{1,64}\)|hsla?\([0-9.,\s%deg/]{1,64}\)|[a-zA-Z]{3,30})$
logostring

Logo image (https URL or root-relative path) shown in the brand row.

max length 2000 · matches ^(?:https:\/\/[^\s"'<>\\]+|\/[^\s"'<>\\]*)$
namestring

Display name shown in the brand row of Pages defaults.

min length 1 · max length 120
fontstring

Font-family stack applied to Spacefast-authored pages.

max length 256 · matches ^[A-Za-z0-9 ,'"-]{1,256}$
hideSpacefastBrandingboolean

Remove the Spacefast badge from default pages when the plan permits it.

collabobject

Comments overlay delivery. default injects Spacefast's UI; custom injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.

Show properties
uistringrequired
default: "default"
Allowed:defaultcustom
buildobject

Default settings for remote repository builds.

Show properties
rootDirectorystring | null
Show properties
Any of:
string
string
null
null
installDirectorystring | null
Show properties
Any of:
string
string
null
null
installCommandstring | null
Show properties
Any of:
string
string
null
null
buildCommandstring | null
Show properties
Any of:
string
string
null
null
outputDirectorystring | null
Show properties
Any of:
string
string
null
null
ignoredBuildCommandstring | null
Show properties
Any of:
string
string
null
null
frameworkPresetstring | null
Show properties
Any of:
string
string
null
null
platformPresetstring | null
Show properties
Any of:
string
string
null
null
allowUnsupportedPlatformFeaturesboolean
timeoutSecondsinteger
min 60 · max 7200
placementobject

Placement controls for this space.

Show properties
burstableboolean
edgeboolean

Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.

markdownNegotiationboolean

Accepted serving flag; runtime enforcement ships separately.

firewallobject[]

Requests to block or challenge before they reach the space.

max items 50
Show properties
Array of object
namestring

Name for this rule: lowercase letters, digits, - and _, up to 61 characters. Names the rule in the CLI and the API.

matches ^[a-z0-9][a-z0-9_-]{0,60}$
descriptionstring

What this rule is for.

max length 255
actionstringrequired

block answers without reaching the space; challenge asks for proof of a human.

Allowed:blockchallenge
statusinteger

Status a blocked request gets. Defaults to 403. Blocks only.

min 400 · max 499
matchTrafficRuleMatchrequired

Request attributes the rule looks at. At least one.

Show properties
pathTrafficRuleValue

What the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

hostTrafficRuleValue

What the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

methodTrafficRuleValue

What the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

ipTrafficRuleValue

What the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

countryTrafficRuleValue

Two-letter country codes.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

asnTrafficRuleValue

What the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

userAgentTrafficRuleValue

What the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

refererTrafficRuleValue

What the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

headerobject

Per-name conditions: { "x-api-client": { "op": "exists" } }.

cookieobject

Per-name conditions: { "x-api-client": { "op": "exists" } }.

queryobject

Per-name conditions: { "x-api-client": { "op": "exists" } }.

extensionTrafficRuleValue

Path extension, without the dot.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

ja3TrafficRuleValue

What the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

ja4TrafficRuleValue

What the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

anyboolean

Fire when any match field holds. Defaults to false: all of them have to.

cacheobject

Cache behavior, including which requests skip it.

Show properties
bypassobject[]

Requests that skip the cache, in order. At most 50.

max items 50
Show properties
Array of object
namestring

Name for this rule: lowercase letters, digits, - and _, up to 61 characters. Names the rule in the CLI and the API.

matches ^[a-z0-9][a-z0-9_-]{0,60}$
descriptionstring

What this rule is for.

max length 255
matchTrafficRuleMatchrequired

Request attributes the rule looks at. At least one.

Show properties
pathTrafficRuleValue

What the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

hostTrafficRuleValue

What the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

methodTrafficRuleValue

What the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

ipTrafficRuleValue

What the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

countryTrafficRuleValue

Two-letter country codes.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

asnTrafficRuleValue

What the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

userAgentTrafficRuleValue

What the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

refererTrafficRuleValue

What the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

headerobject

Per-name conditions: { "x-api-client": { "op": "exists" } }.

cookieobject

Per-name conditions: { "x-api-client": { "op": "exists" } }.

queryobject

Per-name conditions: { "x-api-client": { "op": "exists" } }.

extensionTrafficRuleValue

Path extension, without the dot.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

ja3TrafficRuleValue

What the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

ja4TrafficRuleValue

What the field has to match. A string with a * in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An ip value with a / in it matches a CIDR range. Everything else is an explicit clause: { "op": "exists" }, { "op": "contains", "value": "bot" }, { "op": "in", "values": ["RU"], "not": true }.

Show properties
Any of:
string
string
string[]
Array of string
string
TrafficRuleClause
opstringrequired

How the request attribute is compared to the value.

Allowed:eqneqininCidrcontainsstartsWithendsWithwildcardexists
valuestring

Single value to compare against.

min length 1 · max length 4096
valuesstring[]

Values to compare against, for in and inCidr.

min items 1 · max items 1000
notboolean

Match when the comparison does not hold.

anyboolean

Fire when any match field holds. Defaults to false: all of them have to.

redirectsobject[]

Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first.

Show properties
Array of object
sourcestringrequired

Request path to match. * is a splat, :name captures a segment.

min length 1
destinationstringrequired

Path or absolute URL. :splat and :name from the source are substituted.

min length 1
statusnumber

Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.

Allowed:301302303307308
forceboolean

Answer even when the request path resolves to a committed file, the ! of a _redirects rule.

queryobject

Query parameters the request must carry, as parameter name to capture name: { "id": "id" } is the name=:capture token id=:id.

rewritesobject[]

Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects.

Show properties
Array of object
sourcestringrequired

Request path to match. * is a splat, :name captures a segment.

min length 1
destinationstringrequired

Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted.

min length 1
cachestring

Let shared caches store the proxy response. Absolute-URL destinations only.

forceboolean

Answer even when the request path resolves to a committed file, the ! of a _redirects rule.

queryobject

Query parameters the request must carry, as parameter name to capture name: { "id": "id" } is the name=:capture token id=:id.

notFoundboolean

Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.

headersobject[]

Response headers to set or remove on matching requests. A _headers rule wins on the same header name.

Show properties
Array of object
sourcestringrequired

Request path to match.

min length 1
headersobject[]required
min items 1
Show properties
Array of object
Any of:
object
keystringrequired
min length 1
valuestringrequired
object
keystringrequired
min length 1
removebooleanrequired

Remove this header instead of setting it, the !Name line of a _headers block.

networkobject

Enterprise network controls. Set this policy through the Space settings API.

Show properties
ingressobject

Ingress policy that blocks visitor requests from all other source addresses.

Show properties
allowedCidrsstring[]required

IPv4 and IPv6 addresses or CIDR ranges that can reach visitor content.

min items 1 · max items 50
usersobject
Show properties
enabledbooleanrequired
providersobjectrequired
Show properties
googleobjectrequired
Show properties
One of:
object
modestringrequired
object
modestringrequired
object
modestringrequired
clientIdstringrequired
min length 1 · max length 512
gravatarobjectrequired
Show properties
enabledbooleanrequired
spacefastobjectrequired
Show properties
enabledbooleanrequired
dataSourcesobject

Named public WordPress sources exposed to repository builds; at most 32 entries.

defaultDataSourcestring

Name of the configured source exposed through WORDPRESS_URL. It must match a dataSources entry. When omitted, the first source in bytewise name order is used.

min length 1 · max length 128 · matches ^[A-Za-z_][A-Za-z0-9_]*$
null
null
operationobject | nullrequired
Show properties
Any of:
object
idstringrequired
kindstringrequired
statusstringrequired
Allowed:queuedrunningsucceededfailedcanceled
resourcesobject[]required
Show properties
Array of object
typestringrequired
idstringrequired
progressobject
Show properties
totalintegerrequired
min 0 · max 9007199254740991
completedintegerrequired
min 0 · max 9007199254740991
failedintegerrequired
min 0 · max 9007199254740991
diagnosticsobject[]
Show properties
Array of object
codestringrequired

Stable snake_case diagnostic code naming the public contract that produced it.

severitystringrequired

How actionable the diagnostic is.

Allowed:infowarningerror
messagestringrequired

Human-readable explanation with enough detail to act on.

pathstring | null

Artifact path the diagnostic points at, for example "_headers:12", when one exists.

providerstring | null

Upstream system the diagnostic originated from, when not Spacefast itself.

Show properties
Any of:
string
string
null
null
detailsobject | null

Machine-readable context for the diagnostic code.

Show properties
Any of:
object
object
null
null
fixstring | null

Concrete, agent-actionable remediation hint, when one can be derived.

retryableboolean | null

Whether retrying the same operation can resolve this diagnostic without the caller changing anything.

createdAtstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
finishedAtstring<date-time>
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
null
null
headersRuleCountintegerrequired
min -9007199254740991 · max 9007199254740991
redirectsRuleCountintegerrequired
min -9007199254740991 · max 9007199254740991
proxyRouteCountintegerrequired
min -9007199254740991 · max 9007199254740991
cronsobject[]

Cron declarations frozen at finalize, independent of worker presence. Included when inspecting a version; omitted from version lists.

Show properties
Array of object
keystringrequired

Stable identifier for this entry, derived from its path.

pathstringrequired

Path on this space that gets requested.

schedulestringrequired

Schedule as declared, verbatim: named or an Nh/Nd/Nw interval. A version published before crontab expressions were retired can still declare one.

runtimeCodeDetectedbooleanrequired
buildLogstring | nullrequired
diagnosticsobject[]required
default: []
Show properties
Array of object
codestringrequired

Stable snake_case diagnostic code naming the public contract that produced it.

severitystringrequired

How actionable the diagnostic is.

Allowed:infowarningerror
messagestringrequired

Human-readable explanation with enough detail to act on.

pathstring | null

Artifact path the diagnostic points at, for example "_headers:12", when one exists.

providerstring | null

Upstream system the diagnostic originated from, when not Spacefast itself.

Show properties
Any of:
string
string
null
null
detailsobject | null

Machine-readable context for the diagnostic code.

Show properties
Any of:
object
object
null
null
fixstring | null

Concrete, agent-actionable remediation hint, when one can be derived.

retryableboolean | null

Whether retrying the same operation can resolve this diagnostic without the caller changing anything.

idstringrequired
versionIdstringrequired
createdAtstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
createdAtstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
readyAtstring<date-time> | nullrequired
Show properties
Any of:
string<date-time>
string<date-time>
null
null
updatedAtstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
operationobject | nullrequired

Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously.

Show properties
Any of:
object
idstringrequired
kindstringrequired
statusstringrequired
Allowed:queuedrunningsucceededfailedcanceled
resourcesobject[]required
Show properties
Array of object
typestringrequired
idstringrequired
progressobject
Show properties
totalintegerrequired
min 0 · max 9007199254740991
completedintegerrequired
min 0 · max 9007199254740991
failedintegerrequired
min 0 · max 9007199254740991
diagnosticsobject[]
Show properties
Array of object
codestringrequired

Stable snake_case diagnostic code naming the public contract that produced it.

severitystringrequired

How actionable the diagnostic is.

Allowed:infowarningerror
messagestringrequired

Human-readable explanation with enough detail to act on.

pathstring | null

Artifact path the diagnostic points at, for example "_headers:12", when one exists.

providerstring | null

Upstream system the diagnostic originated from, when not Spacefast itself.

Show properties
Any of:
string
string
null
null
detailsobject | null

Machine-readable context for the diagnostic code.

Show properties
Any of:
object
object
null
null
fixstring | null

Concrete, agent-actionable remediation hint, when one can be derived.

retryableboolean | null

Whether retrying the same operation can resolve this diagnostic without the caller changing anything.

createdAtstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
finishedAtstring<date-time>
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
null
null
default

Problem details (RFC 9457). Any 4xx/5xx response is one application/problem+json document.

$schemastring<uri>

Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.

typestringrequired

Problem type URI resolving to the error docs page. The server derives it mechanically from code against the docs origin.

titlestringrequired

Short human-readable summary of the problem type. The server derives it mechanically from code.

statusintegerrequired

HTTP status code of this response, repeated in the body.

min -9007199254740991 · max 9007199254740991
detailstringrequired

Human-readable failure explanation for this occurrence.

codestringrequired

Stable snake_case error code naming the failed public contract.

pointerstring

RFC 6901 JSON Pointer into the failing request field, for example "/files/37/path", on validation failures.

detailsobject

Machine-readable context for the error code.

fixstring

One sentence on what to do about this error code, the same text as the type page. Read it before retrying.

suggestionsstring[]

Actionable recovery steps safe to show in dashboards, SDKs, and CLI output.

nextstring[]

Copy-pasteable commands or API requests an agent can run next.

requestIdstringrequired

The request id to quote when contacting support.

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.spacefast.com/v1/spaces/string/versions/string/finalize' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "channel": "live"
}'
Response
{
  "data": {
    "id": "ver_2b9e7d4c1a6f8b3e0d5c9a2f7e4b1d8c",
    "ref": "v1",
    "number": 1,
    "spaceId": "spc_4a7f9c2e8b1d0a6f5c3e9d2b7a1f8e4c",
    "source": {
      "kind": "direct_upload",
      "client": "spacefast-cli/1.4.0",
      "message": "Initial launch"
    },
    "status": "ready",
    "failureCode": null,
    "failureMessage": null,
    "failedStage": null,
    "manifestHash": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
    "buildId": null,
    "gitCommitSha": null,
    "importedFromVersionId": null,
    "variables": null,
    "fileCount": 2,
    "totalBytes": 2560,
    "filesAddedCount": 2,
    "filesChangedCount": 0,
    "filesRemovedCount": 0,
    "pendingUploads": [],
    "skippedPaths": [],
    "immutableUrl": "https://marketing-site--v1.space.fast/",
    "isCurrentProduction": true,
    "siteTitle": "Marketing site",
    "config": null,
    "operation": null,
    "headersRuleCount": 0,
    "redirectsRuleCount": 0,
    "proxyRouteCount": 0,
    "runtimeCodeDetected": false,
    "buildLog": null,
    "diagnostics": [],
    "createdAt": "2026-06-30T12:00:00.000Z",
    "readyAt": "2026-06-30T12:00:03.000Z",
    "updatedAt": "2026-06-30T12:00:03.000Z"
  },
  "operation": null
}

Was this page helpful?