Create or update contacts in bulk
Create or update contacts in bulk with the Mailly email API for AI agents: POST /contacts/batch. Parameters, request body, responses and code samples.
POST
body is an array of contacts or {contacts: [...]}, 1-1000 items; returns a result per item, and 207 overall if any fail.
bearerAuthheader
AuthorizationBearer <token>Mailly API key(Authorization: Bearer )
application/json- body
contacts?array<>[key: string]?unknownAll succeeded
application/json- response
success*booleanreceived*numbersucceeded*numberfailed*numberresults*array<>[key: string]?unknowncurl -X POST 'https://api.mailly.site/contacts/batch' \ -H 'Content-Type: application/json' \ -d '{ "property1": null, "property2": null}'{ "success": true, "received": 0, "succeeded": 0, "failed": 0, "results": [ { "property1": null, "property2": null } ], "property1": null, "property2": null}Create or update a contact (upsert) PUT
Create or update a contact (upsert) with the Mailly email API for AI agents: PUT /contacts/{externalContactId}. Parameters, request body, responses and code samples.
Import contacts from CSV POST
Import contacts from CSV with the Mailly email API for AI agents: POST /contacts/import. Parameters, request body, responses and code samples.