Organizations API
Tier: Free, Premium, Ultimate
Offering: GitLab.com, Self-managed
Status: Experiment
Create organization
History
-
Introduced in GitLab 17.5 with a flag named
allow_organization_creation
. Disabled by default. This feature is an experiment.
The availability of this feature is controlled by a feature flag.
For more information, see the history.
Creates a new organization.
This endpoint is an experiment and might be changed or removed without notice.
POST /organizations
Parameters:
Attribute | Type | Required | Description |
---|---|---|---|
name
| string | yes | The name of the organization |
path
| string | yes | The path of the organization |
description
| string | no | The description of the organization |
avatar
| file | no | The avatar image for the organization |
Example request:
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
--form "name=New Organization" \
--form "path=new-org" \
--form "description=A new organization" \
--form "avatar=@/path/to/avatar.png" \
"https://gitlab.example.com/api/v4/organizations"
Example response:
{
"id": 42,
"name": "New Organization",
"path": "new-org",
"description": "A new organization",
"created_at": "2024-09-18T02:35:15.371Z",
"updated_at": "2024-09-18T02:35:15.371Z",
"web_url": "https://gitlab.example.com/-/organizations/new-org",
"avatar_url": "https://gitlab.example.com/uploads/-/system/organizations/organization_detail/avatar/42/avatar.png"
}