Update a contact
const url = 'https://api.tryletterhead.com/api/v3/contacts/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"firstName":"Avery","lastName":"Chen","tags":["engaged-readers","the-north"],"customFields":{"favoriteColor":"blue","lifetimeValue":250}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.tryletterhead.com/api/v3/contacts/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "firstName": "Avery", "lastName": "Chen", "tags": [ "engaged-readers", "the-north" ], "customFields": { "favoriteColor": "blue", "lifetimeValue": 250 } }'Updates an existing company-level contact’s profile. The contact is identified by the {email} in the URL, so email is not part of the request body.
If you don’t yet know whether the contact exists, use Create or update a contact (POST /api/v3/contacts) instead — that endpoint upserts. This endpoint targets a contact that already exists.
Custom fields
Pass a customFields object to set values on the contact’s custom fields. Each key is the name of a custom field you’ve defined for your company, and the value is coerced to that field’s configured type (text, number, boolean, or date).
{
"customFields": {
"favoriteColor": "blue",
"lifetimeValue": 250
}
}
Notes:
- Each key must match a custom field that already exists for your company. Unknown field names are rejected.
- Keys beginning with
__lh.are reserved for Letterhead’s system-managed fields and cannot be set.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The contact’s email address, URL-encoded.
Request Body required
Section titled “Request Body required ”object
The contact’s first name.
The contact’s last name.
Tags to set on the contact.
Values for your company’s custom fields, keyed by field name. See below.
object
A channel slug. Scopes the tag-change trigger for tags this update adds; omit for a company-wide edit.
Example
{ "firstName": "Avery", "lastName": "Chen", "tags": [ "engaged-readers", "the-north" ], "customFields": { "favoriteColor": "blue", "lifetimeValue": 250 }}Responses
Section titled “ Responses ”Successful response
Still can’t find what you need? Contact support.