Skip to main content
PATCH
/
v6
/
pages
/
{pageIdOrPathname}
Update Page
curl --request PATCH \
  --url https://api.makeswift.com/v6/pages/{pageIdOrPathname} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "pathname": "<string>",
  "name": "<string>",
  "isOnline": true
}
'
{
  "object": "page",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "pathname": "furniture",
  "canonicalUrl": "<string>",
  "title": "<string>",
  "description": "<string>",
  "socialImageUrl": "<string>",
  "sitemapPriority": 0.5,
  "sitemapFrequency": "always",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "publishedAt": "2023-11-07T05:31:56Z",
  "isOnline": true,
  "excludedFromSearchEngines": true,
  "localizations": [
    {
      "pathname": "<string>",
      "locale": "<string>",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ],
  "locale": "<string>"
}

Authorizations

x-api-key
string
header
required

API key authentication. Accepts either:

  • App API key (e.g. sk_eczMHVBY9fV6GYFhvs53qcnxq7yptlXL3ABKOZtn6dQ)
  • Site API key (UUID format, e.g. 550e8400-e29b-41d4-a716-446655440000)

Path Parameters

pageIdOrPathname
string
required

The page ID or pathname for the page you are updating.

Query Parameters

siteId
string<uuid>

The site ID required when using a pathname instead of a page ID.

Body

application/json
pathname
string

The page pathname.

name
string

The page name.

Minimum string length: 1
isOnline
boolean

The flag that indicates whether the page is online.

Response

object
enum<string>
required
Available options:
page
Example:

"page"

id
string<uuid>
required

The ID of the page.

pathname
string
required

The page pathname.

Example:

"furniture"

canonicalUrl
string | null
required

The canonical URL of the page.

title
string | null
required

The page title.

description
string | null
required

The page description.

socialImageUrl
string | null
required

The social image URL of the page.

sitemapPriority
number | null
required

The sitemap priority.

Required range: 0 <= x <= 1
sitemapFrequency
enum<string> | null
required

The sitemap update frequency.

Available options:
always,
hourly,
daily,
weekly,
monthly,
yearly,
never
createdAt
string<date-time> | null
required

The page creation date and time.

updatedAt
string<date-time> | null
required

The page last update date and time.

publishedAt
string<date-time> | null
required

The page publication date and time.

isOnline
boolean
required

The flag that indicates whether the page is online.

excludedFromSearchEngines
boolean | null
required

The flag that indicates whether the page is excluded from search.

localizations
object[]
required

The localizations of the page.

locale
string

The page locale. This defaults to the default locale of the parent site.