Skip to Content

Base URL

https://api.canarygate.io/api/v1

List flags

GET /flags

Returns all flags for the environment associated with the API Key.

Response 200

[ { "key": "new-checkout", "type": "boolean", "enabled": true, "description": "New checkout flow" }, { "key": "new-dashboard", "type": "rollout", "enabled": false, "percentage": 25, "description": null } ]

Get flag

GET /flags/:key

Response 200

{ "key": "new-checkout", "type": "boolean", "enabled": true, "description": "New checkout flow" }

Response 404

{ "error": "NOT_FOUND", "message": "Flag 'new-checkout' not found" }

Create flag

POST /flags

Body

{ "key": "new-feature", "type": "boolean", "description": "My new feature" }
FieldTypeRequired
keystringYes
type'boolean' | 'rollout'Yes
descriptionstringNo

Response 201

{ "key": "new-feature", "type": "boolean", "enabled": false, "description": "My new feature" }

Update flag

PATCH /flags/:key

Body (optional fields)

{ "enabled": true, "percentage": 50, "description": "Updated description" }

Response 200 — returns the updated flag.

Delete flag

DELETE /flags/:key

Response 204 — no body.

Last updated on