Create Metaobject (Shopify)

Creates one metaobject entry. type and a non-empty fields array are required.

Requires the write_metaobjects scope.

fields[].value is sent to Shopify unchanged. A reference field must be a GID (gid://shopify/Product/... or gid://shopify/Metaobject/...). A numeric id is not converted. A list value is JSON text. Quotes and newlines are ordinary JSON: "Line 1 with \"quotes\"\nLine 2" is the sentence Line 1 with "quotes" plus a line break.

status is optional and must be ACTIVE or DRAFT. Shopify rejects it with 400 Capability is not enabled: publishable when the definition was created without the publishable capability. Omit status in that case. The response then has status: null.

If the handle already exists for that type, Shopify rejects the create. Use Upsert a metaobject when you want create-or-update by type and handle.

An invalid body answers 422 with ecartapiError: true.

See Shopify metafields and metaobjects.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Metaobject entry. type and fields are required. Each fields[].value is sent to Shopify unchanged.

metaobject
object
required
Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json