Skip to content

Instantly share code, notes, and snippets.

@kuzmany
Last active January 20, 2025 22:29
Show Gist options
  • Save kuzmany/fd9372f46809cea00945ff3bd73102b9 to your computer and use it in GitHub Desktop.
Save kuzmany/fd9372f46809cea00945ff3bd73102b9 to your computer and use it in GitHub Desktop.
API docs for Multiple Transport for Mautic https://mtcextendee.com/mautic-multiple-transport-bundle/

Multiple Transport Bundle API Documentation

This bundle provides REST API endpoints to manage transport settings for emails and users.

Multiple Transport Endpoints

Standard CRUD endpoints are available for managing transports:

GET /api/multipleTransports
GET /api/multipleTransports/{id}
POST /api/multipleTransports/new
PATCH /api/multipleTransports/{id}/edit
DELETE /api/multipleTransports/{id}/delete

These follow the standard Mautic API patterns for entity management.

Multiple Transport Management API

The following endpoints are available for managing Multiple Transport entities:

GET /api/multipleTransports

Returns a list of all transport configurations.

Response:

{
    "total": 1,
    "multipleTransports": [
        {
            "id": 1,
            "name": "Transport Name",
            "description": "Transport Description",
            "category": {...},
            "mailerDsn": "smtp://user:[email protected]:25",
            "testedEmailFrom": "[email protected]",
            "isPublished": true
        }
    ]
}
GET /api/multipleTransports/{id}

Returns details for a specific transport configuration.

POST /api/multipleTransports/new

Creates a new transport configuration.

Request Body:

{
    "name": "New Transport",
    "description": "Description",
    "mailerDsn": "smtp://user:[email protected]:25",
    "testedEmailFrom": "[email protected]",
    "isPublished": true
}
PATCH /api/multipleTransports/{id}/edit

Updates an existing transport configuration. Accepts the same fields as POST.

DELETE /api/multipleTransport/{id}/delete

Deletes a transport configuration.

Transport Email Endpoints

Get Email Transport Settings

GET /api/multipleTransport/transportEmail/{emailId}

Returns transport settings for a specific email.

Response:

{
    "transportEmail": {
        "email": {...},
        "transport": {...},
        "useOwnerTransport": true|false
    }
}

Set Email Transport Settings

POST /api/multipleTransport/transportEmail/{emailId}

Parameters:

  • transportId: ID of the transport to use
  • useOwnerTransport: boolean indicating whether to use owner's transport

Response:

{
    "transportEmail": {
        "email": {...},
        "transport": {...},
        "useOwnerTransport": true|false
    }
}

Transport User Endpoints

Get User Transport Settings

GET /api/multipleTransport/transportUser/{userId}

Returns transport settings for a specific user.

Response:

{
    "transportUser": {
        "user": {...},
        "transport": {...}
    }
}

Set User Transport Settings

POST /api/multipleTransport/transportUser/{userId}

Parameters:

  • transportId: ID of the transport to use

Response:

{
    "transportUser": {
        "user": {...},
        "transport": {...}
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment