Skip to content
Letterhead Letterhead Letterhead Help Center
Admin Tools

Create or update a contact

POST
/api/v3/contacts
curl --request POST \
--url https://api.tryletterhead.com/api/v3/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "api": true, "email": "[email protected]", "firstName": "Michael", "lastName": "Jones", "tags": [ "amazing-contact", "engaged" ], "customFields": { "favoriteColor": "blue", "lifetimeValue": 250 }, "source": "website-signup" }'

Creates a company-level contact, or updates the existing contact if one with the same email already exists (an upsert).

  • If no contact with the given email exists, a new contact is created and the response is 201 Created.
  • If a contact with that email already exists, its profile is updated with the fields in the request body and the response is 200 OK.
  • If a channel is supplied (see below), an already-existing contact’s profile is not overwritten — the contact is simply subscribed to that channel.

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).

{
  "email": "[email protected]",
  "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.
  • customFields is optional. Omit it to create a contact without setting any custom field values.

Channel subscription

Provide a channel (a channel slug) to subscribe the contact to that channel at creation time. If a company-level contact with the same email already exists, its existing profile is left untouched and the contact is simply subscribed to the channel. Omit channel to create the contact at the company level only.

Source

The optional source records where the contact came from — for example, the name of the integration that created it. It is set once on the contact and is not overwritten by later updates. A create without a source is recorded as a hand-entered manual contact.

Contacts without an email address (early access)

This is in early access: it is rolling out gradually and may not be available on your account yet. Where it isn’t, a request with endpoints and no email is refused with 422 (“An email address is required to create a contact.”).

Instead of email, send endpoints with exactly one entry: the phone number the contact is reached at. The contact is created with that number and identified by it from then on. Use the contactKey in the response to address it on the /api/v3/contacts/keyed/{contactKey} routes, since it has no email address to put in a path.

{
  "api": true,
  "endpoints": [{ "medium": "sms", "address": "+14155550171" }],
  "firstName": "Pat"
}
  • medium is sms, or whatsapp where WhatsApp is enabled for your account. Any other value is refused.
  • address must start with + and the country code. Spaces, dots, hyphens and brackets are allowed, and the number is stored in E.164 form. A value that isn’t a valid phone number is refused.
  • Send email or endpoints, not both. A request carrying both is refused with 422. For someone you have both for, create the contact with email and add the phone number afterwards.
  • More than one entry in endpoints is refused with 422.
  • If one of your contacts already holds that number, that contact is returned with 200 OK and the request’s other fields are not applied to it. Otherwise the contact is created and the response is 201 Created.
  • When two requests for the same number arrive at once, one of them can get 409 Conflict (“This address was just registered. Please try again.”). Retry it: the retry returns the new contact with 200 OK.
  • firstName, lastName, tags, customFields and source apply as they do with email.
  • With a channel, the contact is subscribed to that channel, with status if you send one. If the number already belongs to a contact who has no email address, that contact is subscribed and returned with 200 OK, unchanged otherwise. If the number belongs to a contact who has an email address, the request is refused with 422 (reason: endpointHeldByContactWithEmail) and nothing changes: add that person by their email address instead.
Media type application/json
object
api

Required. Set to true to authenticate with an API key.

boolean
email

The contact’s email address, matched on for the upsert. Required unless endpoints is sent (early access); send one or the other, not both.

string format: email
<= 255 characters
endpoints

Early access. Instead of email, the one phone number to create the contact with. See Contacts without an email address above.

Array<object>
>= 1 items <= 1 items
object
medium
required

sms, or whatsapp where WhatsApp is enabled for your account.

string
Allowed values: sms whatsapp
address
required

The phone number, starting with + and the country code. Spaces, dots, hyphens and brackets are allowed.

string
<= 32 characters
firstName

The contact’s first name.

string
lastName

The contact’s last name.

string
tags

Tags to apply to the contact.

Array<string>
customFields

Values for your company’s custom fields, keyed by field name. See below.

object
favoriteColor
string
lifetimeValue
integer
source

Origin label for where the contact came from. Recorded once and never overwritten. Defaults to manual when omitted. See below.

string
Example
{
"api": true,
"email": "[email protected]",
"firstName": "Michael",
"lastName": "Jones",
"tags": [
"amazing-contact",
"engaged"
],
"customFields": {
"favoriteColor": "blue",
"lifetimeValue": 250
},
"source": "website-signup"
}

Existing contact updated, or, for a request with endpoints (early access), the contact already holding that number, returned unchanged apart from any channel subscription. Same response shape as 201 below, and 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
{
"items": {
"email": "[email protected]",
"firstName": "Michael",
"lastName": "Jones"
},
"message": "Contact updated.",
"total": 1
}

New contact created

Media type application/json
object
items

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

object
email

The contact’s email address. Empty for a contact created from endpoints.

string
contactKey

The contact’s opaque 64-character hex key, used to address it on the /api/v3/contacts/keyed/{contactKey} routes.

string
anchor

What the contact was created with, email or a phone number from endpoints (endpoint, early access).

string
Allowed values: email endpoint
firstName
string
lastName
string
tags
Array<string>
customFields
object
subscriptions
Array<object>
object
createdAt
string
updatedAt
string
message
string
total
integer
Example
{
"items": {
"email": "[email protected]",
"firstName": "Michael",
"lastName": "Jones",
"tags": [
"amazing-contact",
"engaged"
],
"customFields": {
"favoriteColor": "blue",
"lifetimeValue": 250
},
"subscriptions": [],
"createdAt": "2026-08-30T15:01:21+00:00",
"updatedAt": "2026-08-30T15:01:21+00:00"
},
"message": "Contact created.",
"total": 1
}

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