1. Overview
Mautic is an open-source marketing automation platform. It helps teams manage contacts, companies, segments, campaigns, and email assets from a single system.
With the GoInsight Mautic node, you can integrate those capabilities into workflows. Typical tasks include:
- Contacts: Create, look up, update, delete, and list contacts; adjust engagement points; send a one-off email to a contact.
- Companies and segments: Maintain organization records and dynamic or static lists; add or remove contact memberships.
- Campaigns: Add or remove contacts from automation campaigns.
- Emails: Create and manage email definitions, then send them to a contact or an entire segment.
- Compliance: Add or remove contacts from the do-not-contact list when consent or channel preferences change.
2. Prerequisites
Before using this node, you need a running Mautic instance (self-hosted or managed) and API access. Generate API credentials (OAuth2 client or Basic API user, depending on your Mautic version and configuration) with scopes that cover contacts, companies, segments, campaigns, emails, and channel preferences you plan to automate.
You should know the base URL of your Mautic installation and be able to reach it from the environment where GoInsight executes workflows.
3. Credentials
For a detailed guide on how to obtain and configure your credentials, please refer to our official documentation: Credential Configuration Guide.
4. Supported Operations
The Mautic node is organized around contacts, campaigns, companies, segments, emails, and do-not-contact state. Use the summary table to jump to each operation.
Summary
| Resource | Operation | Description |
|---|---|---|
| Contact | Create a Contact | Create or update a contact in Mautic. |
| Contact | Get a Contact | Get a contact from Mautic. |
| Contact | Update a Contact | Update an existing contact in Mautic. |
| Contact | Delete a Contact | WARNING: This operation permanently deletes the contact and cannot be undone. |
| Contact | Find Contacts | Find contacts in Mautic. |
| Contact | Add Contact Points | Add points to a Mautic contact. |
| Contact | Subtract Contact Points | Subtract points from a Mautic contact. |
| Contact | Send an Email to a Contact | Send a predefined email to a specific contact in Mautic. |
| Campaign | Add Contact to a Campaign | Add a contact to a specific campaign in Mautic. |
| Campaign | Remove Contact from a Campaign | Removes a specific contact from a Mautic campaign using the REST API. |
| Company | Create a Company | Create a new company in Mautic. |
| Company | Get a Company | Get details of a specific company by its ID. |
| Company | Update a Company | Update an existing company in Mautic. |
| Company | Delete a Company | WARNING: This operation permanently deletes a company from Mautic and cannot be undone. |
| Company | Find Companies | Search for companies in Mautic. |
| Company | Add Contact to a Company | Associate a contact with a company in Mautic. |
| Company | Remove Contact from a Company | Remove the association between a contact and a company in Mautic. |
| Segment | Create a Segment | Create a new segment (contact group) in Mautic. |
| Segment | Get a Segment | Retrieve detailed segment (list) information from Mautic. |
| Segment | Update a Segment | Update an existing segment in Mautic. |
| Segment | Delete a Segment | WARNING: This operation will PERMANENTLY delete a segment (list) from Mautic and CANNOT be undone. |
| Segment | Find Segments | Find segments (contact lists) in Mautic. |
| Segment | Add Contact to a Segment | Add a contact to a Mautic segment. |
| Segment | Remove Contact from a Segment | Remove a contact from a specific Mautic segment. |
| Segment | Send an Email to a Segment | Send a segment email (list email) to all contacts in its associated segments immediately. |
| Create an Email | Create a new email in Mautic. | |
| Get an Email | Retrieve a specific email from Mautic by ID. | |
| Update an Email | Update an existing email in Mautic. | |
| Delete an Email | Delete an email template or campaign from Mautic permanently. | |
| Find Emails | Find emails in Mautic. | |
| Do Not Contact | Add to Do Not Contact List | Add a contact to the Do Not Contact (DNC) list in Mautic. |
| Do Not Contact | Remove from Do Not Contact List | Remove a contact from Mautic's Do Not Contact (DNC) list for a specific channel. |
Operation Details
Create a Contact
Create or update a contact in Mautic. Use this to add a new person; for updating, Mautic handles deduplication automatically (upsert behavior) based on email.
Input Parameters:
- Email: Contact's email address. Used as the primary identifier for upsert logic. Example: "john.doe@example.com"
Options:
- Firstname: Contact first name. Example: "John"
- Lastname: Contact last name. Example: "Doe"
- Phone: Primary phone number. Example: "+1-555-0100"
- Company: Associated company name. Example: "Acme Corp"
- Position: Job title/position. Example: "Developer"
- Owner: Mautic user ID to assign as owner (sales rep or account manager). Default: 0 (unassigned). Use a valid user ID from the Mautic Admin Users page (the user profile URL contains the ID). Example: 1
- AdditionalFields: Optional extended fields. Supported keys: ipAddress (string): The IP address to associate with the contact; overwriteWithBlank (boolean): WARNING - If set to true, any empty fields provided in this request will PERMANENTLY DELETE existing values for those fields in Mautic. Use with caution! If false (default), empty fields are ignored and existing values are preserved. Example: {"ipAddress": "192.168.1.1", "overwriteWithBlank": false}
Output:
- Contact (object): The created or updated contact object. Note: Field values are nested within 'fields.core.[field_name].value'. Core fields structure: id (int): Contact unique identifier; dateAdded (string): Creation timestamp (ISO 8601); dateModified (string): Last update timestamp; owner (object): Assigned owner info (id, firstName, lastName); fields.core (object): All contact fields including email, firstname, lastname, phone, company, position. Example access: Contact.fields.core.email.value
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 201 for created, 200 for updated, 400 for bad request). Default 0 means no HTTP request was made.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors reflected in ErrorMessage), 500 = system error (network failure, timeout, code crash), -1 = parameter validation error (request not sent).
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully. Contains specific error details when StatusCode is non-200 or when the upstream API returns a business error.
Get a Contact
Get a contact from Mautic. Use this to retrieve detailed information about a specific contact by ID; for searching contacts use Find Contacts.
Input Parameters:
- ContactId: The unique numeric identifier of the contact in Mautic. You can obtain this ID from the Find Contacts or Find Contacts actions. Example: "123"
Output:
- Contact (object): Detailed contact profile object. Profile data is categorized within the 'fields' property into: 'core' (basic info like email, firstname), 'social' (twitter, linkedin), 'professional' (position, industry), and 'personal' (address, mobile). Each field is an object containing a 'value' key. Example: Contact.fields.core.email.value
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200 for success, 404 for not found). Default 0 means no HTTP request was made.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors reflected in ErrorMessage), 500 = system error (network failure, timeout, code crash), -1 = parameter validation error (request not sent).
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully. Contains specific error details when StatusCode is non-200 or when the upstream API returns a business error.
Update a Contact
Update an existing contact in Mautic. Use this to modify contact details; for creating new ones use 'Create a Contact'.
Input Parameters:
- ContactId: The ID of the contact to update. Obtain this ID by calling the Find Contacts action or from the Mautic URL when viewing a contact. Example: "123"
Options:
- Email: Contact email address. Used as a primary identifier. Example: "john.doe@example.com"
- Firstname: Contact's first name. Example: "John"
- Lastname: Contact's last name. Example: "Doe"
- Phone: Primary phone number. Example: "+1-555-0100"
- Company: Associated company name. Example: "Acme Corp"
- Owner: The Mautic user ID of the person responsible for this contact. Use 0 for unassigned, or set a valid user ID from the Mautic Admin Users page (URL shows the user ID). Example: 1
- CreateIfNotFound: Whether to create a new contact if the ID is not found. If true, uses PUT; if false, uses PATCH. Note: If set to false and the contact ID does not exist, the operation will fail with a 404 error.
- AdditionalFields: Extended contact fields and metadata (mobile, website, social handles, address, tags, and so on). Set overwriteWithBlank to true only when you intentionally need to clear values. Example: {"mobile": "+123456789", "tags": "lead,marketing"}
Output:
- Contact (object): The updated contact object. Top-level fields include: id (Unique ID), isPublished (Boolean), dateAdded (ISO8601), dateModified (ISO8601), owner (Owner User ID), points (Score), and lastActive (ISO8601). Detailed field values are nested under 'fields' and organized by group: fields.core (e.g., firstname, email), fields.professional (e.g., position), fields.address (e.g., city, country), and fields.social (e.g., twitter). Access values via fields.
. .value. - OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200 for updated, 201 for created, 404 for not found).
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors), 500 = system error, -1 = parameter validation error.
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully.
Delete a Contact
WARNING: This operation permanently deletes the contact and cannot be undone. All contact data including custom fields, tags, and activity history will be lost.
Input Parameters:
- ContactId: The unique contact ID to delete. This ID can be obtained from Find Contacts or Find Contacts actions. Example: "123"
Output:
- Contact (object): Contact object containing information before deletion. Key fields: id (number): Contact ID; dateAdded (string): Creation timestamp (ISO 8601); fields (object): Custom contact fields (key-value pairs); points (number): Contact score; tags (array): List of tag objects; owner (object): Owner information with id and name; lastActive (string): Last activity timestamp.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200 for success, 404 for not found). Default 0 means no HTTP request was made.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors reflected in ErrorMessage), 500 = system error (network failure, timeout, code crash), -1 = parameter validation error (request not sent).
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully. Contains specific error details when StatusCode is non-200 or when the upstream API returns a business error.
Find Contacts
Find contacts in Mautic. Use this to search and list contacts with filters; for loading one contact by ID use Get a Contact.
Options:
- Search: Search filter string. Supports multiple syntaxes: - Field Search: fieldname:value (e.g., email:john@example.com) - Full-Text: Direct keyword (e.g., John Doe) - Wildcards: Use * (e.g., email:*@example.com) - Numeric: Use >, <, >=, <= (e.g., points:>100) - Logic: Use OR (e.g., email:a@b.com OR lastname:Doe) Common fields: email, firstname, lastname, company, points, city, state, country. Example: "email:john@example.com"
- Start: Starting index for pagination. Example: 0
- Limit: Maximum number of contacts to return (1-500). Example: 30
- OrderBy: Sort field in underscore format (e.g., date_identified). Format: field:direction (asc/desc). Example: date_identified:desc
- OrderByDir: Sort direction. Options: 'asc' (ascending), 'desc' (descending). Example: "desc"
- PublishedOnly: Filter by publication status. true: only published contacts; false: all contacts. Example: true
- Minimal: Enable lean mode to return only core fields (email, name, points). Excludes tags and IP details. Best for bulk exports. Example: true
Output:
- Contacts (object-array): List of contacts. Quick Access Paths: 1. Email: fields.core.email.value | 2. Firstname: fields.core.firstname.value | 3. Lastname: fields.core.lastname.value | 4. Points: points | 5. ID: id. See schema for full 4-layer structure.
- Total (number): Total number of contacts matching the search criteria.
- RecordCount (number): Number of contacts returned in the current response.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200 for success, 401 for unauthorized).
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors), 500 = system error, -1 = parameter validation error.
- ErrorMessage (string): Error description if operation fails, empty string on success.
Add Contact Points
Add points to a Mautic contact. Use this to increase a contact's score based on interactions; for deducting points use 'Subtract Contact Points'.
Input Parameters:
- ContactId: The unique identifier of the Mautic contact. Get from Find Contacts or Find Contacts action. Example: "12345"
- Points: The number of points to add to the contact. Must be a positive integer. Example: 10
Options:
- AdditionalFields: Optional metadata for the point change to provide context in the contact's timeline. Fields: EventName (string): The category of the event, e.g., 'Webinar Registration' or 'Ebook Download'; ActionName (string): The specific action taken, e.g., 'Attended Live Session' or 'Downloaded PDF'. Example: {"EventName": "Webinar Registration", "ActionName": "Attended Live Session"}
Output:
- Success (bool): Indicates if points were successfully added to the contact. Returns true when the Mautic API confirms the update (OriginalStatusCode 200). Returns false if the contact is not found, credentials are invalid, or business logic fails. When false, refer to ErrorMessage for specific failure reasons.
- Contact (object): The updated contact object. Access core profile data via the nested path 'fields.core.[field_name].value'. For example, to get the first name, use 'fields.core.firstname.value'. Contains: id (integer): Contact ID; points (integer): New total points; fields (object): Grouped contact fields including 'core', 'social', etc.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200 for success, 404 for not found).
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors), 500 = system error, -1 = parameter validation error.
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully.
Subtract Contact Points
Subtract points from a Mautic contact. Use this to deduct points; for adding points use 'Add Contact Points'.
Input Parameters:
- ContactId: The unique identifier of the contact in Mautic. Can be obtained from Find Contacts or Find Contacts actions. Format: numeric string. Example: "456789"
- Points: The number of points to subtract from the contact's total. Must be a positive integer (minimum 1). Example: 10
Options:
- EventName: The specific event name for tracking the reason of point deduction (e.g., "unsubscribed", "bounced_email"). This value appears in Mautic's point history for auditing. Optional. Example: "unsubscribed"
- ActionName: The action name for tracking the operation type that triggered the deduction (e.g., "email_campaign", "automation_rule"). This value appears in Mautic's activity log. Optional. Example: "email_campaign"
Output:
- Success (bool): Whether points were successfully subtracted from the contact.
- OriginalStatusCode (number): The original HTTP status code returned by the Mautic API. Default 0 means the request did not reach upstream (e.g., parameter validation error, timeout).
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Error description if operation fails, empty string on success.
Send an Email to a Contact
Send a predefined email to a specific contact in Mautic. Use this to send transactional or marketing emails to a single contact; for bulk sending to a segment, use Send an Email to a Segment.
Input Parameters:
- EmailId: The ID of the email asset to send. Obtain it with Find Emails, Get an Email, or from the Mautic Emails UI (ID column or edit URL). Example: "42"
- ContactId: The ID of the contact who will receive the email. How to get: Use Find Contacts or Find Contacts actions to find the specific contact ID, or locate it in the Mautic dashboard under the Contacts section. Example: "157"
Options:
- Tokens: Email personalization variables used to replace placeholders in the email template (e.g., {firstname} in the template will be replaced by the value provided here). Example: {"firstname": "John", "lastname": "Doe", "company": "Acme Inc"}
- AssetAttachments: A list of IDs for files or documents (Mautic assets) to attach. Upload files in the Mautic Assets UI first, then reference their numeric IDs here. Example: [5, 12]
Output:
- Success (bool): Business logic success flag. True if the email was accepted by Mautic for delivery.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200, 404). Useful for precise debugging.
- StatusCode (number): The platform standard status code. 200 for successful API communication, 500 for system errors.
- ErrorMessage (string): Detailed error description if the request failed.
Add Contact to a Campaign
Add a contact to a specific campaign in Mautic. Use this to manage campaign memberships.
Input Parameters:
- CampaignId: The unique identifier (ID) of the Mautic campaign. This must be a numeric string (for example, "42"). This integration does not include a campaign search action; copy the ID from the Mautic campaign editor URL or your own records.
- ContactId: The unique identifier (ID) of the contact to be added. This must be a numeric string (for example, "1523"). Obtain this ID with Find Contacts or Get a Contact. Example: "1523"
Output:
- Success (bool): Indicates if the contact was successfully added to the campaign. Note: Mautic returns true even if the contact was already a member. To distinguish between a newly added member and one that was already enrolled, check the campaign contact list in the Mautic UI before relying solely on this flag.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 201 for created, 204 for success, 404 for not found). A value of 0 indicates the request failed before reaching the server.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors reflected in ErrorMessage), 500 = system error (network failure, timeout, code crash), -1 = parameter validation error (request not sent).
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully. Contains specific error details when StatusCode is non-200 or when the upstream API returns a business error.
Remove Contact from a Campaign
Removes a specific contact from a Mautic campaign using the REST API. Use this to stop a contact from progressing in a specific campaign workflow.
Input Parameters:
- CampaignId: The unique identifier of the campaign. Use the same source as in Add Contact to a Campaign (Mautic campaign editor URL or your own records). Example: "123"
- ContactId: The unique identifier of the contact to be removed. Obtain this ID with Find Contacts or Get a Contact. Example: "456"
Output:
- Success (bool): Indicates if the contact was successfully removed from the campaign. Returns true if the Mautic API confirms the removal (HTTP 200 and success=1). Returns false if the contact was not found in the campaign or an error occurred.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200, 404, 401).
- StatusCode (number): The system-level status code. 200 indicates the tool executed and handled the API response correctly; 500 indicates a network or logic error.
- ErrorMessage (string): Detailed error message provided by Mautic or the tool logic if Success is false.
Create a Company
Create a new company in Mautic. Use this to create a new company record; for updating existing companies use 'Update a Company'.
Input Parameters:
- CompanyName: The official name of the company. Mandatory. Example: "Acme Corporation"
Options:
- CompanyEmail: Primary contact email for the company. Format: standard email (e.g., contact@acme.com). Used for B2B communication. Example: "contact@acme.com"
- CompanyWebsite: Official company website URL. Must include protocol (http:// or https://). Example: "https://www.acme.com"
- CompanyPhone: Primary phone number for the company. Include country code if applicable. Example: "+1-415-555-0100"
- CompanyCountry: Country where the company is headquartered. Example: "United States"
- CompanyCity: City where the company is located. Example: "San Francisco"
- CompanyAddress1: Primary street address. Example: "123 Market Street"
- AdditionalFields: Extended company properties. Supported keys: companyaddress2 (string): Suite/Apt; companyzipcode (string): Postal code (e.g., "94102"); companystate (string): State/Province; companyfax (string): Fax number; companyannual_revenue (string): Annual revenue in USD as numeric string (e.g., "5000000"); companynumber_of_employees (string): Numeric count (e.g., "150"); companydescription (string): Business summary; isPublished (boolean): Whether record is visible in UI (default: true); overwriteWithBlank (boolean): If true, empty fields will clear existing data (default: false). Example: {"companystate": "California", "companyannual_revenue": "5000000"}
Output:
- Company (object): The created company object. Key fields: id (number): Unique Mautic ID; isPublished (boolean): Visibility status; dateAdded (string): Creation time (ISO 8601); fields (object): Contains grouped field data (core, social, etc.) where each field has 'alias' and 'value'. Example: {"id": 123, "fields": {"core": {"companyname": {"value": "Acme Corp"}}}}
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 201 for created, 400 for bad request). Default 0 means no HTTP request was made.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors reflected in ErrorMessage), 500 = system error (network failure, timeout, code crash), -1 = parameter validation error (request not sent).
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully. Contains specific error details when StatusCode is non-200 or when the upstream API returns a business error.
Get a Company
Get details of a specific company by its ID. Typical use cases include: retrieving company details for CRM integration, verifying company data before updates, or syncing company records with external systems. Requires the numeric company ID from Find Companies or the Mautic company view URL.
Input Parameters:
- CompanyId: The unique numeric identifier of the company in Mautic. You can obtain this ID from Find Companies, Get a Company, or the Mautic dashboard URL (for example /s/companies/view/12345). Example: "12345"
Output:
- Company (object): A comprehensive object containing company details: 'id' (number) is the unique identifier; 'isPublished' (boolean) indicates if the record is active; 'dateAdded'/'dateModified' (string) are ISO 8601 timestamps; 'fields' (object) contains grouped custom data (core, professional, etc.), where each field includes 'label', 'alias', 'type', and 'value'. Example: {"id": 123, "fields": {"core": {"companyname": {"value": "Acme Corp"}}}}
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200 for success, 404 for not found).
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors), 500 = system error, -1 = parameter validation error.
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully.
Update a Company
Update an existing company in Mautic. Use this to modify company details; for creating new ones use 'Create a Company'.
Input Parameters:
- CompanyId: The unique identifier of the company to update. Obtain this from Find Companies, Get a Company, or the Mautic company view URL. Example: "123"
Options:
- Companyname: The primary name of the company. Example: "Acme Corporation"
- Companyemail: The primary contact email address for the company. Example: "contact@acme.com"
- Companywebsite: The official website URL of the company. Example: "https://www.acme.com"
- AdditionalFields: Extended company properties. Supported keys: companyphone (Primary Phone), companycountry (Country), companycity (City), companystate (State/Province), companyzipcode (Postal Code), companyaddress1 (Address Line 1), companyaddress2 (Address Line 2), companyannual_revenue (Annual Revenue), companyfax (Fax Number), companynumber_of_employees (Employee Count), companydescription (Description). Example: {"companyphone": "+1-555-0100", "companycountry": "United States", "companycity": "New York"}
- IsPublished: Whether the company should be marked as published/active in Mautic. Example: true
- OverwriteWithBlank: Advanced option: Controls how empty field values are handled. false (default): Empty fields in the request are IGNORED; existing values in Mautic are PRESERVED. true: Empty fields in the request will CLEAR existing data in Mautic (set to blank). Most users should keep this as false. Example: false
- CreateIfNotFound: If true, creates a new company record if the provided CompanyId does not exist. Default: false. Risk Warning: If you provide a wrong CompanyId (e.g., typo), Mautic will CREATE A NEW COMPANY instead of updating the intended one, leading to duplicates. Only set to true for 'upsert' logic. Example: false
Output:
- Company (object): The complete company object returned by the Mautic API. Structure: id (int): Unique identifier; isPublished (bool): Active status; dateAdded/dateModified (string): ISO 8601 timestamps; fields (object): Nested container where core fields are stored under 'core' as objects with a 'value' property. Access example: To get company name, use Company.fields.core.companyname.value. Includes all configured fields like companyemail, companywebsite, companyphone, etc.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200 for updated, 201 for created, 404 for not found).
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors reflected in ErrorMessage), 500 = system error (network failure, timeout, code crash), -1 = parameter validation error (request not sent).
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully. Contains specific error details when StatusCode is non-200 or when the upstream API returns a business error.
Delete a Company
WARNING: This operation permanently deletes a company from Mautic and cannot be undone. All associated data will be lost. Delete a company from Mautic using the Mautic REST API. Requires company ID and Basic Authentication credentials. Returns the company information before deletion along with operation status and proper error handling.
Input Parameters:
- CompanyId: The unique identifier of the company to delete. This ID can be obtained from the Find Companies or Get a Company actions. Format: Numeric string (e.g., "123"). Example: "123"
Output:
- Company (object): Company object containing information before deletion. Core fields: id (string), isPublished (bool), dateAdded (string), fields.core (object). Refer to Mautic API documentation for full field list.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200 for success, 404 for not found).
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors), 500 = system error, -1 = parameter validation error.
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully.
Find Companies
Search for companies in Mautic. Use this to find companies based on search criteria; for loading one record by ID use Get a Company.
Options:
- Search: Search string to filter companies. Supports Mautic search syntax (e.g., 'companyname:Acme' or 'email:*@gmail.com'). Example: 'companyname:Acme'
- Start: The record offset from which to start returning results (used for pagination). For example, to get the second page of 30 results, set Start to 30. Example: 0
- Limit: Number of records to return. Default: 30. Range: 1-500. Optional.
- OrderBy: The field name used to sort the results. Common sortable fields include 'companyname', 'dateAdded', 'id', 'companyemail', 'companywebsite'. Example: 'dateAdded'
- OrderByDir: The direction of sorting. 'asc' for ascending (A-Z, oldest to newest), 'desc' for descending (Z-A, newest to oldest). Example: 'desc'
Output:
- Companies (object-array): Array of company objects. Each object contains: - id (int): Unique identifier of the company. - isPublished (bool): Whether the company record is published and visible in the Mautic system. - dateAdded (string): ISO 8601 formatted creation date. - createdBy (int): ID of the user who created the record. - createdByUser (string): Username of the creator. - dateModified (string): ISO 8601 formatted last modification date. - modifiedBy (int): ID of the user who last modified the record. - modifiedByUser (string): Username of the last modifier. - fields (object): Contains a core object with specific company details like companyname (string), companyemail (string), companywebsite (string), etc.
- Total (number): Total number of companies matching the search criteria in the database.
- RecordCount (number): Number of company records returned in this specific response.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200, 401, 404).
- StatusCode (number): System status code. 200 indicates the tool executed correctly, even if the API returned a business error.
- ErrorMessage (string): Detailed error description if the request failed. Empty on success.
Add Contact to a Company
Associate a contact with a company in Mautic. Use this to create a relationship between an existing contact and a company.
Input Parameters:
- CompanyId: The unique ID of the company. To obtain: call Find Companies or Get a Company action. Example: "42"
- ContactId: The unique ID of the contact to be added. To obtain: call Find Contacts or Get a Contact. Example: "157"
Output:
- Success (bool): Whether the contact was successfully added to the company. Returns true if the association was created or already exists. Returns false if the operation failed due to invalid IDs, authentication issues, or network errors.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 201 for created, 400 for bad request, 404 for not found). Default 0 means no HTTP request was made (e.g., failed parameter validation).
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors reflected in ErrorMessage), 500 = system error (network failure, timeout, code crash), -1 = parameter validation error (request not sent).
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully. Contains specific error details when StatusCode is non-200 or when the upstream API returns a business error.
Remove Contact from a Company
Remove the association between a contact and a company in Mautic. After removal, the contact will no longer be linked to the specified company.
Input Parameters:
- CompanyId: The unique identifier of the company in Mautic. This is a numeric string (e.g., "42"). You can obtain company IDs by calling the Find Companies or Get a Company action. Example: "42"
- ContactId: The unique identifier of the contact in Mautic. This is a numeric string (for example, "157"). Obtain it with Find Contacts or Get a Contact. Example: "157"
Output:
- Success (bool): Whether the contact was successfully removed from the company.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200 for success, 404 for not found). Default 0 means no HTTP request was made.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors reflected in ErrorMessage), 500 = system error (network failure, timeout, code crash), -1 = parameter validation error (request not sent).
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully. Contains specific error details when StatusCode is non-200 or when the upstream API returns a business error.
Create a Segment
Create a new segment (contact group) in Mautic. Use this to organize contacts based on criteria; for modifying existing segments use 'Update a Segment'.
Input Parameters:
- Name: The name of the segment. This is a required field used to identify the segment in Mautic. Example: "Gmail Users Segment"
Options:
- Alias: Segment alias. If not provided, will be auto-generated from name. Optional.
- Description: Segment description. Optional.
- IsPublished: Whether to publish the segment. Default: true. Optional.
- IsGlobal: Whether the segment is globally visible. If false, only visible to author. Default: true. Optional.
- Filters: An array of filter objects to define segment criteria. Filter Object Structure: - glue (string): Logical connector. Options: "and", "or". - field (string): The alias of the contact or company field (e.g., "email", "firstname", "country"). - object (string): The object type. Options: "lead" (Contact), "company" (Company). - type (string): Field data type (e.g., "email", "text", "number", "date"). - operator (string): Comparison operator. Options: "=" (equals), "!=" (not equals), "like" (contains, supports * wildcard), "!like" (does not contain), "startsWith", "endsWith", "empty", "!empty". - filter (string): The value to filter by. Example: [ { "glue": "and", "field": "email", "object": "lead", "type": "email", "filter": "*@gmail.com", "operator": "like" } ]
Output:
- Segment (object): The created segment object. Key fields include: - id (number): Unique identifier of the segment. - name (string): Name of the segment. - alias (string): URL-friendly alias. - filters (array): List of filters applied to this segment. - isPublished (boolean): Whether the segment is active. - isGlobal (boolean): Whether the segment is available to all users. - createdBy (number): User ID of the creator. - dateAdded (string): Creation timestamp in ISO 8601 format.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 201 for created, 400 for bad request). Default 0 means no HTTP request was made.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors reflected in ErrorMessage), 500 = system error (network failure, timeout, code crash), -1 = parameter validation error (request not sent).
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully. Contains specific error details when StatusCode is non-200 or when the upstream API returns a business error.
Get a Segment
Retrieve detailed segment (list) information from Mautic. Use this to get configuration of a specific segment; for searching segments use Find Segments. A segment is a smart filter collection used to group contacts based on criteria like email activity or tags.
Input Parameters:
- SegmentId: The unique identifier of the segment (list) to retrieve. This is a numeric or alphanumeric ID assigned by Mautic. You can obtain segment IDs through Find Segments or the Mautic segments UI.
Output:
- Segment (object): Segment object containing: id (int): Unique ID; name (string): Display name; alias (string): URL-friendly ID; description (string): Purpose; isPublished (bool): Status; isGlobal (bool): Visibility; filters (array): Smart filter rules (field, object, operator, filter, glue); dateAdded (string): ISO 8601 creation time; dateModified (string|null): Last update time; createdBy (int): Creator ID; createdByUser (string): Creator name; category (object|null): Assigned category.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200 for success, 404 for not found). Default 0 means no HTTP request was made.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors reflected in ErrorMessage), 500 = system error (network failure, timeout, code crash), -1 = parameter validation error (request not sent).
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully. Contains specific error details when StatusCode is non-200 or when the upstream API returns a business error.
Update a Segment
Update an existing segment in Mautic. Use this to modify segment properties or filters; for creating new segments use 'Create a Segment'.
Input Parameters:
- SegmentId: The unique identifier of the segment to update. Obtain from Find Segments, Get a Segment, or the Mautic UI URL (for example in /s/segments/view/42, the ID is 42). Example: "42"
Options:
- Name: The display name of the segment. Example: "Active Customers"
- Alias: A URL-friendly unique identifier for the segment. If left empty, Mautic will generate one from the Name. Example: "active-customers"
- Description: Segment description. Example: "Customers who purchased in last 30 days"
- IsPublished: Whether to publish the segment. Default: true.
- IsGlobal: Whether the segment is globally visible. If false, only visible to author. Default: true.
- Filters: Array of filter objects to define segment membership. Each object supports: Required fields: - glue (string): Logical operator to combine with previous filter. Values: 'and' | 'or' - field (string): Contact field to filter on (e.g., 'email', 'firstname', 'country') - operator (string): Comparison operator. Supported values: - 'like': Wildcard match (use for wildcards, e.g., '@gmail.com') - 'eq': Exact match - 'neq': Not equal - 'empty': Field is empty - 'notEmpty': Field is not empty - 'gt': Greater than (for numbers/dates) - 'lt': Less than (for numbers/dates) - filter (string): The value to compare against Example: [{"glue": "and", "field": "email", "operator": "like", "filter": "*@gmail.com"}, {"glue": "or", "field": "country", "operator": "eq", "filter": "US"}]
- AdditionalFields: Advanced options (most users can leave empty). Supported keys: - OverwriteWithBlank (bool): If true, empty fields will clear existing data; if false (default), empty fields are ignored and existing data is preserved. - CreateIfNotFound (bool): If true, creates a new segment if the SegmentId doesn't exist (Create or Update behavior); if false (default), returns 404 error if segment not found. Example: {"OverwriteWithBlank": false, "CreateIfNotFound": false}
Output:
- Segment (object): The updated segment object returned by the Mautic API. Core fields: - id (int): Segment unique identifier - name (string): Segment display name - alias (string): URL-friendly identifier - description (string): Segment description - isPublished (boolean): Publication status - isGlobal (boolean): Global visibility flag - filters (array): Array of filter objects. Each filter contains: - glue (string): 'and' | 'or' - field (string): Contact field name - operator (string): Comparison operator (like/eq/neq/gt/lt/empty/notEmpty) - filter (string): Comparison value - object (string): Entity type (usually 'lead') - type (string): Field data type (email/text/number/date) Refer to Mautic API documentation for complete field list.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200 for updated, 201 for created, 404 for not found).
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors), 500 = system error, -1 = parameter validation error.
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully.
Delete a Segment
WARNING: This operation will PERMANENTLY delete a segment (list) from Mautic and CANNOT be undone. All associated data will be lost. Use with caution.
Input Parameters:
- SegmentId: The unique numeric identifier of the segment (list or group) to delete. Obtain it from Find Segments, Get a Segment, or the Mautic UI. WARNING: Deletion is permanent and cannot be undone. Example: "42"
Output:
- Segment (object): Segment object containing information before deletion. Key fields: - id (number): Segment unique identifier - name (string): Segment display name - alias (string): Segment URL-friendly identifier - description (string): Segment description - isPublished (boolean): Whether the segment is active - filters (array): Array of filter conditions defining segment membership - dateAdded (string): Creation timestamp (ISO 8601) - createdBy (number): Creator user ID
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200 for success, 404 for not found). Default 0 means no HTTP request was made.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors reflected in ErrorMessage), 500 = system error (network failure, timeout, code crash), -1 = parameter validation error (request not sent).
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully. Contains specific error details when StatusCode is non-200 or when the upstream API returns a business error.
Find Segments
Find segments (contact lists) in Mautic. Use this to search and list segments with filtering and pagination; for loading one segment by ID use Get a Segment.
Options:
- Search: Search filter string to narrow down segment results. Optional. Example: "marketing"
- Start: Starting row number for pagination. Default: 0. Optional.
- Limit: Number of records to return. Default: 30. Range: 1-500. Optional.
- OrderBy: Field name to sort by. Common fields: "name" (alphabetical), "dateAdded" (creation date), "dateModified" (last update), "id" (segment ID). You can use any field returned in the Segments array. Example: "dateAdded"
- OrderByDir: Sort direction. Valid values: "asc" (ascending: A-Z, oldest to newest), "desc" (descending: Z-A, newest to oldest). Example: "desc"
- PublishedOnly: Whether to return only published segments. Default: false. Optional.
Output:
- Segments (object-array): Array of segment objects. Each segment contains: id (int), name (string), alias (string), description (string), isPublished (bool), dateAdded (string, ISO 8601), category (object), filters (array), isGlobal (bool). See ResponseExample for full object structure.
- Total (number): Total number of segments matching the search criteria.
- RecordCount (number): Number of segments returned in the current response.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200, 401, 403). Default 0 means no HTTP request was made.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors reflected in ErrorMessage), 500 = system error (network failure, timeout, code crash), -1 = parameter validation error (request not sent).
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully. Contains specific error details when StatusCode is non-200 or when the upstream API returns a business error.
Add Contact to a Segment
Add a contact to a Mautic segment. Use this to manually assign a contact to a specific segment (list); for creating new segments use 'Create a Segment'.
Input Parameters:
- SegmentId: The unique numeric ID of the Mautic segment (a group or list of contacts). You can find this ID in the Mautic web interface under 'Segments' (the ID column) or in the URL when editing a segment (e.g., /s/segments/edit/42). Alternatively, use Find Segments to retrieve available IDs. Example: "42"
- ContactId: The unique numeric ID of the contact to be added. You can find this ID in the Mautic contacts list or by using Find Contacts. Example: "1337"
Output:
- Success (bool): Indicates if the contact was successfully added to the segment. This is a convenience field; for robust error handling, check if StatusCode is 200.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200 for success, 404 if segment/contact not found). Default 0 means no HTTP request was made.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors reflected in ErrorMessage), 500 = system error (network failure, timeout, code crash), -1 = parameter validation error (request not sent).
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully. Contains specific error details when StatusCode is non-200 or when the upstream API returns a business error.
Remove Contact from a Segment
Remove a contact from a specific Mautic segment. Use this to manage segment memberships; for adding contacts use 'Add Contact to a Segment'.
Input Parameters:
- SegmentId: The ID of the segment to remove the contact from. Obtain it with Find Segments or Get a Segment. Example: "123"
- ContactId: The ID of the contact to remove. Get from Get a Contact action. Example: "456"
Output:
- Success (bool): Indicates if the contact was successfully removed from the segment. Returns true if StatusCode is 200 and ErrorMessage is empty. Note: If the contact was already not in the segment, this may still return true (idempotent).
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200, 404). A value of 0 indicates a local failure before reaching the server.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors), 500 = system error, -1 = parameter validation error.
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully.
Send an Email to a Segment
Send a segment email (list email) to all contacts in its associated segments immediately. Use this for marketing campaigns to segments; for a single contact use Send an Email to a Contact.
Input Parameters:
- EmailId: The segment email ID to send. Obtain it with Find Emails, Get an Email, or from the Mautic dashboard under Channels → Emails (ID column). The email type must be list (segment email). Example: "42"
Options:
- TestMode: If true, the email will be sent as a test to the email owner only. If false, it will be sent to all contacts in the associated segments. Default: false.
Output:
- Success (bool): Whether the segment email was successfully sent.
- SentCount (number): Number of emails successfully sent to contacts in the segments.
- FailedCount (number): Number of emails that failed to send.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors), 500 = system error, -1 = parameter validation error.
- ErrorMessage (string): Error description if operation fails, empty string on success.
Create an Email
Create a new email in Mautic. Use this to create marketing emails or templates; for modifying existing ones use 'Update an Email'.
Input Parameters:
- Name: Internal name of the email for management. Example: "Welcome Email 2024"
- Subject: The subject line visible to recipients. Example: "Welcome to our community!"
- CustomHtml: The full HTML content of the email. You can: (1) Use Mautic's visual email builder to design the email, then copy the HTML source code; (2) Paste an existing HTML email template; (3) Write custom HTML code. Tip: Ensure the HTML includes proper email styling (inline CSS) for best compatibility. Example: "Hello!"
Options:
- EmailType: Type of email: - 'list': One-time broadcast email. Used for manual or scheduled sends to specific segments (e.g., monthly newsletter). Requires 'Lists' parameter. - 'template': Automated/transactional email. Used in automation workflows triggered by events (e.g., welcome email after signup). Does not require 'Lists'. Default: "template"
- IsPublished: Publication status: 1 for Published (active and ready to use), 0 for Draft (saved but not active). Warning: Published emails with EmailType='list' may trigger automatic sending if associated segments have send rules configured. Default: 1
- Lists: Array of segment IDs to associate with this email. Required when EmailType is list. Obtain segment IDs from the Mautic segments UI or with Find Segments. Example: [1, 5]
- AdditionalFields: Extended configuration. Supported keys: - fromAddress (string): Custom sender email - fromName (string): Custom sender name - replyToAddress (string): Reply-to email - bccAddress (string): BCC email - category (number): Category ID - language (string): Language code (e.g., 'en') - utmTags (object): UTM tracking parameters. Supported keys: utm_source, utm_medium, utm_campaign, utm_content, utm_term. Note: Keys can use either underscore format (utm_source) or camelCase (utmSource), both are supported. Example: {"fromAddress": "marketing@example.com", "utmTags": {"utm_source": "mautic", "utm_medium": "email"}}
Output:
- Email (object): The created email object containing: - id (number): Unique identifier - name (string): Internal name - subject (string): Subject line - emailType (string): list or template - isPublished (number): 1 for published, 0 for draft - dateAdded (string): Creation timestamp in ISO 8601 format - fromAddress (string): Sender email - fromName (string): Sender name - language (string): Email language code - category (object): Associated category details - lists (array): Associated segment IDs (if EmailType='list') - customHtml (string): The HTML content - utmTags (object): UTM tracking parameters (if configured)
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 201 for created, 400 for bad request). Default 0 means no HTTP request was made.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors reflected in ErrorMessage), 500 = system error (network failure, timeout, code crash), -1 = parameter validation error (request not sent).
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully. Contains specific error details when StatusCode is non-200 or when the upstream API returns a business error.
Get an Email
Retrieve a specific email from Mautic by ID. Use this to get detailed email properties; for searching emails use Find Emails.
Input Parameters:
- EmailId: The unique identifier of the email to retrieve. You can obtain the ID from Find Emails, Get an Email, or the Mautic web interface. Format: numeric string. Example: "123"
Output:
- Email (object): Email object containing detailed information. Core fields: - id (int): Email ID - name (str): Internal email name - subject (str): Email subject line - fromAddress (str): Sender email address - fromName (str): Sender display name - isPublished (bool): Publication status - emailType (str): Email type ('list' or 'template') - sentCount (int): Total sent count - readCount (int): Total read count - dateAdded (str): Creation timestamp (ISO 8601) - language (str): Language locale - customHtml (str): HTML content - plainText (str): Plain text content - lists (array): Associated segment IDs - category (dict): Category information - utmTags (dict): UTM tag configuration
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200 for success, 404 for not found). Default 0 means no HTTP request was made.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors reflected in ErrorMessage), 500 = system error (network failure, timeout, code crash), -1 = parameter validation error (request not sent).
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully. Contains specific error details when StatusCode is non-200 or when the upstream API returns a business error.
Update an Email
Update an existing email in Mautic. Use this to modify email content or settings; for creating new emails use 'Create an Email'.
Input Parameters:
- EmailId: The unique identifier for the email. Obtain it with Find Emails or from the Mautic edit URL (the numeric ID at the end of /s/emails/edit/...). Example: "123"
Options:
- Name: Internal name for the email used within Mautic for organization. Example: "Monthly Newsletter Jan 2024"
- Subject: The subject line that recipients will see in their inbox. Supports tokens like {contactfield=firstname}. Example: "Special Offer for You!"
- FromAddress: The email address that will appear as the sender. Example: "marketing@example.com"
- FromName: The name that will appear as the sender. Example: "Marketing Team"
- CustomHtml: The HTML content of the email. Can be a full document (...) or a fragment. Supports Mautic tokens. Example: "Hello!"
- IsPublished: Set to true to make the email available for sending, or false to keep it as a draft. Note: Unpublishing (false) does not affect emails already sent; it only prevents new sends. Example: true
- AdditionalFields: Extended fields for email configuration. Update Strategy: PATCH mode only updates fields you provide; unfilled fields remain unchanged (unless 'overwriteWithBlank' is true). Core fields: replyToAddress (string), language (string), emailType (string), utmSource/Medium/Campaign/Content (string), overwriteWithBlank (boolean), createIfNotFound (boolean: set true to use PUT/Create). Other fields (bccAddress, plainText, template) refer to Mautic API documentation. Example: {"language": "en", "createIfNotFound": false}
Output:
- Email (object): Email object containing core fields (id, name, subject, fromAddress, fromName, customHtml, emailType, isPublished, dateAdded, dateModified). Additional nested fields (utmTags, category, lists, etc.) may be present depending on email configuration. Refer to Mautic API documentation for complete schema.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200 for updated, 201 for created, 404 for not found). Default 0 means no HTTP request was made.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors reflected in ErrorMessage), 500 = system error (network failure, timeout, code crash), -1 = parameter validation error (request not sent).
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully. Contains specific error details when StatusCode is non-200 or when the upstream API returns a business error.
Delete an Email
Delete an email template or campaign from Mautic permanently. Use this to remove an existing email; this action is irreversible.
Input Parameters:
- EmailId: The unique identifier of the email to delete. Obtain it with Find Emails or Get an Email. Example: "123"
Output:
- Email (object): Email object containing information before deletion. Fields: id (string/number): Email unique identifier; name (string): Email template name; subject (string): Email subject line; dateAdded (string): Creation timestamp (ISO 8601); isPublished (boolean): Publication status. Sensitive fields are redacted.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200 for success, 404 for not found). Default 0 means no HTTP request was made.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors reflected in ErrorMessage), 500 = system error (network failure, timeout, code crash), -1 = parameter validation error (request not sent).
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully. Contains specific error details when StatusCode is non-200 or when the upstream API returns a business error.
Find Emails
Find emails in Mautic. Use this to search and list emails with filters; for loading one email by ID use Get an Email.
Options:
- Search: String or search syntax to filter emails. Example: "Welcome Campaign"
- Start: Starting row for pagination. Default: 0. Example: 0
- Limit: Maximum number of results to return (1-500). Default: 30. Example: 50
- OrderBy: Field name to sort by. Common fields: dateAdded (creation date), dateModified (last update), name (internal name), subject (email subject), sentCount (send volume), readCount (open volume). Example: "dateAdded"
- OrderByDir: Sort direction. Default: "asc".
- PublishedOnly: Only return published emails. Default: false. Example: true
- Minimal: Whether to return simplified email data. If true, excludes heavy fields like 'lists', 'assetAttachments', and 'dynamicContent' to reduce response size. Default: false. Example: false
- AdditionalFields: Reserved for future extension or platform-specific parameters.
Output:
- Emails (object-array): Array of email objects. Each email contains: id (number): Unique ID; name (string): Internal name; subject (string): Subject line; language (string): Locale code; category (object|null): Category with id and title; fromAddress (string): Sender email; fromName (string): Sender name; emailType (string): 'list' or 'template'; isPublished (boolean): Status; dateAdded (string): ISO 8601 timestamp; readCount (number): Open count; sentCount (number): Send count; lists (array): Associated segment lists with id and name; utmTags (object): UTM tracking parameters.
- Total (number): Total number of emails matching the search criteria.
- RecordCount (number): Number of emails returned in the current response.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200 for success, 400 for bad request). Default 0 means no HTTP request was made.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors reflected in ErrorMessage), 500 = system error (network failure, timeout, code crash), -1 = parameter validation error (request not sent).
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully. Contains specific error details when StatusCode is non-200 or when the upstream API returns a business error.
Add to Do Not Contact List
Add a contact to the Do Not Contact (DNC) list in Mautic. Use this to unsubscribe a contact from a specific channel (email/sms) or manually mark them as DNC.
Input Parameters:
- ContactId: The unique identifier of the contact to add to the Do Not Contact list. Obtain it with Find Contacts or Get a Contact. Example: "47"
Options:
- Channel: Do Not Contact (DNC) channel type. Specifies which communication channel to block for this contact. Common values: "email", "sms". Default: "email".
- Reason: DNC reason code determining why the contact was added to the list: - 1 (UNSUBSCRIBED): User clicked an unsubscribe link or requested removal. - 2 (BOUNCED): Email hard bounced (invalid address/mailbox full). - 3 (MANUAL): Manual additions (e.g., GDPR requests, support tickets). Default: 3.
- ChannelId: The ID of the specific entity that caused the unsubscribe. For the 'email' channel, this is the Email ID (e.g., "123"). For 'sms', it is the SMS message ID. Leave empty for manual additions. Example: "123"
- Comments: Internal notes regarding this DNC entry. Use this to record the specific reason (e.g., "GDPR request via support ticket #5678"). These notes are for internal team use and are not visible to the contact. Example: "User requested removal via support ticket #5678"
Output:
- Contact (object): Detailed contact information after being added to the DNC list. Key fields: id (string), fields.core.email.value (string), doNotContact (array). Refer to Mautic API documentation for full field list.
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 201 for created, 404 for not found). Default 0 means no HTTP request was made.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors reflected in ErrorMessage), 500 = system error (network failure, timeout, code crash), -1 = parameter validation error (request not sent).
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully. Contains specific error details when StatusCode is non-200 or when the upstream API returns a business error.
Remove from Do Not Contact List
Remove a contact from Mautic's Do Not Contact (DNC) list for a specific channel. Use this to re-enable communications for a contact; for adding to DNC use 'Add to Do Not Contact List'.
Input Parameters:
- ContactId: The contact ID to remove from the Do Not Contact (DNC) list. Obtain it with Find Contacts or Get a Contact. Format: numeric string. Example: "123"
Options:
- Channel: Channel type for Do Not Contact (DNC) list. Values: 'email' - Email communications, 'sms' - SMS/text messages. Default: 'email'. Removing a contact from DNC re-enables future communications on this channel. Example: "email"
Output:
- Contact (object): Updated contact information after removal from DNC list. Contains: id (int), email (string), firstname (string), lastname (string), points (int), doNotContact (array: remaining DNC records, each element contains {id, channel, reason, comments, dateAdded}), fields (object: custom fields), and tags (array).
- OriginalStatusCode (number): The raw HTTP status code returned by the Mautic API (e.g., 200, 404). Default 0 if request failed before reaching API.
- StatusCode (number): System operation status code. 200 = system healthy (including API business errors), 500 = system error, -1 = parameter validation error.
- ErrorMessage (string): Error description message. Empty string if the operation completed successfully.
5. Example Usage
This example adds a new lead from a form submission by creating or updating a contact in Mautic.
Workflow outline: Start → Mautic (Create a Contact) → Answer (or your next automation step).
- Add the tool node
- On the workflow canvas, click + to add a node.
- Open the Tools tab and select Mautic.
- Choose Create a Contact so the node appears on the canvas.
- Configure the node
- Open the node panel and pick your saved Mautic credential.
- Set Email to the subscriber address (this drives upsert behavior in Mautic).
- Optionally fill Firstname, Lastname, Company, and AdditionalFields for richer profiles.
- Leave Owner at 0 unless you assign contacts to a specific Mautic user ID.
- Run and verify
- Resolve any validation errors shown on the canvas.
- Run a test execution and inspect logs for Contact output (id, fields.core.email.value, and related fields).
- Confirm the record appears in the Mautic contacts UI.
After a successful run, downstream nodes can use the returned Contact object (for example its id) in Update a Contact, Add Contact to a Segment, or other operations.
6. FAQs
Why do I see Success true but the contact did not change?
Some membership actions are idempotent in Mautic. Combine Success with OriginalStatusCode and ErrorMessage, and verify IDs with Get or Find actions when in doubt.
What causes 401 or 403 responses?
- Expired or revoked API tokens.
- Insufficient API permissions for the resource you are calling.
- Wrong base URL or mismatched Mautic version settings in the credential.
How do I obtain numeric IDs for campaigns, segments, or contacts?
- Use Find Contacts, Find Segments, Get a Contact, or related operations to resolve IDs before calling update or membership actions.
Why is my email send rejected?
- Confirm the email asset exists and is published where required.
- Verify the contact is not on the do-not-contact list for that channel.
- Check segment membership when using Send an Email to a Segment.
7. Official Documentation
For REST endpoints, authentication patterns, and version-specific behavior, refer to the official developer hub:
Leave a Reply.