Skip to content

Create a group

POST
/api/v4/groups

Creates a project group. Available only for users who can create groups.

Media type multipart/form-data
object
name
required

The name of the group

string
nullable
path
required

The path of the group

string
nullable
parent_id

The parent group id for creating nested group

integer
nullable
organization_id

The organization id for the group

integer
nullable
description

The description of the group

string
nullable
visibility

The visibility of the group

string
nullable
Allowed values: private internal public
avatar

Avatar image for the group

string format: binary
nullable
share_with_group_lock

Prevent sharing a project with another group within this group

boolean
nullable
require_two_factor_authentication

Require all users in this group to setup Two-factor authentication

boolean
nullable
two_factor_grace_period

Time before Two-factor authentication is enforced

integer
nullable
project_creation_level

Determine if developers can create projects in the group

string
nullable
Allowed values: noone owner maintainer developer administrator
auto_devops_enabled

Default to Auto DevOps pipeline for all projects within this group

boolean
nullable
subgroup_creation_level

Allowed to create subgroups

string
nullable
Allowed values: owner maintainer
emails_disabled

(Deprecated) Disable email notifications. Use: emails_enabled

boolean
nullable
emails_enabled

Enable email notifications

boolean
nullable
show_diff_preview_in_email

Include the code diff preview in merge request notification emails

boolean
nullable
mentions_disabled

Disable a group from getting mentioned

boolean
nullable
lfs_enabled

Enable/disable LFS for the projects in this group

boolean
nullable
request_access_enabled

Allow users to request member access

boolean
nullable
default_branch

The default branch of group’s projects

string
nullable
Example
main
default_branch_protection

Determine if developers can push to default branch

integer
nullable
Allowed values: 0 3 1 2 4
default_branch_protection_defaults

Determine if developers can push to default branch

object
allowed_to_push

An array of access levels allowed to push

Array<object>
nullable
object
access_level
required

A valid access level

integer
Allowed values: 30 40 60 0
allow_force_push

Allow force push for all users with push access.

boolean
nullable
allowed_to_merge

An array of access levels allowed to merge

Array<object>
nullable
object
access_level
required

A valid access level

integer
Allowed values: 30 40 60 0
code_owner_approval_required

Require approval from code owners

boolean
nullable
developer_can_initial_push

Allow developers to initial push

boolean
nullable
enabled_git_access_protocol

Allow only the selected protocols to be used for Git access.

string
nullable
Allowed values: ssh http all
crm_enabled

Enable Customer Relations Management for this group

boolean
nullable
resource_access_token_notify_inherited

Send access token expiry notifications to all inherited members of the group

boolean
nullable
lock_resource_access_token_notify_inherited

Prevent subgroups from overriding the access token expiry notification setting

boolean
nullable
membership_lock

Prevent adding new members to projects within this group

boolean
nullable
ldap_cn

LDAP Common Name

string
nullable
ldap_access

A valid access level

integer
nullable
shared_runners_minutes_limit

(admin-only) compute minutes quota for this group

integer
nullable
extra_shared_runners_minutes_limit

(admin-only) Extra compute minutes quota for this group

integer
nullable
wiki_access_level

Wiki access level. One of disabled, private or enabled

string
nullable
Allowed values: disabled private enabled
duo_availability

Duo availability. One of default_on, default_off, never_on or always_on

string
nullable
Allowed values: default_on default_off never_on always_on
duo_remote_flows_availability

Enable GitLab Duo remote flows for this group

boolean
nullable
duo_foundational_flows_availability

Enable GitLab foundational Duo flows for this group

boolean
nullable
duo_custom_agents_availability

Enable GitLab Duo custom agents for this group

boolean
nullable
duo_custom_flows_availability

Enable GitLab Duo custom flows for this group

boolean
nullable
duo_external_agents_availability

Enable GitLab Duo external agents for this group

boolean
nullable
tool_approval_for_session_availability

Tool approval for session availability. One of default_on, default_off or never_on

string
nullable
Allowed values: default_on default_off never_on
amazon_q_auto_review_enabled

Enable Amazon Q auto review for merge request

boolean
nullable
experiment_features_enabled

Enable experiment features for this group

boolean
nullable
model_prompt_cache_enabled

Enable model prompt cache for this group

boolean
nullable
foundational_agents_statuses

Whether each foundational agent has been enabled or disabled.

Array<object>
nullable
object
reference
required

Reference of the foundational agent.

string
nullable
enabled
required

Whether foundational agent has been enabled or disabled.

boolean
nullable
ai_settings_attributes

AI-related settings

object
duo_agent_platform_enabled

Whether Duo Agent Platform features are enabled

boolean
nullable
duo_workflow_mcp_enabled

Enable MCP support for Duo Agent Platform

boolean
nullable
ai_usage_data_collection_enabled

Enable AI usage data collection for this namespace

boolean
nullable
ai_catalog_restricted_to_group_hierarchy

Restrict the AI Catalog to items within this top-level group hierarchy

boolean
nullable
foundational_agents_default_enabled

Whether new foundational agents are enabled by default

boolean
nullable
prompt_injection_protection_level

Prompt injection protection level. One of no_checks, log_only or interrupt

string
nullable
Allowed values: no_checks log_only interrupt
include_recommended_allowed

Whether to include recommended domains in the network access allowlist

boolean
nullable
allow_all_unix_sockets

Whether to allow all Unix sockets for network access

boolean
nullable
allow_project_extension

Whether to allow projects to extend the network access domain allowlist

boolean
nullable
minimum_access_level_execute

The minimum access level required to execute Duo Agent Platform. This field is behind a feature flag.

integer
nullable
Allowed values: 10 15 20 30 40 50
minimum_access_level_execute_async

The minimum access level required to execute Duo Agent Platform features in CI/CD. This field is behind a feature flag.

integer
nullable
Allowed values: 30 40 50
minimum_access_level_manage

The minimum access level required to manage Duo Agent Platform. This field is behind a feature flag.

integer
nullable
Allowed values: 30 40 50
minimum_access_level_enable_on_projects

The minimum access level required to enable Duo Agent Platform. This field is behind a feature flag.

integer
nullable
Allowed values: 30 40 50

Created

Media type application/json
object
id
integer format: int64
web_url
string
name
string
path
string
description
string
visibility
string
share_with_group_lock
boolean
require_two_factor_authentication
boolean
two_factor_grace_period
integer
project_creation_level
string
auto_devops_enabled
string
subgroup_creation_level
string
emails_disabled
boolean
emails_enabled
boolean
show_diff_preview_in_email
boolean
mentions_disabled
string
lfs_enabled
boolean
archived
boolean
math_rendering_limits_enabled
boolean
lock_math_rendering_limits_enabled
boolean
crm_enabled
boolean
resource_access_token_notify_inherited
boolean
lock_resource_access_token_notify_inherited
boolean
default_branch
string
default_branch_protection
integer
default_branch_protection_defaults
string
avatar_url
string
request_access_enabled
boolean
full_name
string
full_path
string
created_at
string
parent_id
string
organization_id
integer format: int64
shared_runners_setting
string
max_artifacts_size
integer
custom_attributes
object
key
string
value
string
statistics
string
marked_for_deletion_on
string
root_storage_statistics
object
build_artifacts_size

CI artifacts size in bytes.

integer
container_registry_size

Container registry size in bytes.

integer
container_registry_size_is_estimated

Indicates whether the deduplicated container registry size for the namespace is an estimated value or not.

boolean
dependency_proxy_size

Dependency Proxy sizes in bytes.

integer
lfs_objects_size

LFS objects size in bytes.

integer
packages_size

Packages size in bytes.

integer
pipeline_artifacts_size

CI pipeline artifacts size in bytes.

integer
repository_size

Git repository size in bytes.

integer
snippets_size

Snippets size in bytes.

integer
storage_size

Total storage in bytes.

integer
uploads_size

Uploads size in bytes.

integer
wiki_size

Wiki size in bytes.

integer
ldap_cn
string
ldap_access
string
ldap_group_links
object
cn
string
group_access
integer
provider
string
filter
string
member_role_id
integer format: int64
saml_group_links
object
name
string
access_level
integer
member_role_id
integer format: int64
provider
string
file_template_project_id
string
wiki_access_level
string
repository_storage
string
duo_core_features_enabled

[Experimental] Indicates whether GitLab Duo Core features are enabled for the group

boolean
duo_features_enabled
string
lock_duo_features_enabled
string
auto_duo_code_review_enabled
string
web_based_commit_signing_enabled
string
allow_personal_snippets
string
duo_namespace_access_rules
string
built_in_project_templates_enabled
boolean
lock_built_in_project_templates_enabled
boolean
Example
{
"web_url": "http://gitlab.example.com/groups/diaspora",
"name": "Diaspora",
"custom_attributes": {
"key": "foo",
"value": "bar"
},
"ldap_group_links": {
"cn": "ldap-group-1",
"group_access": 10,
"provider": "ldapmain",
"filter": "id >= 500",
"member_role_id": 12
},
"saml_group_links": {
"name": "saml-group-1",
"access_level": 40,
"member_role_id": 12,
"provider": "saml"
}
}

Bad Request