Create or update a contact
Creates a marketing contact identified by email, phone_number and/or a web push subscription — no customer_id required, so it also fits people who are not customers of the shop. Runs on the exact same engine as the UI contact import: when a contact already matches one of the identifiers, only the provided fields are updated (omitted fields are never reset), and if the matched contact is a registered customer its shop-synced identity is left untouched (only consent, tracking and push are applied). Deduplication follows the import priority — email first, then phone_number, then push; meta.matched_by reports the identifier that won. Consent values carry an explicit act of the contact, like an import file: an opt-in can lift an unsubscribe and unsubscribed sets one — only send a consent field when the contact actually expressed that choice. The audit history records source API.
Parameters
Header Parameters
[Authentication] Required API key, in the form {prefix}.{secret}.
"a1b2c3d4.xK9pR2mVn6QwErTyUiOpAsDfGhJkLzXcVbNmQwErTyU""^[a-zA-Z0-9]{8}\\.[A-Za-z0-9_-]+$"Request Body
Responses
A contact already matched one of the identifiers: it has been updated (operation: updated) or left as is (operation: unchanged).
Create or update a contact Creates a marketing contact identified by email, phone_number and/or a web push subscription — no customer_id required, so it also fits people who are not customers of the shop. Runs on the exact same engine as the UI contact import: when a contact already matches one of the identifiers, only the provided fields are updated (omitted fields are never reset), and if the matched contact is a registered customer its shop-synced identity is left untouched (only consent, tracking and push are applied). Deduplication follows the import priority — email first, then phone_number, then push; meta.matched_by reports the identifier that won. Consent values carry an explicit act of the contact, like an import file: an opt-in can lift an unsubscribe and unsubscribed sets one — only send a consent field when the contact actually expressed that choice. The audit history records source API. POST /v1/contacts createContact Contacts spm-api-key [Authentication] Required API key, in the form {prefix}.{secret}. A contact already matched one of the identifiers: it has been updated (operation: updated) or left as is (operation: unchanged). Contact successfully created. Client error - Invalid request or authentication issues Server error - Internal processing failure