Flags
Manage flags
Return the list of the flags of the account
Prefix the token with 'Bearer ' to indicate it is a bearer token
The ID of the account
Index of the page
0Number of items per page
10Success
Returns the number of items in the current page
Returns the number of the current page
0Returns the number of total items
Returns the number of items per page
10Returns the index of the page
Not Found
GET /v1/accounts/{account_id}/flags HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Accept: */*
{
"current_item_count": 1,
"current_page": 0,
"total_count": 1,
"items_per_page": 10,
"last_page": 1,
"items": [
{
"id": "text",
"name": "text",
"description": "text",
"type": "string",
"source": "manual",
"default_value": "text",
"created_at": "2026-01-01T00:00:00.000Z"
}
]
}Create one/multiple flag(s)
Prefix the token with 'Bearer ' to indicate it is a bearer token
The ID of the account
ID of the flag
Name of the flag
Description of the flag
Type of the flag
Source of the flag
Default value of the flag (default value is only supported for string type)
Creation date of the flag
Created
ID of the flag
Name of the flag
Description of the flag
Type of the flag
Source of the flag
Default value of the flag (default value is only supported for string type)
Creation date of the flag
Validation errors
POST /v1/accounts/{account_id}/flags HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 197
{
"flags": [
{
"name": "text",
"description": "text",
"type": "string",
"source": "manual",
"default_value": "text"
}
],
"name": "text",
"description": "text",
"type": "string",
"source": "manual",
"default_value": "text"
}{
"id": "text",
"name": "text",
"description": "text",
"type": "string",
"source": "manual",
"default_value": "text",
"created_at": "2026-01-01T00:00:00.000Z"
}Return the list of the flag usages of the account
Prefix the token with 'Bearer ' to indicate it is a bearer token
The ID of the account
Index of the page
0Number of items per page
10Success
Returns the number of items in the current page
Returns the number of the current page
0Returns the number of total items
Returns the number of items per page
10Returns the index of the page
Not Found
GET /v1/accounts/{account_id}/flags/usage HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Accept: */*
{
"current_item_count": 1,
"current_page": 0,
"total_count": 1,
"items_per_page": 10,
"last_page": 1,
"items": [
{
"id": "text",
"flagKey": "text",
"filePath": "text",
"lineNumber": "text",
"codeLineHighlight": "text",
"code": "text"
}
]
}Return one flag key by its id
Prefix the token with 'Bearer ' to indicate it is a bearer token
The ID of the account
The ID of the flag
Success
ID of the flag
Name of the flag
Description of the flag
Type of the flag
Source of the flag
Default value of the flag (default value is only supported for string type)
Creation date of the flag
Not Found
GET /v1/accounts/{account_id}/flags/{flag_id} HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Accept: */*
{
"id": "text",
"name": "text",
"description": "text",
"type": "string",
"source": "manual",
"default_value": "text",
"created_at": "2026-01-01T00:00:00.000Z"
}Delete a flag by its id.
Prefix the token with 'Bearer ' to indicate it is a bearer token
The ID of the account
The ID of the flag
Deleted
No content
Not Found
DELETE /v1/accounts/{account_id}/flags/{flag_id} HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Accept: */*
No content
Update flag informations - You can set only the properies you want to update in the request body.
Prefix the token with 'Bearer ' to indicate it is a bearer token
The ID of the account
The ID of the flag
ID of the flag
Name of the flag
Description of the flag
Type of the flag
Source of the flag
Default value of the flag (default value is only supported for string type)
Creation date of the flag
Updated
ID of the flag
Name of the flag
Description of the flag
Type of the flag
Source of the flag
Default value of the flag (default value is only supported for string type)
Creation date of the flag
Validation errors
PATCH /v1/accounts/{account_id}/flags/{flag_id} HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 93
{
"name": "text",
"description": "text",
"type": "string",
"source": "manual",
"default_value": "text"
}{
"id": "text",
"name": "text",
"description": "text",
"type": "string",
"source": "manual",
"default_value": "text",
"created_at": "2026-01-01T00:00:00.000Z"
}Return the list of the flag usages of the account environment
Prefix the token with 'Bearer ' to indicate it is a bearer token
The ID of the account
The ID of the environment
Index of the page
0Number of items per page
10Success
Returns the number of items in the current page
Returns the number of the current page
0Returns the number of total items
Returns the number of items per page
10Returns the index of the page
Not Found
GET /v1/accounts/{account_id}/account_environments/{account_environment_id}/flags_usage HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Accept: */*
{
"current_item_count": 1,
"current_page": 0,
"total_count": 1,
"items_per_page": 10,
"last_page": 1,
"items": [
{
"id": "text",
"flagKey": "text",
"filePath": "text",
"lineNumber": "text",
"codeLineHighlight": "text",
"code": "text"
}
]
}Update flag usages
Prefix the token with 'Bearer ' to indicate it is a bearer token
The ID of the account
The ID of the environment
Git repository url of the flag usage (in client client)
Git branch of the flag usage (in client client)
Created
No content
Validation errors
POST /v1/accounts/{account_id}/account_environments/{account_environment_id}/flags_usage HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 160
[
{
"repositoryUrl": "text",
"repositoryBranch": "text",
"flags": [
{
"flagKey": "text",
"filePath": "text",
"lineNumber": "text",
"codeLineHighlight": "text",
"code": "text"
}
]
}
]No content
Return list of flag usages key by its key
Prefix the token with 'Bearer ' to indicate it is a bearer token
The ID of the account
The ID of the environment
The key of the flag
Success
Returns the number of items in the current page
Returns the number of the current page
0Returns the number of total items
Returns the number of items per page
10Returns the index of the page
Not Found
GET /v1/accounts/{account_id}/account_environments/{account_environment_id}/flags_usage/{flag_key} HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Accept: */*
{
"current_item_count": 1,
"current_page": 0,
"total_count": 1,
"items_per_page": 10,
"last_page": 1,
"items": [
{
"id": "text",
"flagKey": "text",
"filePath": "text",
"lineNumber": "text",
"codeLineHighlight": "text",
"code": "text"
}
]
}Last updated
Was this helpful?

