How to create a plugin with backend API calls to populate composer while drafting?

Also important for my use case is the FormKit: Discourse toolkit to render forms