Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Update team settings

Updates the team’s settings for Spaces and shared connectors atomically. Enterprise admins can set connectorsEnforcementPolicy with kind and connectors plus both policy revisions. Null removes a saved local policy, including after a downgrade or feature rollback. Parent policies cannot be overridden. Removal and empty blocklists require recent session identity confirmation.

PATCH/v1/teams/{teamId}/settings
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:teams:create
Path parameters
teamIdstringrequired
min length 1
Query parameters
includeInfraboolean | string

Include live hosting capabilities. Set false to read only the stored settings, which skips the live capability lookup.

Request body
requiredapplication/json
defaultDataLocationstring

Default placement region for new spaces; "auto" lets placement decide.

min length 1 · max length 64
connectorsServingobject
Show properties
adminOnlybooleanrequired
allowliststring[] | nullrequired
Show properties
Any of:
string[]
Array of string
string
null
null
connectorsEnforcementPolicyobject | null

Enterprise connector allowlist or blocklist. Null removes the local policy. Requires both policy revisions; parent policies cannot be overridden. Session credentials require recent identity confirmation for removal or an empty blocklist.

Show properties
Any of:
object
kindstringrequired
Allowed:allowlistblocklist
connectorsstring[]required
max items 2000
null
null
connectorsEnforcementPolicyRevisioninteger
min 0 · max 9007199254740991
connectorsEnforcementPolicyParentRevisioninteger | null
Show properties
Any of:
integer
integer
null
null
githubPreviewCommentsEnabledboolean

Controls GitHub preview comments for Spaces that use the team setting.

requireTwoFactorboolean

Requires every team member to have two-factor authentication on. Only a team owner can change it, and it can only be turned on once every current member has two-factor on.

spaceCreationAdminOnlyboolean

When true, only the team's owners and admins can add new spaces to the team. This covers create, publish, claim, and the first push to a push remote (POST /v1/push-remotes). A member's transfer into the team also waits for an owner or admin to accept it. Members, and agents or API keys that act for a member, get 403 forbidden with details.teamSetting set to spaceCreationAdminOnly. Only owners and admins can change it. Spaces that already exist do not change.

customDomainsAdminOnlyboolean

When true, only team owners and admins can add custom domains to the team's Spaces. Members cannot add or verify a custom domain.

subteamCreationAdminOnlyboolean

When true, only the team's owners and admins can create subteams. Members, and agents or API keys that act for a member, get 403 forbidden with details.teamSetting set to subteamCreationAdminOnly. Only a team that can have subteams can change it.

wpCloudSettingsDefaultsobject

WP Cloud defaults inherited by the team's Spaces.

Show properties
default_php_connsstring | null
Show properties
Any of:
string
string
null
null
burst_php_connsstring | null
Show properties
Any of:
string
string
null
null
php_memory_limitstring | null
Show properties
Any of:
string
string
null
null
php_fs_permissionsstring | null
Show properties
Any of:
string
string
null
null
static_file_404string | null
Show properties
Any of:
string
string
null
null
canonicalize_aliasesstring | null
Show properties
Any of:
string
string
null
null
space_quotastring | null
Show properties
Any of:
string
string
null
null
Responses
200

Response for status 200

$schemastring<uri>

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

dataobjectrequired
Show properties
connectorsServingobjectrequired
default: {"adminOnly":false,"allowlist":null}
Show properties
adminOnlybooleanrequired
allowliststring[] | nullrequired
Show properties
Any of:
string[]
Array of string
string
null
null
connectorsEnforcementPolicyobject | nullrequired
default: null
Show properties
Any of:
object
kindstringrequired
Allowed:allowlistblocklist
connectorsstring[]required
max items 2000
null
null
connectorsEnforcementPolicyDetailsobject

Admin-only effective policy, parent revisions and configured impact, requested with connectorPolicy=summary or catalog. Saved policies remain readable after an Enterprise downgrade or feature rollback.

Show properties
localPolicyobject | nullrequired
Show properties
Any of:
object
kindstringrequired
Allowed:allowlistblocklist
connectorsstring[]required
max items 2000
null
null
effectivePolicyobject | nullrequired
Show properties
Any of:
object
kindstringrequired
Allowed:allowlistblocklist
connectorsstring[]required
max items 2000
null
null
controllingTeamobjectrequired
Show properties
idstringrequired
namestringrequired
slugstringrequired
inheritedbooleanrequired
revisionintegerrequired
min 0 · max 9007199254740991
parentRevisioninteger | nullrequired
Show properties
Any of:
integer
integer
null
null
catalogAliasesobject[]required
Show properties
Array of object
idstringrequired
allowlistIdsstring[]required
blocklistIdsstring[]required
connectorsobject[]required
Show properties
Array of object
idstringrequired
titlestringrequired
surfacestringrequired
logoUrlstring | nullrequired
grantablebooleanrequired
childrenobject[]required
Show properties
Array of object
idstringrequired
namestringrequired
slugstringrequired
policyobject | nullrequired
Show properties
Any of:
object
kindstringrequired
Allowed:allowlistblocklist
connectorsstring[]required
max items 2000
null
null
configuredobject[]required
Show properties
Array of object
teamIdstringrequired
connectorIdstringrequired
connectorSlugstringrequired
blocklistIdsstring[]required
allowlistIdsstring[]required
connectionsintegerrequired
min 0 · max 9007199254740991
bindingsintegerrequired
min 0 · max 9007199254740991
spaceIdsstring[]required
githubPreviewCommentsEnabledboolean

Controls GitHub preview comments for Spaces that use the team setting.

requireTwoFactorbooleanrequired

Whether every team member must have two-factor authentication on.

spaceCreationAdminOnlybooleanrequired

Whether only the team's owners and admins can add new spaces to the team.

customDomainsAdminOnlybooleanrequired

Whether only team owners and admins can add custom domains to the team's Spaces.

default: false
subteamCreationAdminOnlybooleanrequired

Whether only the team's owners and admins can create subteams.

default: false
teamIdstringrequired

The team id the settings belong to.

wpCloudSettingsDefaultsobject

WP Cloud defaults inherited by the team's Spaces.

Show properties
default_php_connsstring | null
Show properties
Any of:
string
string
null
null
burst_php_connsstring | null
Show properties
Any of:
string
string
null
null
php_memory_limitstring | null
Show properties
Any of:
string
string
null
null
php_fs_permissionsstring | null
Show properties
Any of:
string
string
null
null
static_file_404string | null
Show properties
Any of:
string
string
null
null
canonicalize_aliasesstring | null
Show properties
Any of:
string
string
null
null
space_quotastring | null
Show properties
Any of:
string
string
null
null
defaultDataLocationstringrequired

Default placement region for new spaces; "auto" lets placement decide.

min length 1 · max length 64
regionOptionsobject[]

Placement regions currently available for new spaces.

Show properties
Array of object
idstringrequired
labelstringrequired
infraCapabilitiesobject

Live capabilities for the team's infra provider account. May be omitted when includeInfra is false or for connector-policy views and policy-only updates.

Show properties
datacentersobject[]required
Show properties
Array of object
idstringrequired
labelstringrequired
phpVersionstringrequired
default

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

$schemastring<uri>

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

typestringrequired

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

titlestringrequired

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

statusintegerrequired

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

min -9007199254740991 · max 9007199254740991
detailstringrequired

Human-readable failure explanation for this occurrence.

codestringrequired

Stable snake_case error code naming the failed public contract.

pointerstring

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

detailsobject

Machine-readable context for the error code.

fixstring

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

suggestionsstring[]

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

nextstring[]

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

requestIdstringrequired

The request id to quote when contacting support.

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PATCH 'https://api.spacefast.com/v1/teams/string/settings' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "defaultDataLocation": "string",
  "connectorsServing": {
    "adminOnly": true,
    "allowlist": [
      "string"
    ]
  },
  "connectorsEnforcementPolicy": {
    "kind": "allowlist",
    "connectors": [
      "string"
    ]
  },
  "connectorsEnforcementPolicyRevision": 0,
  "connectorsEnforcementPolicyParentRevision": 0,
  "githubPreviewCommentsEnabled": true,
  "requireTwoFactor": true,
  "spaceCreationAdminOnly": true,
  "customDomainsAdminOnly": true,
  "subteamCreationAdminOnly": true,
  "wpCloudSettingsDefaults": {
    "default_php_conns": "string",
    "burst_php_conns": "string",
    "php_memory_limit": "string",
    "php_fs_permissions": "string",
    "static_file_404": "string",
    "canonicalize_aliases": "string",
    "space_quota": "string"
  }
}'
Response
{
  "$schema": "http://example.com",
  "data": {
    "connectorsServing": {
      "adminOnly": false,
      "allowlist": null
    },
    "connectorsEnforcementPolicy": null,
    "connectorsEnforcementPolicyDetails": {
      "localPolicy": {
        "kind": "allowlist",
        "connectors": [
          "string"
        ]
      },
      "effectivePolicy": {
        "kind": "allowlist",
        "connectors": [
          "string"
        ]
      },
      "controllingTeam": {
        "id": "string",
        "name": "string",
        "slug": "string"
      },
      "inherited": true,
      "revision": 0,
      "parentRevision": 0,
      "catalogAliases": [
        {
          "id": "string",
          "allowlistIds": [
            "string"
          ],
          "blocklistIds": [
            "string"
          ]
        }
      ],
      "connectors": [
        {
          "id": "string",
          "title": "string",
          "surface": "string",
          "logoUrl": "string",
          "grantable": true
        }
      ],
      "children": [
        {
          "id": "string",
          "name": "string",
          "slug": "string",
          "policy": {
            "kind": "allowlist",
            "connectors": [
              "string"
            ]
          }
        }
      ],
      "configured": [
        {
          "teamId": "string",
          "connectorId": "string",
          "connectorSlug": "string",
          "blocklistIds": [
            "string"
          ],
          "allowlistIds": [
            "string"
          ],
          "connections": 0,
          "bindings": 0,
          "spaceIds": [
            "string"
          ]
        }
      ]
    },
    "githubPreviewCommentsEnabled": true,
    "requireTwoFactor": true,
    "spaceCreationAdminOnly": true,
    "customDomainsAdminOnly": false,
    "subteamCreationAdminOnly": false,
    "teamId": "string",
    "wpCloudSettingsDefaults": {
      "default_php_conns": "string",
      "burst_php_conns": "string",
      "php_memory_limit": "string",
      "php_fs_permissions": "string",
      "static_file_404": "string",
      "canonicalize_aliases": "string",
      "space_quota": "string"
    },
    "defaultDataLocation": "string",
    "regionOptions": [
      {
        "id": "string",
        "label": "string"
      }
    ],
    "infraCapabilities": {
      "datacenters": [
        {
          "id": "string",
          "label": "string"
        }
      ],
      "phpVersion": "8.5"
    }
  }
}

Was this page helpful?