Create an organization
const url = 'https://gitea.com/api/v1/orgs';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"description":"example","email":"example","full_name":"example","location":"example","repo_admin_change_team_access":true,"username":"example","visibility":"public","website":"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.com/api/v1/orgs \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "description": "example", "email": "example", "full_name": "example", "location": "example", "repo_admin_change_team_access": true, "username": "example", "visibility": "public", "website": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”CreateOrgOption options for creating an organization
object
The description of the organization
The email address of the organization
The full display name of the organization
The location of the organization
Whether repository administrators can change team access
Username of the organization
Possible values are public (default), limited or private
The website URL of the organization
Responses
Section titled “Responses”Organization
Organization represents an organization
object
The URL of the organization’s avatar
The description of the organization
The email address of the organization
The full display name of the organization
The unique identifier of the organization
The location of the organization
The name of the organization
Whether repository administrators can change team access
Username of the organization deprecated
The visibility level of the organization (public, limited, private)
The website URL of the organization
Example
{ "visibility": "public"}APIForbiddenError is a forbidden error response
Headers
Section titled “Headers”APIValidationError is error format response related to input validation