Article operations

4 operations named article.*. Every one runs in a batch through apply_ops, dry_run_ops, the CLI or the admin.

Updated
OperationWhat it doesPermissionConfirmation
article.createarticle.create with entry validation and ownership checks.site.editnone
article.updatearticle.update with entry validation and ownership checks.site.editnone
article.publisharticle.publish with entry validation and ownership checks.site.editpublish
article.unpublisharticle.unpublish with entry validation and ownership checks.site.editpublish

article.create

article.create with entry validation and ownership checks.

permission: site.editwrites: pagesclass: transactionundo: yes

Example input

{
  "title": "A house on the hill",
  "templateId": "article-gallery-sticky",
  "blogId": "5f6a7b8c-9d0e-4f1a-8b2c-3d4e5f6a7b8c"
}

Input

FieldTypeRequiredNotes
titlestringyesAt least 1 character. At most 200 characters.
slugstringno
templateIdstringyesAt least 1 character.
localestringnoAt least 1 character. Default "en-US".
blogIdstring (uuid)yes

Output

FieldTypeRequiredNotes
idstringyes
slugstringyes
templateIdstringyes
blogIdstringno

Try it

yarn splash article.create '{"title":"A house on the hill","templateId":"article-gallery-sticky","blogId":"5f6a7b8c-9d0e-4f1a-8b2c-3d4e5f6a7b8c"}' --dry-run

article.update

article.update with entry validation and ownership checks.

permission: site.editwrites: pagesclass: transactionundo: yes

Example input

{
  "id": "4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b",
  "patch": {
    "title": {
      "en-US": "A house on the hill"
    },
    "excerpt": {
      "en-US": "Notes from the site."
    }
  }
}

Input

FieldTypeRequiredNotes
idstringyesAt least 1 character.
patchobjectyes
patch.slugstringno
patch.titlerecord of stringno
patch.excerptrecord of string | nullno
patch.featuredImageIdstring | nullno
patch.authorUserIdstring | nullno
patch.authorNamestring | nullno
patch.canonicalUrlstring | nullno
patch.seoobjectno
patch.templateIdstringnoAt least 1 character.
patch.requireAuthbooleanno
patch.requiredRolesarray of stringnoAt most 50 items.
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "patch": {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string"
        },
        "title": {
          "$ref": "#/$defs/__schema0"
        },
        "excerpt": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema0"
            },
            {
              "type": "null"
            }
          ]
        },
        "featuredImageId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "authorUserId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "authorName": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "canonicalUrl": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "seo": {
          "type": "object",
          "properties": {
            "metaTitle": {
              "anyOf": [
                {
                  "$ref": "#/$defs/__schema0"
                },
                {
                  "type": "null"
                }
              ]
            },
            "metaDescription": {
              "anyOf": [
                {
                  "$ref": "#/$defs/__schema0"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ogImageId": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "noIndex": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "templateId": {
          "type": "string",
          "minLength": 1
        },
        "requireAuth": {
          "type": "boolean"
        },
        "requiredRoles": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema1"
          }
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "id",
    "patch"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "string"
      }
    },
    "__schema1": {
      "type": "string",
      "maxLength": 40,
      "pattern": "^[a-z][a-z0-9-]*$"
    }
  }
}

Output

FieldTypeRequiredNotes
idstringyesAt least 1 character.

Try it

yarn splash article.update '{"id":"4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b","patch":{"title":{"en-US":"A house on the hill"},"excerpt":{"en-US":"Notes from the site."}}}' --dry-run

article.publish

article.publish with entry validation and ownership checks.

permission: site.editwrites: pagesclass: transactionconfirm: publishundo: yes

Example input

{
  "id": "4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b"
}

Input

FieldTypeRequiredNotes
idstringyesAt least 1 character.

Output

FieldTypeRequiredNotes
oktrueyes

Publishing cannot run in a dry run, and the single-operation CLI form sets no confirmation: put it in a batch with confirmed: ["publish"] and run yarn splash apply <file>.

article.unpublish

article.unpublish with entry validation and ownership checks.

permission: site.editwrites: pagesclass: transactionconfirm: publishundo: yes

Example input

{
  "id": "4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b"
}

Input

FieldTypeRequiredNotes
idstringyesAt least 1 character.

Output

FieldTypeRequiredNotes
oktrueyes

Publishing cannot run in a dry run, and the single-operation CLI form sets no confirmation: put it in a batch with confirmed: ["publish"] and run yarn splash apply <file>.

Generated from the operation registry and the MCP tool catalogue (source 037123ffc94bf85a).

Something wrong on this page? Write to docs@librettocms.com.

Libretto docs

Colophon. These docs are a Libretto site: 68 pages in two languages, 20 guide pages imported from Markdown and 41 reference pages generated from the operation registry. Set in Softcore, with code in IBM Plex Mono. Its outline:

/ Libretto docs /start Get started /start/request-access Request access /start/workspace Your workspace /start/first-site Your first site /start/invite-a-client Invite a client /start/connect-claude Connect Claude to Libretto /build Build /build/first-page Build a page /build/layers-and-canvas Layers and canvas /build/site-components Site components /design-system Design system /design-system/tokens Colours, space and themes /design-system/components Components and variants /design-system/fonts Typography and fonts /motion Motion /motion/scenes Scenes and recipes /motion/image-sequences Image sequences /motion/reduced-motion Reduced motion /publish Publish /publish/languages Site languages /publish/versions Publish and versions /publish/members-and-forms Members and forms /publish/domains Domains /handover Hand a site to a client /glossary Glossary /agents Agents and API /agents/mcp MCP server /agents/cli CLI /agents/batches Batches /agents/errors Errors and findings /agents/operations Operations /search Search