Tag contacts by email
POST
/api/v3/contacts/tags/{tag}/members
const url = 'https://api.tryletterhead.com/api/v3/contacts/tags/example/members';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},};
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/tags/example/members \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \Add a tag to an explicit list of contacts by email address — for example, everyone who opened or clicked a specific newsletter.
Path parameters
tag— the tag’s name (not its numeric id).
Body
emails(required) — a list of 1 to 10,000 email addresses to tag.channel(optional) — a channel slug to scope the tag-added event to, when the cohort came from one newsletter’s activity.
Available to organizations with company-level audience sending enabled.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” tag
required
string
The tag’s name (letters, numbers, hyphens, underscores).
Request Body required
Section titled “Request Body required ” Media type application/json
object
api
required
Required. Set to true to authenticate with an API key.
boolean
emails
required
Array<string>
channel
string
Example
{ "api": true, "emails": [ ]}Responses
Section titled “ Responses ”Successful response
Still can’t find what you need? Contact support.