Update page schema markup

Replace the JSON-LD schema markup attached to a page. Accepts a JSON object, a raw JSON string, or a string wrapped in a `<script type="application/ld+json">` tag. When the input is a string that contains an opening `<script type="application/ld+json">` tag, the string must also contain a matching closing `</script>` tag or the request returns 400. Pass `null` to clear the schema markup for the targeted page or locale. The keys `__proto__`, `constructor`, and `prototype` are silently stripped before storage. Validation limits | 60KB raw input, 32 nesting depth, 5000 nodes Required scope | `pages:write`

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

page_idstringRequiredformat: "objectid"
Unique identifier for a Page

Query parameters

localeIdstringOptionalformat: "objectid"
Unique identifier for a secondary locale. Omit this field to write schema markup for the primary locale.

Request

The schema markup to attach to the page.
jsonLdSchemamap from strings to any or string or nullRequired

JSON-LD schema markup to attach to the page. Accepts a JSON object, a raw JSON string, or a string wrapped in a <script type="application/ld+json"> tag. Pass null to clear the schema markup for the targeted page or locale. Validation limits | 60KB raw input, 32 nesting depth, 5000 nodes

Response

Request was successful
idstringformat: "objectid"
Unique identifier for the Page.
siteIdstringRead-onlyformat: "objectid"
Unique identifier for the Site that contains the Page.
localeIdstring or nullRead-onlyformat: "objectid"

Identifier of the locale the request targeted. Resolves to the site’s primary locale when no localeId was provided.

effectiveLocaleIdstring or nullRead-onlyformat: "objectid"

Identifier of the locale that contributed the returned schema markup. Differs from localeId when the requested locale has no override and the primary locale’s schema markup is returned as a fallback. Returns null when no schema markup exists for either the requested locale or the primary locale.

publishedPathstring or nullRead-only
Relative path of the published page URL.
lastUpdatedstring or nullRead-onlyformat: "date-time"
The date the Page was most recently updated.
jsonLdSchemamap from strings to any or null

Parsed JSON-LD schema markup for the page. Returns null when the page has no schema markup or when the stored value is a legacy multi-block format that can’t be parsed as a single JSON-LD object.

rawJsonLdSchemastring or null

Raw stored schema markup, including any surrounding <script type="application/ld+json"> tag. Populated only when the stored value can’t be represented as a single JSON-LD object, for example when a page contains multiple <script> blocks set through the Designer.

isInheritedbooleanDefaults to false

true when the response represents the primary locale’s schema markup because the requested secondary locale has no override. false when the response is the locale’s own value or when no localeId was requested.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error