For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign in
DocsAPI ReferenceChangelog
DocsAPI ReferenceChangelog
    • Overview
    • Authentication
  • REST
      • POSTCreate Page
      • GETList Pages
      • GETGet Page
      • PATCHUpdate Page
      • DELDelete Page
Sign in
LogoLogo
RESTPages

Update Page

PATCH
https://api.makeswift.com/v6/pages/:pageIdOrPathname
PATCH
/v6/pages/:pageIdOrPathname
$curl -X PATCH https://api.makeswift.com/v6/pages/pageIdOrPathname \
> -H "x-api-key: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "object": "page",
3 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
4 "pathname": "furniture",
5 "canonicalUrl": "https://www.example.com/furniture",
6 "title": "Modern Furniture Collection",
7 "description": "Explore our exclusive range of modern furniture designed to elevate your living space.",
8 "socialImageUrl": "https://www.example.com/images/furniture-social.jpg",
9 "sitemapPriority": 0.5,
10 "sitemapFrequency": "always",
11 "createdAt": "2024-01-15T09:30:00Z",
12 "updatedAt": "2024-01-15T09:30:00Z",
13 "publishedAt": "2024-01-15T09:30:00Z",
14 "isOnline": true,
15 "excludedFromSearchEngines": true,
16 "localizations": [
17 {
18 "pathname": "meubles",
19 "locale": "fr-FR",
20 "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
21 }
22 ],
23 "locale": "en-US"
24}
Updates an existing page.
Was this page helpful?
Previous

Get Page

Next

Delete Page

Built with

Authentication

x-api-keystring
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

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

Query parameters

siteIdstringOptionalformat: "uuid"
The site ID required when using a pathname instead of a page ID.

Request

This endpoint expects an object.
pathnamestringOptional
The page pathname.
namestringOptional>=1 character
The page name.
isOnlinebooleanOptional
The flag that indicates whether the page is online.

Response

objectenum
Allowed values:
idstringformat: "uuid"
The ID of the page.
pathnamestring
The page pathname.
canonicalUrlstring or null
The canonical URL of the page.
titlestring or null
The page title.
descriptionstring or null
The page description.
socialImageUrlstring or null
The social image URL of the page.
sitemapPrioritydouble or null0-1
The sitemap priority.
sitemapFrequencyenum or null
The sitemap update frequency.
createdAtdatetime or null
The page creation date and time.
updatedAtdatetime or null
The page last update date and time.
publishedAtdatetime or null
The page publication date and time.
isOnlineboolean
The flag that indicates whether the page is online.
excludedFromSearchEnginesboolean or null
The flag that indicates whether the page is excluded from search.
localizationslist of objects
The localizations of the page.
localestring
The page locale. This defaults to the default locale of the parent site.

Errors

400
Bad Request Error
403
Forbidden Error
409
Conflict Error

API key authentication. Accepts either:

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