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

Create Page

POST
https://api.makeswift.com/v6/pages
POST
/v6/pages
$curl -X POST https://api.makeswift.com/v6/pages \
> -H "x-api-key: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "siteId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
> "pathname": "about-us",
> "name": "About Us"
>}'
1{
2 "object": "page",
3 "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
4 "pathname": "about-us",
5 "canonicalUrl": "https://www.example.com/about-us",
6 "title": "About Our Company",
7 "description": "Learn more about our company's mission, vision, and team.",
8 "socialImageUrl": "https://www.example.com/images/about-us-social.png",
9 "sitemapPriority": 0.7,
10 "sitemapFrequency": "weekly",
11 "createdAt": "2024-01-15T09:30:00Z",
12 "updatedAt": "2024-01-20T11:45:00Z",
13 "publishedAt": "2024-01-21T08:00:00Z",
14 "isOnline": true,
15 "excludedFromSearchEngines": false,
16 "localizations": [
17 {
18 "pathname": "a-propos",
19 "locale": "fr-FR",
20 "id": "d94f3f01-3c3a-4f1a-9f3e-2a1b5e4c9f7d"
21 }
22 ],
23 "locale": "en-US"
24}
Creates a new page in a site.
Was this page helpful?
Previous

Restore Locale

Next

List Pages

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)

Request

This endpoint expects an object.
siteIdstringRequiredformat: "uuid"
The site ID to create the page for.
pathnamestringRequired
The page pathname.
namestringRequired>=1 character
The page name.

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)