Organizations API

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab.com, GitLab Self-Managed
  • Status: Experiment

Create organization

History

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:

AttributeTypeRequiredDescription
namestringyesThe name of the organization
pathstringyesThe path of the organization
descriptionstringnoThe description of the organization
avatarfilenoThe 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"
}