Skip to main content
DELETE
/
api
/
v1
/
metafields
/
:id.json
Delete Metafield
curl --request DELETE \
  --url https://api.launchmystore.io/api/v1/metafields/:id.json \
  --header 'Authorization: Bearer <token>'

Documentation Index

Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt

Use this file to discover all available pages before exploring further.

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

curl -X DELETE "https://api.launchmystore.io/api/v1/metafields/<metafieldId>.json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Required scope

write_metafields

Path parameters

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

Response

{
  "status": 200,
  "state": "success",
  "message": "Metafield deleted successfully"
}

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