Skip to content

Create a subscription for the namespace

Deprecated
POST
/api/v4/namespaces/{id}/gitlab_subscription

Deprecated in GitLab 17.7

id
required
One of:
string

The ID or URL-encoded path of the namespace

Media typeapplication/json
object
start_date
required

The date when subscription was started

string format: date
nullable
end_date

End date of subscription

string format: date
nullable
plan_code

Subscription tier code

string
nullable
seats

Number of seats in subscription

integer
nullable
max_seats_used

Highest number of active users in the last month

integer
nullable
auto_renew

Whether subscription will auto renew on end date

boolean
nullable
trial

Whether the subscription is a trial

boolean
nullable
trial_ends_on

End date of trial

string format: date
nullable
trial_starts_on

Start date of trial

string format: date
nullable
trial_extension_type

Whether the trial was extended or reactivated

integer
nullable
Examplegenerated
{
"start_date": "2026-04-15",
"end_date": "2026-04-15",
"plan_code": "example",
"seats": 1,
"max_seats_used": 1,
"auto_renew": true,
"trial": true,
"trial_ends_on": "2026-04-15",
"trial_starts_on": "2026-04-15",
"trial_extension_type": 1
}

Created

Media typeapplication/json
object
plan
object
code
string
name
string
trial
boolean
auto_renew
boolean
upgradable
boolean
exclude_guests
boolean
usage
object
seats_in_subscription
integer
seats_in_use
integer
max_seats_used
integer
seats_owed
integer
billing
object
subscription_start_date
string format: date
subscription_end_date
string format: date
trial_ends_on
string format: date
Examplegenerated
{
"plan": {
"code": "example",
"name": "example",
"trial": true,
"auto_renew": true,
"upgradable": true,
"exclude_guests": true
},
"usage": {
"seats_in_subscription": 1,
"seats_in_use": 1,
"max_seats_used": 1,
"seats_owed": 1
},
"billing": {
"subscription_start_date": "2026-04-15",
"subscription_end_date": "2026-04-15",
"trial_ends_on": "2026-04-15"
}
}

Bad Request

Not Found