Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Put a label on a space

Adds one of the team’s labels to the space and returns the updated space. Adding a label the space already wears succeeds and changes nothing.

PUT/v1/spaces/{spaceId}/labels/{labelId}
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.

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
Path parameters
spaceIdstringrequired
min length 1
labelIdstringrequired
min length 1
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
teamIdstring | nullrequired
teamSlugstring | nullrequired
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

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
object
object
object
object
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. True whenever the owning team hides its spaces from search engines (teamAccessPolicy.noindex), whatever this space's own setting. Immutable version and preview hostnames are always noindex regardless of this setting.

teamAccessPolicyobject | null

The owning team's access rules that bind this space, or null when no team owns it. privateSpacesOnly means the space cannot be made public; noindex means it cannot be shown to search engines.

Show properties
Any of:
object
privateSpacesOnlybooleanrequired

When true, no space in this team can be public: public Grants, public new-space defaults, and access: public on create or publish are refused with team_private_spaces_only, and public access declared in sf.jsonc is ignored. Turning it on revokes every public Grant on the team's spaces and turns noindex on.

noindexbooleanrequired

When true, every space in this team serves platform noindex directives on its live hostnames, whatever its own noindex says, and a space cannot turn it off. Always true while privateSpacesOnly is true.

null
null
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 the Git history. spacefast: push to publish. github or connected: deploys from an upstream repository; direct pushes are refused.

Allowed:spacefastgithubconnected
remoteUrlstring | nullrequired

Credential-free git remote to push to, or null for an upstream-managed repository. Authenticate as HTTP Basic user t with a space key or API key as the password.

repositorystring | nullrequired

Name of the connected upstream 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))$
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
Request
curl -X PUT 'https://api.spacefast.com/v1/spaces/string/labels/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "$schema": "http://example.com",
  "data": {
    "id": "string",
    "teamId": "string",
    "teamSlug": "string",
    "anonymous": true,
    "slug": "string",
    "title": "string",
    "status": "provisioning",
    "disabled": {
      "at": "2019-08-24T14:15:22Z",
      "reasonCode": "anonymous_expired"
    },
    "claimState": {
      "expiresAt": "2019-08-24T14:15:22Z",
      "claimedAt": "2019-08-24T14:15:22Z",
      "purgeAfter": "2019-08-24T14:15:22Z"
    },
    "expiryExtension": {
      "extendedTo": "2019-08-24T14:15:22Z"
    },
    "defaultHostname": "string",
    "publicName": "string",
    "liveUrl": "string",
    "thumbnail": {
      "kind": "screenshot",
      "provider": "wpcom-mshots",
      "url": "http://example.com",
      "sourceUrl": "http://example.com"
    },
    "dataLocation": "string",
    "region": "string",
    "burstable": true,
    "archivedBytes": 0,
    "hasRuntime": true,
    "channels": {
      "property1": {
        "versionId": "string",
        "updatedAt": "2019-08-24T14:15:22Z"
      },
      "property2": {
        "versionId": "string",
        "updatedAt": "2019-08-24T14:15:22Z"
      }
    },
    "config": {
      "index": "string",
      "fallback": "string",
      "cleanUrls": true,
      "listing": true,
      "meta": {
        "title": "string",
        "description": "string",
        "image": "string",
        "favicon": "string"
      },
      "superpowers": {
        "enabled": true,
        "disable_all_injection": true,
        "googleAnalytics": {
          "enabled": true,
          "measurementId": "string"
        },
        "googleTagManager": {
          "enabled": true,
          "containerId": "string"
        },
        "javascriptTags": [
          {
            "id": "string",
            "name": "string",
            "enabled": true,
            "code": "string"
          }
        ],
        "tags": {
          "inheritance": {
            "inherited": true,
            "overrides": [
              {
                "tagId": "string",
                "disabled": false,
                "reason": "string"
              }
            ]
          },
          "requireReview": true
        }
      },
      "templates": [
        "string"
      ],
      "theme": {
        "accent": "string",
        "background": "string",
        "logo": "string",
        "name": "string",
        "font": "string",
        "hideSpacefastBranding": true
      },
      "collab": {
        "ui": "default"
      },
      "build": {
        "rootDirectory": "string",
        "installDirectory": "string",
        "installCommand": "string",
        "buildCommand": "string",
        "outputDirectory": "string",
        "ignoredBuildCommand": "string",
        "frameworkPreset": "string",
        "platformPreset": "string",
        "allowUnsupportedPlatformFeatures": true,
        "timeoutSeconds": 60
      },
      "placement": {
        "burstable": true,
        "edge": true
      },
      "markdownNegotiation": true,
      "firewall": [
        {
          "name": "string",
          "description": "string",
          "action": "block",
          "status": 400,
          "match": {
            "path": "string",
            "host": "string",
            "method": "string",
            "ip": "string",
            "country": "string",
            "asn": "string",
            "userAgent": "string",
            "referer": "string",
            "header": {
              "property1": "string",
              "property2": "string"
            },
            "cookie": {
              "property1": "string",
              "property2": "string"
            },
            "query": {
              "property1": "string",
              "property2": "string"
            },
            "extension": "string",
            "ja3": "string",
            "ja4": "string"
          },
          "any": true
        }
      ],
      "cache": {
        "bypass": [
          {
            "name": "string",
            "description": "string",
            "match": {
              "path": "string",
              "host": "string",
              "method": "string",
              "ip": "string",
              "country": "string",
              "asn": "string",
              "userAgent": "string",
              "referer": "string",
              "header": {
                "property1": "string",
                "property2": "string"
              },
              "cookie": {
                "property1": "string",
                "property2": "string"
              },
              "query": {
                "property1": "string",
                "property2": "string"
              },
              "extension": "string",
              "ja3": "string",
              "ja4": "string"
            },
            "any": true
          }
        ]
      },
      "redirects": [
        {
          "source": "string",
          "destination": "string",
          "status": 301,
          "force": true,
          "query": {
            "property1": "string",
            "property2": "string"
          }
        }
      ],
      "rewrites": [
        {
          "source": "string",
          "destination": "string",
          "cache": "shared",
          "force": true,
          "query": {
            "property1": "string",
            "property2": "string"
          },
          "notFound": true
        }
      ],
      "headers": [
        {
          "source": "string",
          "headers": [
            {
              "key": "string",
              "value": "string"
            }
          ]
        }
      ],
      "network": {
        "ingress": {
          "allowedCidrs": [
            "string"
          ]
        }
      },
      "users": {
        "enabled": true,
        "providers": {
          "google": {},
          "gravatar": {
            "enabled": true
          },
          "spacefast": {
            "enabled": true
          }
        }
      },
      "dataSources": {
        "property1": {
          "kind": "wordpress",
          "url": "http://example.com"
        },
        "property2": {
          "kind": "wordpress",
          "url": "http://example.com"
        }
      },
      "defaultDataSource": "string"
    },
    "grandfatherBrandingRemoval": true,
    "settingsDigest": "string",
    "noindex": true,
    "teamAccessPolicy": {
      "privateSpacesOnly": true,
      "noindex": true
    },
    "pinnedAt": "2019-08-24T14:15:22Z",
    "labelIds": [
      "string"
    ],
    "viewerCanDelete": true,
    "viewerCanTransfer": true,
    "git": {
      "managedBy": "spacefast",
      "remoteUrl": "string",
      "repository": "string",
      "defaultBranch": "string",
      "provisioned": true
    },
    "operation": {
      "id": "string",
      "kind": "string",
      "status": "queued",
      "resources": [
        {
          "type": "string",
          "id": "string"
        }
      ],
      "progress": {
        "total": 0,
        "completed": 0,
        "failed": 0
      },
      "diagnostics": [
        {
          "code": "string",
          "severity": "info",
          "message": "string",
          "path": "string",
          "provider": "infra",
          "details": {
            "property1": null,
            "property2": null
          },
          "fix": "string",
          "retryable": true
        }
      ],
      "createdAt": "2019-08-24T14:15:22Z",
      "finishedAt": "2019-08-24T14:15:22Z"
    },
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}

Was this page helpful?