Hey Santiago! Welcome to Discuss.
You’re right that there’s currently no way to use variables from Contexts via the API, but you’re not alone in wanting this functionality. We’ve got at least a couple posts on our Ideas board about this very feature, and I’d encourage you to add your vote(s), since we draw from the Ideas page when prioritizing future work.
There might be something you can try here in Discuss, in the meantime (here’s one such post).