Skip to main content

SiteEventContact

A POST /contacts/sync row in snake_case, with the same rules and with triggers on. The moment of the values is the event's occurred_at.

ref objectrequired

Who the person is on the site — the link that finds the same contact even after a change of number.

kindstringrequired

wp_user: a WordPress user. wc_customer: a WooCommerce customer. wc_guest: a purchase without an account. lead: someone known only by a form or a cart.

Possible values: [wp_user, wc_customer, wc_guest, lead]

idstringrequired

The person's id on the site. Someone without an account (wc_guest, lead) goes by the sha256 of their e-mail.

Possible values: non-empty and <= 191 characters

Example: 42
phonestringnullable

Possible values: <= 40 characters

countrystringnullable

Possible values: >= 2 characters and <= 2 characters

first_namestringnullable

Possible values: <= 80 characters

last_namestringnullable

Possible values: <= 80 characters

emailstringnullable

Possible values: <= 254 characters

localestringnullable

Possible values: Value must match regular expression ^[a-z]{2}(-[A-Z]{2})?$

attributes object
property name*any
tagsstring[]

Possible values: <= 20

remove_tagsstring[]

Possible values: <= 20

consent object

The consent the person gave or withdrew on the site. An opt-out always applies; an opt-in only moves a contact from unknown to opted_in, never over an opt-out or a suppression.

oneOf
statusstringrequired

Possible values: [opted_in]

evidencestringrequired

What the person agreed to and where: the ticked box's text, the order, the site.

Possible values: >= 3 characters and <= 500 characters

atstring<date-time>

When the person agreed.

SiteEventContact
{
"ref": {
"kind": "wp_user",
"id": "42"
},
"phone": "string",
"country": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"locale": "string",
"attributes": {},
"tags": [
"string"
],
"remove_tags": [
"string"
],
"consent": {
"status": "opted_in",
"evidence": "string",
"at": "2024-07-29T15:51:28.071Z"
}
}