PagesUpdate a page

Update a page

curl -X PUT "https://www.my-site.com/api/site/v2/pages/1234" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-site-id: YOUR_API_KEY" \
  -d '{
  "merge_metadata": true,
  "metadata": {
    "name": "My Updated Page",
    "enabled": true,
    "seo_searchable": true,
    "secure_zones": [
      "example_string"
    ],
    "user_roles": "1,2,3"
  },
  "slug": "my-updated-page",
  "content": "example_string",
  "layout": "application",
  "format": "html",
  "redirect_to": "/other-page",
  "redirect_code": "301",
  "request_method": "GET",
  "response_headers": {},
  "searchable": true
}'
{}
PUT
/pages/{id}
PUT
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: x-api-key)
x-api-keystring
Required

Your Siteglide API key

Your Siteglide API key
API Key (header: x-site-id)
x-site-idstring
Required

The ID of the Siteglide site you are working with (not an API key — just the numeric site ID)

The ID of the Siteglide site you are working with (not an API key — just the numeric site ID)
path
idstring
Required

The ID of the page to update

Content-Typestring
Required

The media type of the request body

Options: application/json
merge_metadataboolean

When true (default), merges provided metadata with existing metadata. When false, replaces it entirely.

slugstring

Must be unique. Only validated if the slug is being changed.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
x-api-keystring
Required

API Key for authentication. Your Siteglide API key

header
x-site-idstring
Required

API Key for authentication. The ID of the Siteglide site you are working with (not an API key — just the numeric site ID)

Path Parameters

idstring
Required

The ID of the page to update

Example:
1234

Body

application/json
merge_metadataboolean

When true (default), merges provided metadata with existing metadata. When false, replaces it entirely.

Example:
true
metadataobject
slugstring

Must be unique. Only validated if the slug is being changed.

Example:
my-updated-page
layoutstring
Example:
application
formatstring
Example:
html
redirect_tostring
Example:
/other-page
searchableboolean
Example:
true

Responses

OK