I'm using the export contacts activity via the API to export my active, removed, and do not mail lists just like I would through the user interface, but I don't see an option to include the Opt-Out Reason field in the do not mail list. Is that possible?
Great question, looking at the documentation the field you're asking for is not displayed as an option for creating an export though it should be exposed. I will get with our developers and see if we can find the field name and update the documentation and this post once I have the information.
I did some testing on all of the obvious ways I could have seen us include it and none of them worked for me. I'm still waiting to hear back from our developers on this one, will let you know as soon as I hear something from them.
While the developers are poking around in the code, one great improvement would be the ability to include the API contact ID in these downloads.
Definitely will bring it up though enhancements to this API are unlikely to happen in the near future.
After looking this over with our engineers this morning, it looks like this is not currently exposed through our API. I have put through an enhancement request to have this added but we do not have an ETA on this. We will update if this feature is added to the API.