We have already used curl as a REST client throughout the book, so you should be familiar with how to use it by now. We will be making a POST request to the following endpoint https://circleci.com/api/v1.1/project/:vcs-type/:username/:project/follow?circle-token=:token:
curl -X POST "https://circleci.com/api/v1.1/project/github/packtci/circleci-jobs-example/follow?circle-token=$CIRCLECI_API_TOKEN_GITHUB"
Here we use an environment variable called CIRCLECI_API_TOKEN_GITHUB that is set in our local environment, and we get the following response from the API:
{ "following" : true, "workflow" : false, "first_build" : { "compare" : null, "previous_successful_build" : null, "build_parameters" : null, "oss" : true, "committer_date" ...