Rename an organization
POST
/orgs/{org}/rename
const url = 'https://gitea.example.com/api/v1/orgs/example/rename';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"new_name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://gitea.example.com/api/v1/orgs/example/rename \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "new_name": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org
required
string
Existing org name
Request Body
Section titled “Request Body”RenameOrgOption options when renaming an organization
object
new_name
required
New username for this org. This name cannot be in use yet by any other user.
string
Examplegenerated
{ "new_name": "example"}RenameOrgOption options when renaming an organization
object
new_name
required
New username for this org. This name cannot be in use yet by any other user.
string
Responses
Section titled “Responses”APIEmpty is an empty response
Media typeapplication/json
APIForbiddenError is a forbidden error response
Media typeapplication/json
Headers
Section titled “Headers”message
string
url
string
APIValidationError is error format response related to input validation
Media typeapplication/json
Headers
Section titled “Headers”message
string
url
string