Skip to content
Spacefast Docs
Esc
↑↓navigate↵open⌘Jpreview

Create a space

Creates a space under a team with a chosen or generated slug. Pass source to create it from a GitHub repository and start its first build. Use POST /v1/publish to create a space and publish content in one call.

POST/v1/spaces
Authorization
AuthorizationBearer token · headerrequired

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

or
AuthorizationOAuth2 access token · headerrequired

OAuth 2.0 with explicit Spacefast capability scopes. Use the authorization-code flow for people and client credentials for machines.

Scopes:spaces:write
Request body
requiredapplication/json
teamIdstring | null
principalobject
Show properties
typestringrequired

Owning principal kind.

Allowed:teamexternal
idstringrequired

Tenant-local principal id: a team id or an integrator external customer id.

min length 1 · max length 256 · matches ^[^\s/\\]+$
slugstring
min length 2 · max length 55
titlestring
min length 1 · max length 255
configobject

Initial SpaceConfig overlay for the new space.

Show properties
indexstring | boolean

Directory index file; false disables index resolution.

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

Fallback document. "/index.html" means SPA. Defaults to the nearest 404.html.

Show properties
Any of:
string
string
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, unless a 200-status SPA fallback is configured.

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

Master switch for platform-managed injections.

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
disabledboolean
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
uistring
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

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.

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

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.

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

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.

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

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.

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.

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_]*$
accessstring

Set the initial root access for this new team-owned Space. Omit this field to use the team's default.

Allowed:privateteampublic
dataLocationstring

Data location for a new Space; "auto" lets placement decide.

Allowed:autoamsburdcadfw
sourceobject

Create the Space from a GitHub repository: connects it with automatic production and preview deploys and starts the first sync, which builds the production branch. Title and slug default to the repository name. Team-owned Spaces only, and the caller must be a signed-in user.

Show properties
providerstringrequired
installationIdstringrequired

GitHub App installation that holds the repository.

min length 1
repositoryIdstringrequired

Immutable GitHub repository id.

min length 1
repositoryFullNamestringrequired

The repository as owner/name.

min length 3
branchstring

Production branch. Defaults to the repository's default branch.

min length 1
Responses
201

Response for status 201

$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
spaceobjectrequired
Show properties
idstringrequired
tenantIdstring
modestring

test when the owning tenant is a linked test tenant, live otherwise.

Allowed:livetest
providerRefstring | null

WP Cloud atomic_site_id of the site serving this space. Use it with providerClientId to address the site in WP Cloud. Null until the space is placed.

providerClientIdstring | null

WP Cloud client identity (pvc_...) the space's site is provisioned under.

teamIdstring | nullrequired
teamSlugstring | nullrequired
principalobject | null
Show properties
Any of:
object
tenantIdstringrequired
principalTypestringrequired
Allowed:teamexternal
principalIdstringrequired
null
null
infrastructureobject
Show properties
regionstring | nullrequired

Concrete region the space's site was placed in.

runtimeInstanceIdstring | nullrequired

Runtime instance serving this space.

managementHostnamestring | nullrequired

Permanent hostname minted for the provider site when it was created. It stays attached to the site for the site's whole life and never changes, even when the Space is renamed or gets a custom domain, so it is a stable key for matching this Space to its WP Cloud site. It is not the public URL: visitors use liveUrl, and WP Cloud reports the Space's primary hostname as the site's domain_name.

provisioningStatestringrequired

Convergence of the space against its intended infrastructure: still being placed, matching intent, or failing to converge.

Allowed:provisioningconvergeddegraded
anonymousbooleanrequired
slugstringrequired
titlestringrequired
statusstringrequired

Operation-lifecycle status. Serving state is the separate disabled axis.

Allowed:provisioningactiveupdatingdeletingfailed
disabledobject | nullrequired
Show properties
Any of:
object
atstring<date-time> | nullrequired
Show properties
Any of:
string<date-time>
string<date-time>
null
null
reasonCodestringrequired

Why serving is disabled.

Allowed:anonymous_expiredpublish_failedabuse_takedowntenant_suspendedsite_suspendedauthor_removedarchived
null
null
claimStateobject | nullrequired
Show properties
Any of:
object
expiresAtstring<date-time> | nullrequired
Show properties
Any of:
string<date-time>
string<date-time>
null
null
claimedAtstring<date-time> | nullrequired
Show properties
Any of:
string<date-time>
string<date-time>
null
null
purgeAfterstring<date-time> | nullrequired
Show properties
Any of:
string<date-time>
string<date-time>
null
null
null
null
expiryExtensionobject | null
Show properties
Any of:
object
extendedTostring<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))$
null
null
defaultHostnamestringrequired

Current Spacefast-owned managed hostname: under space.fast, or under view.fast for a space created before space.fast. Renaming the space changes the label and keeps the apex; previously managed hostnames temporarily redirect to the current one.

publicNamestringrequired

Public space label used in the managed hostname.

liveUrlstringrequired

Live space URL: the primary bound domain when one exists, else the default hostname. Always present on non-deleted spaces.

thumbnailobject | nullrequired

Server-selected dashboard thumbnail. Screenshots use WordPress.com mShots; image thumbnails use WordPress.com Site Accelerator.

Show properties
Any of:
object
kindstringrequired
Allowed:screenshotimage
providerstringrequired
Allowed:wpcom-mshotswpcom-site-accelerator
urlstring<uri>required
sourceUrlstring<uri>required
null
null
dataLocationstringrequired

Resolved data-location region, fixed when the space is created and immutable afterwards; "auto" only while no concrete region is known yet.

regionstringrequired

Alias of dataLocation for placement dashboards; "auto" only while no concrete region is known yet.

burstableboolean | nullrequired

Whether this space's site can burst provider PHP workers.

archivedBytesintegerrequired

Bytes currently archived out of the hot runtime store.

min 0 · max 9007199254740991
hasRuntimebooleanrequired

Whether this space's live version runs code and therefore has a Runtime surface. Feature eligibility alone does not make the surface visible.

channelsobjectrequired

Channel pointers by name. "live" is present after a version is promoted.

configobject | nullrequired

Stored SpaceConfig overlay applied over the live version's sf.jsonc; null when nothing is overridden.

Show properties
Any of:
object
indexstring | boolean

Directory index file; false disables index resolution.

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

Fallback document. "/index.html" means SPA. Defaults to the nearest 404.html.

Show properties
Any of:
string
string
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, unless a 200-status SPA fallback is configured.

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

Master switch for platform-managed injections.

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

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.

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

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.

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

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.

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

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.

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.

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
grandfatherBrandingRemovalboolean

Whether this Space can keep removing the badge under a newer plan.

settingsDigeststringrequired

CAS token for versioned settings writes (digest over title + config overlay). Send it back as baseSettingsDigest on PATCH to get compare-and-swap semantics.

matches ^[0-9a-f]{64}$
noindexbooleanrequired

When true, the live production hostnames serve platform noindex directives. Immutable version and preview hostnames are always noindex regardless of this setting.

pinnedAtstring<date-time> | nullrequired

Instant the space was pinned to the top of its team's space list, or null when it is not pinned. The pin is team-wide: everyone who can see the team sees it.

Show properties
Any of:
string<date-time>
string<date-time>
null
null
labelIdsstring[]required

Ids of the team labels on this space, ordered by label name. Empty when the space carries none. Manage them with PUT and DELETE /v1/spaces/{spaceId}/labels/{labelId}.

viewerCanDeleteboolean

Whether the caller's account may delete this space. Team owners and admins can delete any space in the team; a member can delete the spaces they created. Absent on unclaimed spaces, which their space key governs, and when the request carries no account credential.

viewerCanTransferboolean

Whether the caller's account may transfer this space to another team. Team owners and admins can; a member who created the space can from the dashboard while nobody else has published to it and it has no custom domain, database, or paid resource. Present on single-space GET reads only; absent on lists, on write responses, on unclaimed spaces, and when the request carries no account credential.

gitobject | nullrequired

Git remote for this space, or null when it has no repository yet. Push to remoteUrl to publish.

Show properties
Any of:
object
managedBystringrequired

Who owns this space's git history. spacefast: push remoteUrl to publish. github: the space deploys from repository and direct pushes are refused.

Allowed:spacefastgithub
remoteUrlstring | nullrequired

Credential-free git remote to push to, or null when managedBy is github. Authenticate as HTTP Basic user t with a space key or API key as the password.

repositorystring | nullrequired

owner/name of the GitHub repository this space deploys from, else null.

defaultBranchstring | nullrequired

Branch that publishes to the live channel when pushed.

provisionedbooleanrequired

Whether the repository behind this block exists yet. Always true for a GitHub binding; for a hosted remote, true once it was minted or first pushed to, and false while there is nothing to browse.

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
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))$
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))$
accessobjectrequired
Show properties
urlstring<uri>required
tokenstringrequired
min length 16 · max length 512
expiresAtstring<date-time> | nullrequired
Show properties
Any of:
string<date-time>
string<date-time>
null
null
claimobject
Show properties
keystringrequired

The space key (sfc_…): the one credential for this unclaimed space. Bearer auth for publish, update, status, sharing, rotation, and the one-time continuation exchange. Returned only at creation and rotation; save it immediately.

min length 1
urlstring<uri>required

The site door: the live URL with the space key in /__/<key> form. Opening it exchanges the key for a private view session and lands on the site. It is the same key in URL form, so share it as carefully as the key.

claimUrlstring<uri>required

Claim page link in /claim#<key> form. The fragment is the key; browsers never send it to a server and the claim page strips it before analytics. Works until expiresAt and can be opened more than once.

expiresAtstring<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))$
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.

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
Bodyapplication/json
Request
curl -X POST 'https://api.spacefast.com/v1/spaces' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "teamId": "team_3f9a1c7e5b2d8a4f",
  "slug": "marketing-site",
  "title": "Marketing site"
}'
Response
{
  "data": {
    "space": {
      "id": "spc_4a7f9c2e8b1d0a6f5c3e9d2b7a1f8e4c",
      "tenantId": "ten_main",
      "providerRef": null,
      "providerClientId": null,
      "teamId": "team_3f9a1c7e5b2d8a4f",
      "teamSlug": "acme",
      "principal": {
        "tenantId": "ten_main",
        "principalType": "team",
        "principalId": "team_3f9a1c7e5b2d8a4f"
      },
      "anonymous": false,
      "slug": "marketing-site",
      "title": "Marketing site",
      "status": "active",
      "disabled": null,
      "claimState": null,
      "defaultHostname": "marketing-site.space.fast",
      "publicName": "marketing-site",
      "liveUrl": "https://marketing-site.space.fast/",
      "dataLocation": "dca",
      "channels": {
        "live": {
          "versionId": "ver_2b9e7d4c1a6f8b3e0d5c9a2f7e4b1d8c",
          "updatedAt": "2026-06-30T12:00:03.000Z"
        }
      },
      "config": null,
      "noindex": false,
      "policy": null,
      "operation": null,
      "createdAt": "2026-06-30T11:59:00.000Z",
      "updatedAt": "2026-06-30T12:00:03.000Z"
    }
  }
}