Contacts

Updates an existing contact record

patch/contacts/{id}

Request

  • Base URL
    https://api.crevio.co/v1
  • Auth
    API key in header Authorization

Path parameters

id, string required

The resource's ID, as returned in its id field

Request body

ContactRequest required
email, string

Required on create. Unique among the account's contacts.

name, string nullable

Full name, split into first_name and last_name. Optional: without it the contact has no name, and merge tags such as {{ customer.first_name }} use their default.

first_name, string nullable
last_name, string nullable
phone_number, string nullable

With its country code, e.g. +1 415 555 0123. Stored in international E.164 form.

company, string nullable
notes, string nullable
subscribed, boolean

false adds the email to the suppression list as unsubscribed. true is refused while the address is suppressed; remove it from the suppression list only if the person asked.

tag_ids, string[]

Replaces the contact's tags. An empty list leaves them as they are: remove one with DELETE /contacts/{contact_id}/tags/{id}. An id that isn't one of your tags is refused with 422.

metadata, object

Set of key-value pairs you can attach to the object — store your own system's IDs or grouping labels. Keys max 40 chars (up to 50 keys), values stored as strings max 500 chars. On update, keys merge individually; set a key to null or "" to remove it. Echoed back on reads and in webhook payloads.

Response

Contact updated

Contact required
id, string required
object, string required
email, string required
name, string nullable required
first_name, string nullable required
last_name, string nullable required
phone_number, string nullable required
company, string nullable required
lifecycle, 'lead' | 'customer' required
became_customer_at, string date-time nullable required
notes, string nullable required
confirmed_at, string date-time nullable required
created_at, string date-time required
updated_at, string date-time required
deleted_at, string date-time nullable required
purge_at, string nullable required
subscribed, boolean
anonymized, boolean required
metadata, object required
orders_count, integer required

Live orders that went through: refunded ones count, while pending, failed and test-mode orders don't.

total_spend, integer required

Lifetime spend in the smallest unit of the account's currency, net of refunds. Test-mode orders and disputed charges are left out.

tags, unknown[] required

Changes

    • warning

      the optional response header Deprecation removed for the status 400

    • warning

      the optional response header Link removed for the status 400

    • warning

      the optional response header RateLimit removed for the status 400

    10 more changes in this revision