跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
Support

Create a user group

POST
/admin/groups
curl --request POST \
--url https://gitea.example.com/api/v1/admin/groups \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "description": "example", "name": "example", "parent_id": 1 }'

Gitea Enterprise only. This endpoint is not part of the community edition.

Media typeapplication/json
CreateUserGroupOption contains options for creating a user group.
object
description
string
name
string
parent_id
integer format: int64
Examplegenerated
{
"description": "example",
"name": "example",
"parent_id": 1
}

The created user group

Media typeapplication/json
UserGroup represents a user group in API responses.
object
description
string
id
integer format: int64
name
string
parent_id
integer format: int64
Examplegenerated
{
"description": "example",
"id": 1,
"name": "example",
"parent_id": 1
}

APIForbiddenError is a forbidden error response

Media typeapplication/json
message
string
url
string

APINotFound is a not found empty response

Media typeapplication/json