Can't set translation parent when creating segment emails via API

Your software
My Mautic version is: v5.2.8
My PHP version is: 8.3.26
My Database type and version is: MariaDB 10.6.23

Your problem
My problem is: I’m trying to programmatically create translated newsletter emails (segment emails, emailType=‘list’) via the API, where a German email should be linked as a translation of an English parent email.

These errors are showing in the log: All requests returned HTTP 200, but translationParent remains null.

Steps I have tried to fix the problem:
Based on the documentation and GitHub research, I’ve attempted the following approaches when calling POST
/api/emails/new:

  1. translationParent (as documented) - Result: translationParent: null in response
  2. translationParent[id] (bracket notation for object) - Result: translationParent: null
  3. templateTranslationParent (found in GitHub issue #7604 ) - Result: translationParent: null
  4. segmentTranslationParent (from PR #140) - Result: translationParent: null
  5. PATCH /api/emails/{id}/edit after creation with segmentTranslationParent - Result: translationParent: null

My current workflow:

  1. Create EN email first, capture the returned email ID (e.g., id=16)
  2. Create DE email with language=‘de’ and include segmentTranslationParent: 16
  3. Check the response - translationParent is always null, translationChildren is always empty

Official API docs at developer.mautic.org show translationParent as type “object” but provide no working examples

Is there a working method to set a translation parent for segment emails via the API in Mautic 5.2.8? If so, what is the correct parameter name and format? Or is this functionality not available via the API and only works through the UI?

Any guidance would be greatly appreciated!

Not sure if it’s the same problem but I remember testing this bug relating to the translated item not being retained on updating an email with the API, which has been fixed in Mautic 7 - others tested it on 4 and 6 and said it worked, so it might be worth giving it a go:

In terms of the docs, it’s best to use the new docs:

The old legacy docs are quite out of date now, but there’s some resources which haven’t yet been ported over so we’re keeping it open for reference.

1 Like

Thank you. Guess I am waiting for Mautic 7 then for the moment. will try it on 5.2 if i find some time. in the meantime i will use the gui. I appreciate the help.