GitHub & site integration using API

I was trying to integrate github/gitlab repository while creating a site with certain env variable configuration by using api.
I have sent “build_settings” and “deploy_hook” parameter at the time of site creation but it was ignored.
Could you please help me on that.

  "build_settings": {
    "cmd": "yarn build",
    "dir": "build",
    "env": {
        "REACT_APP_DATO_API_TOKEN": "xxx",
        "YARN_FLAGS": "--no-ignore-optional"
    "private_logs": null,
    "allowed_branches": [
    "functions_dir": null,
    "skip_prs": null,
    "untrusted_flow": "review",
    "base_rel_dir": true,
    "stop_builds": false,
    "public_repo": true,
    "provider": "github",
    "repo_type": "git",
    "repo_url": "",
    "repo_branch": "master",
    "repo_path": "PrasenjitChowdhury/datocms-react-lodging-spa-demo",
    "base": null

Hello @chjit, welcome to the Community!

I think you’ll need to do that in a separate API call. You could take a look at how our UI does it. For more information on doing so, please read the following post: [Support Guide] Understanding and using Netlify's API