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

Parameters: create_contact
NameTypeDescription
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
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"}'
Python
result = client.call("mautic", "create_contact", {"email":"jane@example.com"})
Node.js
const result = await cotlet.call('mautic', 'create_contact', {"email":"jane@example.com"});
CLI
cotlet call mautic create_contact --data '{"email":"jane@example.com"}'

Example response

JSON

{
  "contact_id": 2390,
  "name": "Maria Silva",
  "email": "maria@example.com",
  "created": true
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.