You can actually do that via Sketch GraphQL API! See here for my improvised documentation on the matter.