Skip to content

Commit

Permalink
Update docs for adding contacts programatically
Browse files Browse the repository at this point in the history
  • Loading branch information
KMKoushik committed Aug 11, 2024
1 parent a554803 commit 6624160
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ We are currently in beta and trying to rollout to public slowly. If you're inter
- [x] Transactional Mails
- [x] Rest API
- [x] Dashboard (Delivered, opened, clicked, bounced)
- [ ] Marketing email
- [x] Marketing email
- [ ] Webhook support
- [ ] SMTP support
- [ ] BYO AWS credentials
Expand Down
29 changes: 29 additions & 0 deletions apps/docs/get-started/nodejs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,32 @@ icon: node-js
```
</Step>
</Steps>
## Adding contacts programatically
<Steps>
<Step title="Get the contact book id">
Get the contact book id from the [Unsend dashboard](https://app.unsend.dev/contacts/). Copy the contact book id
</Step>
<Step title="Add contacts">
```javascript
unsend.contacts
.create("clzeydgeygff", {
email: "hey@koushik.dev",
firstName: "Koushik",
lastName: "KM",
})
```
</Step>
<Step title="Update contact">
```javascript
unsend.contacts.update("clzeydgeygff", contactId, {
firstName: "Koushik",
lastName: "KM",
});
```
</Step>
</Steps>

0 comments on commit 6624160

Please sign in to comment.