Flags

Manage flags

Get flags of the account

get

Return the list of the flags of the account

Authorizations
Path parameters
account_idstringRequired

The ID of the account

Query parameters
_pageintegerOptional

Index of the page

Example: 0
_max_per_pageintegerOptional

Number of items per page

Example: 10
Responses
200

Success

application/json
Responseall of
get
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)

post

Create one/multiple flag(s)

Authorizations
Path parameters
account_idstringRequired

The ID of the account

Body
all ofOptional
Responses
201

Created

application/json
post
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"
}

Get flags usages of the account

get

Return the list of the flag usages of the account

Authorizations
Path parameters
account_idstringRequired

The ID of the account

Query parameters
_pageintegerOptional

Index of the page

Example: 0
_max_per_pageintegerOptional

Number of items per page

Example: 10
Responses
200

Success

application/json
Responseall of
get
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"
    }
  ]
}

Get one flag

get

Return one flag key by its id

Authorizations
Path parameters
account_idstringRequired

The ID of the account

flag_idstringRequired

The ID of the flag

Responses
200

Success

application/json
get
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

delete

Delete a flag by its id.

Authorizations
Path parameters
account_idstringRequired

The ID of the account

flag_idstringRequired

The ID of the flag

Responses
204

Deleted

No content

delete
DELETE /v1/accounts/{account_id}/flags/{flag_id} HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Accept: */*

No content

Update a flag

patch

Update flag informations - You can set only the properies you want to update in the request body.

Authorizations
Path parameters
account_idstringRequired

The ID of the account

flag_idstringRequired

The ID of the flag

Body
idstringRead-onlyOptional

ID of the flag

namestringRequired

Name of the flag

descriptionstringRequired

Description of the flag

typestring · enumRequired

Type of the flag

Possible values:
sourcestring · enumRequired

Source of the flag

Possible values:
default_valuestringOptional

Default value of the flag (default value is only supported for string type)

predefined_valuesstring[]Optional

Predefined values of the flag (predefined values are only supported for string type)

created_atstring · date-timeRead-onlyOptional

Creation date of the flag

Responses
200

Updated

application/json
patch
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"
}

Get flag usages of the account environment

get

Return the list of the flag usages of the account environment

Authorizations
Path parameters
account_idstringRequired

The ID of the account

account_environment_idstringRequired

The ID of the environment

Query parameters
_pageintegerOptional

Index of the page

Example: 0
_max_per_pageintegerOptional

Number of items per page

Example: 10
Responses
200

Success

application/json
Responseall of
get
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

post

Update flag usages

Authorizations
Path parameters
account_idstringRequired

The ID of the account

account_environment_idstringRequired

The ID of the environment

Bodyobject[]
repositoryUrlstringOptional

Git repository url of the flag usage (in client client)

repositoryBranchstringOptional

Git branch of the flag usage (in client client)

Responses
201

Created

No content

post
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

Get one flag usage

get

Return list of flag usages key by its key

Authorizations
Path parameters
account_idstringRequired

The ID of the account

account_environment_idstringRequired

The ID of the environment

flag_keystringRequired

The key of the flag

Responses
200

Success

application/json
Responseall of
get
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?