Get a contact by contact key
const url = 'https://api.tryletterhead.com/api/v3/contacts/keyed/example?api=true';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.tryletterhead.com/api/v3/contacts/keyed/example?api=true' \ --header 'Authorization: Bearer <token>'Same as Get a contact (GET /api/v3/contacts/{email}), with the contact addressed by its opaque contactKey instead of its email address. contactKey is the contact’s identifier on every v3 response (the contactKey field you get back from Browse contacts or Search contacts) — this is the only way to address a contact that has no email address, such as a phone-only contact.
This is a company-level (v3) read. Authenticate with a company API key as a Bearer token. Accepts the same optional channel query parameter as Get a contact, including its 404/403 cases.
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).
Query Parameters
Section titled “Query Parameters ”Required. Set to true.
Narrow the response to a single newsletter, by channel slug. Returns 404 if the contact has no subscription on that channel, if the slug doesn’t match a channel in your company, or 403 if it names another company’s channel. Omit for the company-wide view.
Responses
Section titled “ Responses ”200 OK. Same shape as GET /api/v3/contacts/{email}.
object
The contact. Full field list under GET /api/v3/contacts/{email}.
object
Example generated
{ "items": {}, "message": "example", "total": 1}Either the contact has no subscription on the channel named by channel, or the slug doesn’t match a channel in your company.
object
object
Example generated
{ "items": [ {} ], "message": "example", "total": 1}Still can’t find what you need? Contact support.