v1
latestOpenAPI 3.0.32026-07-22115106141.4 KBRepository Manipulation
Transfer ownership
Transfer repository ownership or attach to an organization.
Two modes of operation:
- Transfer ownership within an organization: Provide new_owner_user_id to change the repository owner to another user in the same organization
- Transfer personal repo to organization: Provide target_organization_id to attach a personal repository to an organization
Exactly one of new_owner_user_id or target_organization_id must be provided.
post/repos/{repo_id}/transfer
Request body
Response
Repository transferred successfully
Example response
{
"repo_name": "repo-name",
"repo_id": "example_id"
}