Skip to content

Create an article

POST/admin/v1/stores/{store_id}/articles
  • Idempotency-Key supported

Create an article; its HTML is sanitized. A future published_at schedules it.

Path parameters

  • store_idstringrequired

    The store's ID, like store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.

Headers

  • Idempotency-Keystring

    Send the same key to retry safely: the first answer is replayed for 24 hours.

  • shop-api-versionYYYY-MM

    The version to answer in. Without it, your app’s pinned version, else the newest.

Body

  • blog_idstringrequired

    TypeID with the blog prefix.

  • titlestringrequired
  • publishedbooleanrequired

    Visible on storefronts from published_at (now when absent).

  • handlestring

    Derived from the title when empty on create; kept when empty on update. A live article's new handle redirects its old path.

  • authorstring
  • body_htmlstring

    HTML; sanitized on save.

  • excerptstring
  • image_idstring · or null

    A ready image of the file library.

Returns

201 Created.

Errors

  • 403forbiddenMissing permission.
  • 409Handle taken in the blog (handle_taken), or the article limit reached.
  • 422validation_failedValidation failed, an unknown blog or an image that isn't one of the store's.