Skip to main content
PATCH
/
v2
/
sites
/
{siteId}
Update Site
curl --request PATCH \
  --url https://api.makeswift.com/v2/sites/{siteId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "Hearth Furniture Company",
  "hostOrigin": "https://hearthfurniture.com"
}
'
{
  "object": "site",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "Hearth Furniture Company",
  "hostOrigin": "https://hearthfurniture.com",
  "publicApiKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "defaultLocale": "en-US"
}

Authorizations

x-api-key
string
header
required

The App API key.

(e.g. sk_eczMHVBY9fV6GYFhvs53qcnxq7yptlXL3ABKOZtn6dQ)

Path Parameters

siteId
string<uuid>
required

The site ID for the site you are updating.

Body

application/json
name
string

The site name.

Example:

"Hearth Furniture Company"

hostOrigin
string<uri>

The public URL where your site is hosted. This is the URL that Makeswift uses to render your site for editing.

Example:

"https://hearthfurniture.com"

Response

object
enum<string>
required

The type of the object

Available options:
site
Example:

"site"

id
string<uuid>
required
name
string
required

The site name.

Example:

"Hearth Furniture Company"

hostOrigin
null
required

The public URL where your site is hosted. This is the URL that Makeswift uses to render your site for editing.

Example:

"https://hearthfurniture.com"

publicApiKey
string<uuid>
required

The publishable API key that a host can use to get page and component data for rendering your site.

defaultLocale
string
required

The primary locale of this site.

Examples:

"en"

"es"

"fr-FR"

"ar-EG"

"ja-JP"