Create repo
Create a team-owned or personal repository.
Endpoints
POST /api/v1/teams/{team_slug}/repos
POST /api/v1/users/{username}/repos
Authenticated
Request
JSON body:
name(required)slug(required)visibility(required):publicorprivatedefault_branch(required)
Usage
curl --request POST \
--header "Authorization: Bearer $GHIT_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{"name":"Website","slug":"website","visibility":"private","default_branch":"main"}' \
"$GHIT_API_URL/v1/teams/platform/repos"
Success
201 Created with the created repo record.
{
"uuid": "...",
"name": "Website",
"slug": "website",
"visibility": "private",
"default_branch": "main",
"is_active": true,
"created_at": "2026-03-09T12:00:00Z"
}
Errors
403 Forbiddenwhen caller lacks owner scope access.404 Not Foundwhen owner user/team does not exist.409 Conflictfor duplicate slug in owner scope.
Common auth errors are documented on the API overview page.