I have been trying to figure out how to send a DM using #ActivityPub but I have still not found any clear instructions on what the message should contain for it to be a proper DM.
I believe it's a list of actors in the to field and these actors being included as a mention in tags.
But not 100% certain. It's all very awkward and very specific to how one writes one's front end code. I would expect that if someone were to write a messenger app for the Fediverse, e.g. something to talk with other people using DMs, its behavior would be different from the current implementations.
The Mastodon docs about how it interacts with ActivityPub can often be a good start for referencing AP in general, and this is one of those cases.
Here's how Mastodon handles DMs:
> direct: Mentions-only statuses have actors in to or cc, all of which are Mentioned in tag