SuzieH is basically correct; you'd have to "switch" to that user, and use the session key to kudo that message. You could still use APIv1 at that point too since you'd have the session key. But you'd have to guard the session key with your life while you're using it, and then discard it with
/authentication/sessions/logout
as soon as you're done.
Note; this can't be done in freemarker, since freemarker *always* runs as the currently logged in user, even if you try to pass in the session keys to the api calls.
There is one sort-of workaround, in that if you pass a valid session key to an endpoint, the rest calls in that endpoint will run as the user that belongs to that session key.
But you can't call endpoints in freemarker either, so it's of limited use 🙂