Issue with .ics and .svg attachments in MailWizz campaign via Python SDK

I'm using the MailWizz Python SDK to create campaigns with .ics (calendar) and .svg (redirect) attachments. The campaign creates successfully, but attachments don't seem to be included or delivered properly. I need help understanding the correct way to attach files via the API.

What I'm trying to do:

  • Generate dynamic .ics calendar invites per recipient
  • Generate custom .svg files with meeting links
  • Send both as attachments in a MailWizz campaign
Current approach:
I'm creating a campaign with create_campaign_with_attachments() and passing attachment paths, but I don't see an attachments parameter in the MailWizz API documentation for campaign creation.


def create_campaign_with_attachments(
self,
list_uid: str,
from_name: str,
subject: str,
html_body: str,
attachment_paths: List[str]
) -> Optional[str]:

campaign_data = {
'name': campaign_name,
'type': 'regular',
'from_name': from_name[:128],
'from_email': MAILWIZZ_SMTP_USERNAME,
'subject': subject[:255],
'reply_to': MAILWIZZ_SMTP_USERNAME,
'send_at': send_at,
'list_uid': list_uid,
'options': {
'url_tracking': 'yes',
'tracking_domain': "",
'plain_text_email': 'yes',
},
'template': {
'content': html_body,
'inline_css': 'yes'
}
}

# No attachments field here - how should I include them?
response = self.campaigns.create(campaign_data)



Questions:

  1. What's the correct way to attach files when creating a campaign via the MailWizz API?
  2. Does MailWizz support dynamic attachments (different files per recipient) in a single campaign, or do I need to create separate campaigns?
  3. Is there a different endpoint (like campaigns/attachments/{campaign_uid}) that should be used after campaign creation?
 
Back
Top