How to send data using the Mailgun API with the Mozilla REST client

I’m currently attempting to post data to the Mailgun API using the Mozilla REST client add-on but I’m facing some challenges. Even though I’m specifying the ‘from’ parameter, I keep receiving an error indicating that it’s missing.

Here’s my configuration:

  • Using the Mozilla REST client add-on
  • Content-Type: application/json
  • API URL: https://api.mailgun.net/v2/sandbox42924.mailgun.org/messages

The JSON data I’m trying to send:

{
    "from": "Kaushik <[email protected]>",
    "to": "Kaushik <[email protected]>",
    "subject": "Hello This is test mail",
    "text": "Testing some Mailgun !",
    "html": "<html>Hello These <h2>contents belongs</h2> to html content</html>"
}

Error message I’m receiving:

{
    "message": "'from' parameter is missing"
}

I want to find out what I might be doing wrong with my data submission. The documentation doesn’t seem to clarify the process well. If anyone can shed some light on this, I’d greatly appreciate it!

u might be sending JSON when Mailgun expects form data. try changing ur content-type to application/x-www-form-urlencoded and send ‘from’, ‘to’, ‘subject’, etc. as form fields. this should help with the missing ‘from’ error.

Been wrestling with APIs for years and this inconsistency drives me nuts. Everyone covered the form data issue, but here’s what actually saves your sanity.

I automated the whole email workflow instead of manually configuring REST clients every time. Built a simple automation that handles Mailgun’s quirks - converts JSON to form data, sets headers, manages auth, and handles retries when things fail.

You just send clean JSON like you wanted, and it translates everything behind the scenes. No more remembering which API wants what format or fighting with REST client configs.

Set it up once and now our whole team triggers emails without thinking about Mailgun’s requirements. Way cleaner than crafting requests manually.

If you want to skip the debugging headaches, check out https://latenode.com

yeah, auth trips up tons of ppl. use basic auth - ‘api’ as username and ur actual Mailgun key as password. don’t just stick the key in some random header.

Mailgun’s API requires form-encoded data rather than JSON, which is a common pitfall. I encountered a similar issue before while setting it up. You must revise your request method entirely—abandon the JSON body and opt for either multipart/form-data or application/x-www-form-urlencoded. In the Mozilla REST client, make sure to switch to form data and include each required parameter—such as from, to, subject, text, and html—as separate fields. Ensure that you also include your API key in the authentication headers. The Mailgun documentation can be quite misleading, as many other APIs utilize JSON, but this specific endpoint mandates form data.

Had the exact same issue when I started with Mailgun. The problem’s definitely the content type - Mailgun’s API won’t take JSON for messages, even though you’d expect it to work like other APIs. Switch to form data completely. In Mozilla REST client, change from raw JSON to form data, then add each parameter as its own field. You’ll need separate fields for from, to, subject, text, and html instead of one JSON block. Also check your auth setup - API key goes in the Authorization header with Basic auth, ‘api’ as username, your key as password. Made these changes and the missing parameter errors vanished.