Add people to a list
Add existing contacts by id, or anyone by email address.
POST
/api/v1/lists/:id/contactsScope
lists:writeAdds people to the list. Send existing contacts' ids in contactIds, email addresses in emails, or both. An email that isn't a contact yet becomes a new contact — so sending emails also needs contacts:write. People already in the list are counted in alreadyIn and left as they are.
Path parameters
Prop
Type
Body
Send contactIds, emails, or both.
Prop
Type
Example request
curl -X POST "https://api.pedibee.com/api/v1/lists/66f1c2a9e4b0a1b2c3d4e101/contacts" \
-H "Authorization: Bearer $PEDIBEE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contactIds": [
"66f1c2a9e4b0a1b2c3d4e5f6"
],
"emails": [
"sam@globex.com",
"not-an-email"
]
}'Response
What happened. Invalid addresses are reported, not added; the rest still go in.
{
"added": 2,
"alreadyIn": 0,
"createdContacts": 1,
"invalid": [
"not-an-email"
]
}Errors
Every error is { "error": "…" } with a message you can show. See Errors and limits.
| Status | When |
|---|---|
400 | Neither contactIds nor emails was sent, an item holds more than one address, or there are more than 1,000 emails. |
403 | The key doesn't have lists:write, or it sent emails without contacts:write. |
404 | The list, or one of contactIds, isn't in your workspace. |
401 | The API key is missing, invalid, revoked or expired. |
429 | Too many requests. Wait for the seconds in Retry-After. |
