Managing Contacts
creating a new contact
sh
curl - X POST \
-H "Authorization: Bearer ${YOUR_API_KEY}" \
https://api.seamailer.app/v1.0/connect/v1.0/contacts \
-H "Content-Type: application/json" \
-d '{
"contacts": [
{
"email": "user@email.com",
"firstName": "string",
"lastName": "string",
"phoneCountry": "+234",
"phoneNumber": "9054787654"
}
]
}'
js
import { SeaMailerClient } from "seamailer";
const SeaMailer = new SeaMailerClient(`api key`);
SeaMailer.createContact({
contacts: [
{
email: "user@email.com",
firstName: "string",
lastName: "string",
phoneCountry: "+234",
phoneNumber: "9054787654",
},
],
});
Update contact
sh
curl - X POST \
-H "Authorization: Bearer ${YOUR_API_KEY}" \
https://api.seamailer.app/v1.0/connect/v1.0/contacts/[contact-id] \
-H "Content-Type: application/json" \
-d '{
"email": "user@email.com",
"firstName": "string",
"lastName": "string",
"phoneCountry": "+234",
"phoneNumber": "9054787654"
}'
js
import { SeaMailerClient } from "seamailer";
const SeaMailer = new SeaMailerClient(`api key`);
SeaMailer.updateContact([contact_id], {
email: "user@email.com",
firstName: "string",
lastName: "string",
phoneCountry: "+234",
phoneNumber: "9054787654",
});