Create contact
Adds one contact, like Quick Add or Add new Contact.
POST https://cotlet.dev/api/v1/mautic/contacts
write
Creates a contact from the fields you pass. Fields you leave out stay empty. Mautic does not send the contact anything on creation, but a segment filter or campaign source that matches the new contact can start emails later. The reply holds the new contact_id. To undo, remove the contact in Mautic.
Parameters
| Name | Type | Description |
|---|---|---|
| email string required | string | Email address of the contact. |
| first_name string | string | First name. |
| last_name string | string | Last name. |
| company string | string | Company name. |
Request
curl -X POST https://cotlet.dev/api/v1/mautic/contacts \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"jane@example.com"}' result = client.call("mautic", "create_contact", {"email":"jane@example.com"}) const result = await cotlet.call('mautic', 'create_contact', {"email":"jane@example.com"}); cotlet call mautic create_contact --data '{"email":"jane@example.com"}' Example response
{
"contact_id": 2390,
"name": "Maria Silva",
"email": "maria@example.com",
"created": true
}