# Start a project at Praecise Cloud that is released from a GitHub branch

`POST /hosting/coder/projects/import/github` · Rivier · hosting

Start a project at Praecise Cloud that is released from a GitHub branch: a push to the branch releases it, other branches and pull requests make previews. Once its first build is done, bring it into Rivier by its Praecise Cloud name; Rivier then gives its changes as a patch for the branch.

- Scope: hosting:write
- Sdk: hosting.coderProject.importGithub
- Cli: hosting coder project import github

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "repoId": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "description": "The repository's number, as the list of connected repositories gives it"
    },
    "branch": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "The branch that is released; the repository's default branch when left out"
    },
    "directory": {
      "type": "string",
      "maxLength": 200,
      "description": "The folder of the project inside the repository; its root when left out"
    },
    "cloud": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9-]{0,62}$",
      "description": "The name the project gets at Praecise Cloud"
    }
  },
  "required": [
    "repoId",
    "cloud"
  ],
  "additionalProperties": false
}
```

## Responses

- `201`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/hosting/coder/projects/import/github' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "repoId": 0,
  "cloud": "string"
}'
```
