Last active
August 31, 2022 18:04
-
-
Save birinder-lobana/77e0a77c6943e8bf09c4fe5108281f78 to your computer and use it in GitHub Desktop.
Create an Openscreen Contact with a project-level SMS consent.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Obtain your projectId from the Openscreen Dashboard and paste below | |
const projectId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; | |
const create_contact_by_project_id = await os.project(projectId).contacts().create({ | |
firstName: "Brian", | |
lastName: "Smith", | |
emailAddress: "bsmith@test.com", | |
cellPhone: "+14162121212", | |
mailingAddress: { | |
address: "123 Street", | |
city: "Toronto", | |
provinceOrState: "ON", | |
country: "Canada", | |
postalOrZip: "A1B2C3" | |
}, | |
customAttributes: { | |
campaign: "Toronto June listings" | |
}, | |
consent: [{ | |
url: ["https://sidewalkqr.com/terms-and-conditions", "abc.com/terms-and-conditions"], | |
consentedAt: "2021-06-20 08:03:00.0", "consented": true}], | |
consentType: "SMS", | |
projectId: projectId, | |
}] | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment