How to assign a workflow to a project programatically

I want to automate the assigning of a workflow automatically to any project.
Tried to look into the REST APIs (https://docs.atlassian.com/software/jira/docs/api/REST/8.0.0/) but could not find any useful info there. Can please someone help me in this.