Update a contact by contact key
const url = 'https://api.tryletterhead.com/api/v3/contacts/keyed/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"firstName":"example","lastName":"example","tags":["example"],"customFields":{},"channel":"example"}'};
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/keyed/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "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.
This is a company-level (v3) write. Authenticate with a company API key as a Bearer token.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The contact’s opaque 64-character hex key (from a prior response’s contactKey field).
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 PUT /api/v3/contacts/{email} for the full rules.
object
A channel slug. Scopes the tag-change trigger for tags this update adds; omit for a company-wide edit.
Example generated
{ "firstName": "example", "lastName": "example", "tags": [ "example" ], "customFields": {}, "channel": "example"}Responses
Section titled “ Responses ”200 OK. Same shape as GET /api/v3/contacts/{email}.
object
The updated contact. Full field list under GET /api/v3/contacts/{email}.
object
Example generated
{ "items": {}, "message": "example", "total": 1}Still can’t find what you need? Contact support.