Base URL
All API endpoints should be prefixed with your Mautic instance URL:Authentication
All requests require authentication using one of these methods:- OAuth2: Include the access token in the Authorization header:
Authorization: Bearer YOUR_ACCESS_TOKEN
- Basic Auth: Use your Mautic username and password (if enabled in Configuration > API Settings)
Ensure you have enabled and configured API access in your Mautic settings and have the necessary permissions for
multipleTransports
.Get List of Transports
Retrieves a collection of all configured mail transports. Full URLGet a Specific Transport
Fetches the details of a single mail transport using its unique ID. Full URL{id}
(integer, required): The ID of the transport you want to retrieve.
Create a Transport
Allows you to add a new mail transport to your Mautic instance. Full URLname
(string, required): The name for the new transport.description
(string, optional): A brief description of the transport’s purpose.mailerDsn
(string, required): The DSN string for the mailer.testedEmailFrom
(string, optional): Email address used for testing.isPublished
(boolean, optional): Whether the transport is enabled.
GET /api/multipleTransports/{id}
.
Edit a Transport
Updates an existing mail transport identified by its ID. You only need to send the fields you want to change. Full URL{id}
(integer, required): The ID of the transport to edit.
name
(string, optional): The updated name for the transport.description
(string, optional): The updated description.mailerDsn
(string, optional): The updated DSN string.testedEmailFrom
(string, optional): The updated test email address.isPublished
(boolean, optional): Whether the transport is enabled.
The documentation states that if the transport doesn’t exist, it might create a new one. Please verify this behavior in your Mautic version.
Delete a Transport
Permanently removes a mail transport from Mautic based on its ID. Full URL{id}
(integer, required): The ID of the transport to delete.
Assign Transport to Email
Assigns a transport to a specific email. Full URL{emailId}
(integer, required): The ID of the email to assign the transport to.
transportId
(integer, required): The ID of the transport to assign.useOwnerTransport
(boolean, optional): Whether to use the owner’s transport.
Assign Transport to User
Assigns a transport to a specific user. Full URL{userId}
(integer, required): The ID of the user to assign the transport to.
transportId
(integer, required): The ID of the transport to assign.
Test a Transport
Sends a test email using the specified transport. Full URL{id}
(integer, required): The ID of the transport to test.
Error Responses
If you use an invalid ID or missing parameters, you may get an error like:Complete API Examples
Example 1: Create a new transport and assign it to an email
Example 2: Test a transport before using it
Example 3: Update a transport’s DSN
API Path Summary
Operation | Method | Path |
---|---|---|
List all transports | GET | /api/multipleTransports |
Get specific transport | GET | /api/multipleTransports/{id} |
Create transport | POST | /api/multipleTransports/new |
Update transport | PATCH | /api/multipleTransports/{id}/edit |
Delete transport | DELETE | /api/multipleTransports/{id}/delete |
Assign to email | POST | /api/multipleTransport/transportEmail/{emailId} |
Assign to user | POST | /api/multipleTransport/transportUser/{userId} |
Test transport | POST | /api/multipleTransports/send/test/{id} |
Notice that some endpoints use
multipleTransport
(singular) while others use multipleTransports
(plural). This is the actual API implementation.