Update repo

Update mutable repo fields by owner path and slug.

Endpoints

PUT /api/v1/teams/{team_slug}/repos/{repo_slug}
PUT /api/v1/users/{username}/repos/{repo_slug}
Authenticated

Request

JSON body (all optional):

  • name
  • slug
  • visibility (public or private)
  • default_branch
  • is_active

Usage

curl --request PUT \
  --header "Authorization: Bearer $GHIT_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"name":"Website API","visibility":"public"}' \
  "$GHIT_API_URL/v1/teams/platform/repos/website"

Success

200 OK with the updated repo record.

{
  "uuid": "...",
  "name": "Website API",
  "slug": "website",
  "visibility": "public",
  "default_branch": "main",
  "is_active": true,
  "created_at": "2026-03-09T12:00:00Z"
}

Errors

  • 403 Forbidden when caller lacks update access.
  • 404 Not Found when owner/repo is not found.
  • 409 Conflict for duplicate slug in owner scope.

Common auth errors are documented on the API overview page.