5

I'm trying to list sent emails via the mandrill API. I can list them fine by calling https://mandrillapp.com/api/1.0/messages/search.json. This gives me a list that contains a bunch of sent messages along withg an id field. I then use this ID field when calling https://mandrillapp.com/api/1.0/messages/content.json (need to know some of the content). It gives me the following response:

{ status: "error" code: 11 name: "Unknown_Message" message: "No message exists with the id 'id goes here'" }

This is when I'm pasting IDs from the list. Also, I've tried it with both recently sent emails and those that were sent months ago. It's always the same.

What am I doing wrong?

Thanks a lot!

  • I have the exact same problem. I send email through my app, then query it, get ID of it and I'm trying to get the content, but it says the same error message as you describe. – MCFreddie777 May 26 '20 at 15:53

1 Answers1

4

Depending on when you're making the messages/content request, the content may not be indexed just yet, or might fall outside of the time range for how long they store that info.

For example, right after you send the email it probably takes a bit for the content to get indexed. So if you're sending, searching, then calling messages/content in the span of a few minutes, you may get that error.

And message content is only stored for 24 hours by default unless you pay for more, so if you're calling messages/search after the 24 hour period is up, you'll get the same error.

terrorbox
  • 709
  • 4
  • 8
  • I am using the same ID that was returned by `search.json` in `info.json` and it shows me the message, but when i use it with `content.json`, I get the error. – MCFreddie777 May 27 '20 at 08:28