Sitecore Authoring and Management GraphQL API: Automating XM Cloud
Experience Edge's GraphQL API is for delivery (reading published content). For authoring — creating items, updating fields, publishing — XM Cloud provides the Authoring and Management GraphQL API.
Authentication
Use OAuth client credentials (an automation client created in the XM Cloud Deploy app or Cloud Portal) to get an access token, then call the authoring endpoint of your environment.
Create an Item
mutation {
createItem(input: {
name: "new-article"
templateId: "{TEMPLATE-GUID}"
parent: "{PARENT-ITEM-GUID}"
language: "en"
fields: [
{ name: "Title", value: "AI in Customer Experience" }
{ name: "Summary", value: "How AI is changing CX in 2026." }
]
}) {
item { itemId name path }
}
}
Update an Item
mutation {
updateItem(input: {
itemId: "{ITEM-GUID}"
language: "en"
fields: [{ name: "Summary", value: "Updated summary" }]
}) {
item { itemId }
}
}
Use Cases
- Import content from external systems (PIM, legacy CMS)
- Bulk updates and clean-ups
- Create sites and pages from templates
- Trigger publishing from CI/CD
- AI pipelines creating draft content for review
Best Practices
- Use a dedicated automation client with minimum permissions
- Handle errors and rate limits
- Put AI-created content into workflow states requiring approval
- Log every change
The authoring API makes XM Cloud scriptable — perfect for migrations and automation.