Create or update an audience member (deprecated)
const url = 'https://api.tryletterhead.com/api/v3/audience';const form = new FormData();form.append('CRMID', 'example');form.append('addressLine1', 'example');form.append('addressLine2', 'example');form.append('age', 'example');form.append('allowStatusOverride', 'example');form.append('api', 'example');form.append('attitudes', 'example');form.append('beliefs', 'example');form.append('birthday', 'example');form.append('businessWebsite', 'example');form.append('channelSubscriberStatus', 'example');form.append('channels[]', 'example');form.append('children', 'example');form.append('city', 'example');form.append('contentTopics', 'example');form.append('country', 'example');form.append('customBehavior1', 'example');form.append('customBehavior2', 'example');form.append('customBehavior3', 'example');form.append('customBehavior4', 'example');form.append('customID1', 'example');form.append('customID2', 'example');form.append('customID3', 'example');form.append('customID4', 'example');form.append('customWebProfile1', 'example');form.append('customWebProfile2', 'example');form.append('customWebProfile3', 'example');form.append('customWebProfile4', 'example');form.append('deliveryPreference', 'example');form.append('education', 'example');form.append('email', 'example');form.append('ethnicity', 'example');form.append('events', 'example');form.append('facebookProfileName', 'example');form.append('gender', 'example');form.append('githubProfileName', 'example');form.append('googleProfileName', 'example');form.append('homePhone', 'example');form.append('honorific', 'example');form.append('instagramProfileName', 'example');form.append('interests', 'example');form.append('jobCompanyOrOrganizationName', 'example');form.append('jobTitle', 'example');form.append('language', 'example');form.append('latitude', 'example');form.append('linkedInProfileName', 'example');form.append('longitude', 'example');form.append('maritalStatus', 'example');form.append('memberStatus', 'example');form.append('memberStatusChangedDate', 'example');form.append('mobilePhone', 'example');form.append('mostEngagedSources', 'example');form.append('mostEngagedTopics', 'example');form.append('name', 'example');form.append('notes', 'example');form.append('pets', 'example');form.append('politicalAffiliation', 'example');form.append('postalCode', 'example');form.append('pronouns', 'example');form.append('purchases', 'example');form.append('race', 'example');form.append('referralSource', 'example');form.append('referralStatus', 'example');form.append('referredByEmail', 'example');form.append('referredByFirstName', 'example');form.append('referredByLastName', 'example');form.append('region', 'example');form.append('religion', 'example');form.append('sexualOrientation', 'example');form.append('snapchatProfileName', 'example');form.append('stateProvince', 'example');form.append('suffix', 'example');form.append('surname', 'example');form.append('tikTokProfileName', 'example');form.append('timeZone', 'example');form.append('twitterProfileName', 'example');form.append('website', 'example');form.append('websiteProfileName', 'example');form.append('welcome', 'example');form.append('workPhone', 'example');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
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/audience \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form CRMID=example \ --form addressLine1=example \ --form addressLine2=example \ --form age=example \ --form allowStatusOverride=example \ --form api=example \ --form attitudes=example \ --form beliefs=example \ --form birthday=example \ --form businessWebsite=example \ --form channelSubscriberStatus=example \ --form 'channels[]=example' \ --form children=example \ --form city=example \ --form contentTopics=example \ --form country=example \ --form customBehavior1=example \ --form customBehavior2=example \ --form customBehavior3=example \ --form customBehavior4=example \ --form customID1=example \ --form customID2=example \ --form customID3=example \ --form customID4=example \ --form customWebProfile1=example \ --form customWebProfile2=example \ --form customWebProfile3=example \ --form customWebProfile4=example \ --form deliveryPreference=example \ --form education=example \ --form email=example \ --form ethnicity=example \ --form events=example \ --form facebookProfileName=example \ --form gender=example \ --form githubProfileName=example \ --form googleProfileName=example \ --form homePhone=example \ --form honorific=example \ --form instagramProfileName=example \ --form interests=example \ --form jobCompanyOrOrganizationName=example \ --form jobTitle=example \ --form language=example \ --form latitude=example \ --form linkedInProfileName=example \ --form longitude=example \ --form maritalStatus=example \ --form memberStatus=example \ --form memberStatusChangedDate=example \ --form mobilePhone=example \ --form mostEngagedSources=example \ --form mostEngagedTopics=example \ --form name=example \ --form notes=example \ --form pets=example \ --form politicalAffiliation=example \ --form postalCode=example \ --form pronouns=example \ --form purchases=example \ --form race=example \ --form referralSource=example \ --form referralStatus=example \ --form referredByEmail=example \ --form referredByFirstName=example \ --form referredByLastName=example \ --form region=example \ --form religion=example \ --form sexualOrientation=example \ --form snapchatProfileName=example \ --form stateProvince=example \ --form suffix=example \ --form surname=example \ --form tikTokProfileName=example \ --form timeZone=example \ --form twitterProfileName=example \ --form website=example \ --form websiteProfileName=example \ --form welcome=example \ --form workPhone=exampleThis endpoint is deprecated in favor of the company-wide Contacts endpoints, which do the same job with more flexibility and at a larger scale. It is documented here for accounts still calling it; use the Contacts endpoints for anything new.
Replaced by POST /api/v3/contacts, which does the same job across your whole company audience.
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”object
When set to true, Letterhead will accept whatever status you pass as part of channelSubscriberStatus. When false, Letterhead introduces a few layers of protection to prevent accidental status changes. For a sure thing, set this to true.
required | When set to true, this endpoint will accept authorization with your API Key.
required | The intended subscription status of your audience member. Letterhead will try to protect against accidental status changes, so this needs to be used in conjunction with allowStatusOverride.
required string[]| The slug or the unique identifier of a channel belonging to your organization.
required | The email address of your audience member.
When set to true, trigger a Welcome email when a new audience member is added. The “Welcome” automation must be configured in a given channel. Note that when true this will send regardless of the audience member’s subscription status.
Responses
Section titled “ Responses ”Successful response
Still can’t find what you need? Contact support.