Right now, no message ID is provided in response to an API call to send because one hasn't yet been given to the message. It happens later in the process. However, we're looking at changing that to assign an id earlier. All the webhooks, including the 'sent' event, include the unique id, though, so you can match things between the various webhook events.
We're still working to document the various ways you can search and beef up metadata. Mandrill supports
Lucene queries for searching in the application or via the API, including single and multiple-character wildcards (just don't start a query with a wildcard) and boolean operators. For custom metadata fields that you're indexing, the field name for searching takes the form of u_yourfieldname for searching. In the search box in the app, you could search for something like this if your field is called 'userid' and you want to search for values starting with 111:
u_userid:111*
Other field names include 'full_email' for the recipient email address, 'subject' for the subject line, 'opens.ts' (a range search that would allow you to search for open timestamps in a given range), and 'url'. With the url, you could search something like 'url:
twitter.com*' to search for messages where users clicked on a link that started with
twitter.com.
Feel free to send us an email via the form at
help.mandrill.com if you have other questions.