Look up a contact by an address they hold
const url = 'https://api.tryletterhead.com/api/v3/contacts/lookup';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"api":true,"medium":"sms","address":"+15555550100"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tryletterhead.com/api/v3/contacts/lookup \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "api": true, "medium": "sms", "address": "+15555550100" }'Resolves a company-level contact from an address they hold on another notification medium β currently SMS phone numbers only. Deliberately a POST rather than a GET /contacts/{address}-style lookup: a phone number in a URL would land in access logs, proxy logs, and browser history.
The address is normalized the same way it was when the contact registered it, so you can send whatever format you hold β no need to pre-format it yourself.
This is a company-level (v3) read. Authenticate with a company API key as a Bearer token.
Authorizations
Section titled βAuthorizations βRequest Body required
Section titled βRequest Body required βobject
Required. Set to true to authenticate with an API key.
The notification medium the address belongs to. Currently only sms is supported.
The address to search for, in whatever format you hold it.
Example
{ "api": true, "medium": "sms", "address": "+15555550100"}Responses
Section titled β Responses β200 OK. Returns the matching contact β same shape as GET /api/v3/contacts/{email}.
object
The matching contact. Full field list under GET /api/v3/contacts/{email}.
object
Example
{ "items": { "firstName": "Avery", "lastName": "Chen" }, "message": "Contact retrieved.", "total": 1}Still can’t find what you need? Contact support.