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
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
        }
      ]
    }
  ]
}

Get details of an application

get

Retrieve a specific application by its identifier

Authorizations
Path parameters
appIdstring · min: 1Required

App identifier

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
    }
  ]
}

List flags for application

get

Retrieve all flags for a specific application

Authorizations
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",
        "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
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-10-22T17:12:26.430Z",
  "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
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-10-22T17:12:26.430Z",
      "specificTargets": {
        "ANY_ADDITIONAL_PROPERTY": {
          "companyIds": [
            "text"
          ],
          "userIds": [
            "text"
          ]
        }
      }
    }
  ]
}

Last updated

Was this helpful?