Skip to main content
PUT
/
metafield-definitions
/
:id
Update Metafield Definition
curl --request PUT \
  --url https://api.launchmystore.io/metafield-definitions/:id \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "validations": {},
  "pinned": true
}
'

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.

Update Metafield Definition

Admin API only — requires a merchant JWT. Not exposed to OAuth apps.
Updates label, description, validations, or pinned state of an existing definition. namespace, key, ownerType, and type are immutable — delete and recreate if you need to change them.

Request

curl -X PUT "https://api.launchmystore.io/metafield-definitions/<id>" \
  -H "Authorization: Bearer <merchant-jwt>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Warranty period (years)",
    "validations": { "min": 0, "max": 50 },
    "pinned": true
  }'

Path parameters

id
string
required
The definition UUID.

Body parameters (all optional)

name
string
Human label.
description
string
Tooltip / helper text.
validations
object
Replace the entire validations object. Existing values that fail the new rules are not retroactively rejected — they continue to exist but future writes must comply.
pinned
boolean
Pin / unpin from the resource detail page.

Response

Same shape as Get definition.

Error codes

CodeDescription
UNAUTHORIZEDInvalid or missing JWT
FORBIDDENWrong store / insufficient role
NOT_FOUNDDefinition does not exist
VALIDATION_ERRORValidation rule incompatible with the definition’s type