API Reference

Describes the REST API that allows clients to manage and update apps, flags and related entities.

List of applications

get

Retrieve all accessible applications

Authorizations
AuthorizationstringRequired

API key authentication, for service access

Query parameters
orgIdstring · min: 1Optional

Organization identifier

Responses
200

Requested resource retrieved successfully

application/json
get
/apps
GET /api/apps HTTP/1.1
Host: app.reflag.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "org": {
        "id": "text",
        "name": "text"
      },
      "id": "text",
      "name": "text",
      "demo": true,
      "flagKeyFormat": "custom",
      "environments": [
        {
          "id": "text",
          "name": "text",
          "isProduction": true,
          "order": 1
        }
      ],
      "stages": [
        {
          "id": "text",
          "name": "text",
          "color": "text",
          "assignedFlagCount": 1,
          "order": 1
        }
      ],
      "segments": [
        {
          "id": "text",
          "name": "text",
          "type": "all"
        }
      ]
    }
  ]
}

Get details of an application

get

Retrieve a specific application by its identifier

Authorizations
AuthorizationstringRequired

API key authentication, for service access

Path parameters
appIdstring · min: 1Required

App identifier

Query parameters
Responses
200

Requested resource retrieved successfully

application/json
get
/apps/{appId}
GET /api/apps/{appId} HTTP/1.1
Host: app.reflag.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "org": {
    "id": "text",
    "name": "text"
  },
  "id": "text",
  "name": "text",
  "demo": true,
  "flagKeyFormat": "custom",
  "environments": [
    {
      "id": "text",
      "name": "text",
      "isProduction": true,
      "order": 1
    }
  ],
  "stages": [
    {
      "id": "text",
      "name": "text",
      "color": "text",
      "assignedFlagCount": 1,
      "order": 1
    }
  ],
  "segments": [
    {
      "id": "text",
      "name": "text",
      "type": "all"
    }
  ]
}

List flags for application

get

Retrieve all flags for a specific application

Authorizations
AuthorizationstringRequired

API key authentication, for service access

Path parameters
appIdstring · min: 1Required

App identifier

Responses
200

Requested resource retrieved successfully

application/json
get
/apps/{appId}/flags
GET /api/apps/{appId}/flags HTTP/1.1
Host: app.reflag.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "key": "text",
      "name": "text",
      "description": "text",
      "permanent": true,
      "archived": true,
      "stage": {
        "id": "text",
        "name": "text",
        "color": "text",
        "assignedFlagCount": 1,
        "order": 1
      },
      "owner": {
        "id": "text",
        "name": "text",
        "email": "[email protected]",
        "avatarUrl": "https://example.com"
      }
    }
  ]
}

Get flag targeting for an environment

get

Retrieve targeting for a flag in an environment

Authorizations
AuthorizationstringRequired

API key authentication, for service access

Path parameters
appIdstring · min: 1Required

App identifier

flagKeystring · min: 1Required

Unique flag key

envIdstring · min: 1Required

Environment identifier

Responses
200

Requested resource retrieved successfully

application/json
get
/apps/{appId}/flags/{flagKey}/targeting/{envId}
GET /api/apps/{appId}/flags/{flagKey}/targeting/{envId} HTTP/1.1
Host: app.reflag.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "flagKey": "text",
  "version": 1,
  "updatedAt": "2025-12-07T02:27:23.307Z",
  "specificTargets": {
    "ANY_ADDITIONAL_PROPERTY": {
      "companyIds": [
        "text"
      ],
      "userIds": [
        "text"
      ]
    }
  }
}

Update flag specific targets for an environment

patch

Update specific companies and users for flags in an environment

Authorizations
AuthorizationstringRequired

API key authentication, for service access

Path parameters
appIdstring · min: 1Required

App identifier

envIdstring · min: 1Required

Environment identifier

Body

Update the explicit value of multiple flags for a given audience

notificationsbooleanOptional

Whether to send notifications about the change to configured integration (eg. Slack, Linear, etc). Defaults to true.

Default: true
changeDescriptionstringOptional

The description of the change recorded in the change history

Responses
200

Requested resource retrieved successfully

application/json
patch
/apps/{appId}/flags/specific-targets/{envId}
PATCH /api/apps/{appId}/flags/specific-targets/{envId} HTTP/1.1
Host: app.reflag.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 130

{
  "updates": [
    {
      "flagKey": "text",
      "value": "text",
      "companyId": "text",
      "userId": "text"
    }
  ],
  "notifications": true,
  "changeDescription": "text"
}
{
  "data": [
    {
      "flagKey": "text",
      "version": 1,
      "updatedAt": "2025-12-07T02:27:23.307Z",
      "specificTargets": {
        "ANY_ADDITIONAL_PROPERTY": {
          "companyIds": [
            "text"
          ],
          "userIds": [
            "text"
          ]
        }
      }
    }
  ]
}

Last updated

Was this helpful?