Skip to content
Letterhead Letterhead Letterhead Help Center
Admin Tools

Update a contact by contact key

PUT
/api/v3/contacts/keyed/{contactKey}
curl --request PUT \
--url https://api.tryletterhead.com/api/v3/contacts/keyed/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": "[email protected]", "firstName": "example", "lastName": "example", "tags": [ "example" ], "customFields": {}, "channel": "example" }'

Same as Update a contact (PUT /api/v3/contacts/{email}), with the contact addressed by its contactKey instead of its email address — the address to use for a contact with no email, such as a phone-only contact. Contacts without an email address are in early access and may not be available on your account yet.

Early access: on accounts where it is available, sending email for a contact created from a phone number (its anchor is endpoint) gives that person the address. Everything the contact holds is carried onto a new contact keyed on the address, and the response returns it under a new contactKey; use that key from then on. A later write to the old key returns 409 with the new key in data, and a read of the old key returns the new contact. On accounts where it isn’t available, the request is refused with 422 (reason: emailOnPhoneContactUnavailable) and nothing changes.

  • An address another contact already holds is refused with 409.
  • A contact created with an email address, including one that was given its address this way, keeps it: sending email for one is refused with 422.
  • An empty email, or the address the contact already holds, is ignored, and so is any email where contacts without an email address aren’t enabled for your account.
  • A request that arrives while another change to the company’s contacts is running, or while this contact is changing, can be refused with 409. Nothing is lost; send it again.

This is a company-level (v3) write. Authenticate with a company API key as a Bearer token.

contactKey
required
string

The contact’s opaque 64-character hex key (from a prior response’s contactKey field).

Media type application/json
object
email

Early access. Gives a contact created from a phone number an email address, returning it under a new contactKey. See above.

string format: email
<= 255 characters
firstName

The contact’s first name.

string
lastName

The contact’s last name.

string
tags

Tags to set on the contact.

Array<string>
customFields

Values for your company’s custom fields, keyed by field name. See PUT /api/v3/contacts/{email} for the full rules.

object
channel

A channel slug. Scopes the tag-change trigger for tags this update adds; omit for a company-wide edit.

string
Example generated
{
"email": "[email protected]",
"firstName": "example",
"lastName": "example",
"tags": [
"example"
],
"customFields": {},
"channel": "example"
}

200 OK. Same shape as GET /api/v3/contacts/{email}.

Media type application/json
object
items

The updated contact. Full field list under GET /api/v3/contacts/{email}.

object
message
string
total
integer
Example generated
{
"items": {},
"message": "example",
"total": 1
}

Still can’t find what you need? Contact support.