Custom template for PM via API?

Hi, We’re building a system for reaching out to users when our software crashes, and are thinking of using Discourse as a private email support portal and and Start a new conversation with a customer not yet in Discourse via the API.

When I send the email via the API it seems to use one of the built-in templates and prepends [McNeel Forum] [PM] to the subject. While reasonable for other uses of PMs, I’m concerned that our users who are not on the forum will find this confusing or even spammy.

Is there a way to specify a custom template when sending via the API? I don’t see it here:
https://docs.discourse.org/#tag/Posts/operation/createTopicPostPM

There is a similar unanswered question here:

You can customize the text of that Customize text in Discourse but not different for api and front end. If you need it different, you’ll need a plugin.

Thank you for the reference to customizing the text. Ideally, we’d have different text from the API - is there already a plugin for this? Cheers

No. The API is how the front end does all of its work. There is no distinction between the API and the ux.

You would need a plugin that either created a new endpoint or took a parameter to change the subject.

1 Like