Skip to content

Create metaobject

POST/admin/v1/stores/{store_id}/metaobjects
  • content:write
  • Idempotency-Key supported

Add an entry. Every value is checked against its field.

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

  • typestringrequired
  • handlestring · or null

    Derived from the display field when left out.

  • statusenum

    Default draft.

    • draft
    • active
  • fieldsobject

    Values by field key.

  • translationsobject

    Text fields in the store's other languages: {"ar": {"title": "…"}}.

Returns

201 Created.

Errors

  • 404not_foundNo such content type.
  • 409The handle is taken (handle_taken).
  • 422validation_failedA value does not fit its field (fields.{key}).