/v1/repos/createCreate a repository
Creates a new repository from either an archive payload or an initialFiles object. Send exactly one of base64 or initialFiles.
| Field | Location | Required | Description |
|---|---|---|---|
| name | body | yes | Repository name. |
| base64 | body | conditional | Base64-encoded repository archive. Send exactly one of base64 or initialFiles. |
| initialFiles | body | conditional | Object keyed by repository file path. Send exactly one of initialFiles or base64. |
| path | body | no | Optional repository path override. |
| defaultBranch | body | no | Initial default branch. Defaults to main. |
| replaceIfExists | body | no | Replace an existing repository with the same resolved path. |
| message | body | no | Initial commit message. |
curl -X POST "https://api.driftstone.ai/v1/repos/create" \
-H "Authorization: Bearer dk-..." \
-H "Content-Type: application/json" \
-d '{
"name": "hello-world",
"defaultBranch": "main",
"initialFiles": {
"README.md": "# Example Repo\n"
}
}'