Anchor to section titled 'undefined'

publicationCreate
mutation

Requires write_publications access scope. Also: The user must have a permission to create and edit catalogs.

Creates a publication.


The input fields to use when creating the publication.


Was this section helpful?

The publication that's been created.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation publicationCreate($input: PublicationCreateInput!) {
  publicationCreate(input: $input) {
    publication {
      # Publication fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "input": {
    "autoPublish": true,
    "catalogId": "gid://shopify/<objectName>/10079785100",
    "defaultState": "ALL_PRODUCTS"
  }
}
input PublicationCreateInput {
  autoPublish: Boolean
  catalogId: ID
  defaultState: PublicationCreateInputPublicationDefaultState
}