Skip to main content
DELETE
Delete Metafield

Delete Metafield

Permanently deletes a metafield owned by your app. Apps cannot delete metafields written by other apps or by merchants. The action cannot be undone.

Request

Required scope

write_metafields

Path parameters

id
string
required
The metafield’s UUID (the id field from list/create responses).

Response

Cache invalidation

Deletion automatically expires the storefront caches for the owning resource. The next render will not include the deleted field — Aqua/Liquid access ({{ owner.metafields.namespace.key }}) returns an empty drop, no error thrown.

Notes

  • Themes that read this metafield will see an empty drop on the next render. {{ … }} renders empty string; {% if … %} is falsy. No exceptions thrown.
  • If the merchant or another app also writes a metafield with the same (ownerType, namespace, key, ownerId), that one is not affected — rows are scoped per appId.

Error codes

CodeDescription
UNAUTHORIZEDInvalid or missing access token
FORBIDDENApp doesn’t have write_metafields scope
NOT_FOUNDMetafield does not exist, or wasn’t written by your app