Flags
Manage flags
Return the list of the flags of the account
The ID of the account
Index of the page
0
Number of items per page
10
Success
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",
"predefined_values": [
"text"
],
"created_at": "2025-09-08T13:18:49.624Z"
}
]
}
Create one/multiple flag(s)
The ID of the account
Created
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: 255
{
"flags": [
{
"name": "text",
"description": "text",
"type": "string",
"source": "manual",
"default_value": "text",
"predefined_values": [
"text"
]
}
],
"name": "text",
"description": "text",
"type": "string",
"source": "manual",
"default_value": "text",
"predefined_values": [
"text"
]
}
{
"id": "text",
"name": "text",
"description": "text",
"type": "string",
"source": "manual",
"default_value": "text",
"predefined_values": [
"text"
],
"created_at": "2025-09-08T13:18:49.624Z"
}
Return the list of the flag usages of the account
The ID of the account
Index of the page
0
Number of items per page
10
Success
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",
"flag_key": "text",
"repository": "text",
"file_path": "text",
"branch": "text",
"line": "text",
"code_line_highlight": "text",
"code": "text"
}
]
}
Return one flag key by its id
The ID of the account
The ID of the flag
Success
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",
"predefined_values": [
"text"
],
"created_at": "2025-09-08T13:18:49.624Z"
}
Delete a flag by its id.
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.
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)
Predefined values of the flag (predefined values are only supported for string type)
Creation date of the flag
Updated
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: 122
{
"name": "text",
"description": "text",
"type": "string",
"source": "manual",
"default_value": "text",
"predefined_values": [
"text"
]
}
{
"id": "text",
"name": "text",
"description": "text",
"type": "string",
"source": "manual",
"default_value": "text",
"predefined_values": [
"text"
],
"created_at": "2025-09-08T13:18:49.624Z"
}
Return the list of the flag usages of the account environment
The ID of the account
The ID of the environment
Index of the page
0
Number of items per page
10
Success
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",
"flag_key": "text",
"repository": "text",
"file_path": "text",
"branch": "text",
"line": "text",
"code_line_highlight": "text",
"code": "text"
}
]
}
Update flag usages
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: 194
[
{
"repositoryUrl": "text",
"repositoryBranch": "text",
"flags": [
{
"flag_key": "text",
"repository": "text",
"file_path": "text",
"branch": "text",
"line": "text",
"code_line_highlight": "text",
"code": "text"
}
]
}
]
No content
Return list of flag usages key by its key
The ID of the account
The ID of the environment
The key of the flag
Success
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",
"flag_key": "text",
"repository": "text",
"file_path": "text",
"branch": "text",
"line": "text",
"code_line_highlight": "text",
"code": "text"
}
]
}
Was this helpful?