Request from API doesn't update User#last_seen_at

No, there isn’t one. If you have control over the API server you could try and “trick” discourse into updating last seen for the request. From the code I quoted above you can see how it works.

So you could make a request with “X-Requested-With" header containing “XMLHttpRequest” (to trick the xhr? bit), and “DISCOURSE_VISIBLE” as “true”.

Note that this wouldn’t be a “supported” way to use the API, but I don’t foresee any problems.