Download OpenAPI specification:
Feature flagging and A/B experimentation API following the JSON:API specification.
All endpoints require a project-specific Bearer token supplied in the Authorization header.
You can generate the token by visiting the project settings page in you FlagPal dashboard.
Content-Type: application/vnd.api+json.filter[field]=value or filter[field][]=value1&filter[field][]=value2 for arrays.page[number] and page[size].- for descending (e.g. sort=-created_at,name).fields[type]=field1,field2.include=relationship1,relationship2.Returns a paginated collection of feature flags scoped to the authenticated project.
| filter[id][] | Array of strings Filter by one or more ULIDs. |
| filter[name][] | Array of strings Example: filter[name][]=dark-mode Filter by one or more feature names. |
| filter[kind][] | Array of strings Items Enum: "string" "integer" "boolean" "array" "date" Filter by one or more feature kinds. |
| sort | string Example: sort=name Comma-separated sort fields. Sortable: |
| page[number] | integer >= 1 Default: 1 |
| page[size] | integer [ 1 .. 1000 ] Default: 1000 |
| fields[features] | string Example: fields[features]=name,kind Comma-separated list of attributes to return (sparse fieldsets). |
{- "data": [
- {
- "type": "features",
- "id": "01HQ5Z2K3VF9A8BPXTNEC7RD4M",
- "attributes": {
- "name": "dark-mode",
- "description": "Enables the dark colour scheme.",
- "kind": "boolean",
- "rules": [
- {
- "rule": "equals",
- "value": true
}
], - "created_at": "2024-01-15T10:30:00.000000Z",
- "updated_at": "2024-06-01T08:00:00.000000Z"
},
}
], - "links": {
}, - "meta": {
- "page": {
- "currentPage": 1,
- "from": 1,
- "lastPage": 3,
- "perPage": 100,
- "to": 100,
- "total": 250
}
}
}| id required | string (Ulid) Example: 01HQ5Z2K3VF9A8BPXTNEC7RD4M Feature ULID. |
| fields[features] | string Comma-separated list of attributes to return. |
{- "data": {
- "type": "features",
- "id": "01HQ5Z2K3VF9A8BPXTNEC7RD4M",
- "attributes": {
- "name": "dark-mode",
- "description": "Enables the dark colour scheme.",
- "kind": "boolean",
- "rules": [
- {
- "rule": "equals",
- "value": true
}
], - "created_at": "2024-01-15T10:30:00.000000Z",
- "updated_at": "2024-06-01T08:00:00.000000Z"
},
}
}Funnels split traffic into variants (feature sets). A funnel can be an experience (feature flag rollout) or an experiment (A/B test).
Returns a paginated collection of funnels (experiences and experiments) scoped to the authenticated project.
Default sort order is kind, -weight.
| filter[id][] | Array of strings Filter by one or more ULIDs. |
| filter[active] | boolean Example: filter[active]=true Filter by active status. |
| filter[kind] | string Enum: "experience" "experiment" Example: filter[kind]=experiment Filter by funnel kind. |
| sort | string Example: sort=kind,-weight Comma-separated sort fields. Sortable: |
| page[number] | integer >= 1 Default: 1 |
| page[size] | integer [ 1 .. 1000 ] Default: 1000 |
| include | string Example: include=featureSets,metrics Comma-separated relationships to sideload. Supports |
| fields[funnels] | string Comma-separated list of funnel attributes to return. |
| fields[feature-sets] | string Comma-separated list of feature-set attributes to return (when using |
| fields[metrics] | string Comma-separated list of metric attributes to return (when using |
{- "data": [
- {
- "type": "funnels",
- "id": "01HQ5Z2K3VF9A8BPXTNEC7RD4M",
- "attributes": {
- "active": true,
- "kind": "experiment",
- "weight": 100,
- "percent": 50,
- "name": "Dark Mode Theme",
- "description": "Hypothesis - Dark Mode theme increases conversion rate.",
- "rules": [
- {
- "feature": "dark-mode",
- "rule": "equals",
- "value": null
}
], - "created_at": "2024-01-15T10:30:00.000000Z",
- "updated_at": "2024-06-01T08:00:00.000000Z"
}, - "relationships": {
- "featureSets": {
- "data": [
- {
- "type": "string",
- "id": "string"
}
],
}, - "metrics": {
- "data": [
- {
- "type": "string",
- "id": "string"
}
],
}
},
}
], - "links": {
}, - "meta": {
- "page": {
- "currentPage": 1,
- "from": 1,
- "lastPage": 3,
- "perPage": 100,
- "to": 100,
- "total": 250
}
}, - "included": [
- {
- "type": "feature-sets",
- "id": "01HQ5Z2K3VF9A8BPXTNEC7RD4M",
- "attributes": {
- "name": "Dark Mode Enabled",
- "weight": 50,
- "features": {
- "dark-mode": true,
- "button-color": "blue"
}, - "created_at": "2024-01-15T10:30:00.000000Z",
- "updated_at": "2024-06-01T08:00:00.000000Z"
}, - "relationships": {
- "funnel": {
- "data": {
- "type": "string",
- "id": "string"
},
}
},
}
]
}| id required | string (Ulid) Example: 01HQ5Z2K3VF9A8BPXTNEC7RD4M Funnel ULID. |
| include | string Example: include=featureSets,metrics Comma-separated relationships to sideload. Supports |
| fields[funnels] | string |
| fields[feature-sets] | string |
| fields[metrics] | string |
{- "data": {
- "type": "funnels",
- "id": "01HQ5Z2K3VF9A8BPXTNEC7RD4M",
- "attributes": {
- "active": true,
- "kind": "experiment",
- "weight": 100,
- "percent": 50,
- "name": "Dark Mode Theme",
- "description": "Hypothesis - Dark Mode theme increases conversion rate.",
- "rules": [
- {
- "feature": "dark-mode",
- "rule": "equals",
- "value": null
}
], - "created_at": "2024-01-15T10:30:00.000000Z",
- "updated_at": "2024-06-01T08:00:00.000000Z"
}, - "relationships": {
- "featureSets": {
- "data": [
- {
- "type": "string",
- "id": "string"
}
],
}, - "metrics": {
- "data": [
- {
- "type": "string",
- "id": "string"
}
],
}
},
}, - "included": [
- {
- "type": "feature-sets",
- "id": "01HQ5Z2K3VF9A8BPXTNEC7RD4M",
- "attributes": {
- "name": "Dark Mode Enabled",
- "weight": 50,
- "features": {
- "dark-mode": true,
- "button-color": "blue"
}, - "created_at": "2024-01-15T10:30:00.000000Z",
- "updated_at": "2024-06-01T08:00:00.000000Z"
}, - "relationships": {
- "funnel": {
- "data": {
- "type": "string",
- "id": "string"
},
}
},
}
]
}Returns the collection of variants (feature sets) that belong to a funnel.
| id required | string (Ulid) Example: 01HQ5Z2K3VF9A8BPXTNEC7RD4M Funnel ULID. |
{- "data": [
- {
- "type": "feature-sets",
- "id": "01HQ5Z2K3VF9A8BPXTNEC7RD4M",
- "attributes": {
- "name": "Dark Mode Enabled",
- "weight": 50,
- "features": {
- "dark-mode": true,
- "button-color": "blue"
}, - "created_at": "2024-01-15T10:30:00.000000Z",
- "updated_at": "2024-06-01T08:00:00.000000Z"
}, - "relationships": {
- "funnel": {
- "data": {
- "type": "string",
- "id": "string"
},
}
},
}
]
}Returns only the resource identifiers for the funnel's feature-sets relationship.
| id required | string (Ulid) Example: 01HQ5Z2K3VF9A8BPXTNEC7RD4M Funnel ULID. |
{- "data": [
- {
- "type": "string",
- "id": "string"
}
],
}Returns the metrics tracked for an experiment funnel.
| id required | string (Ulid) Example: 01HQ5Z2K3VF9A8BPXTNEC7RD4M Funnel ULID. |
{- "data": [
- {
- "type": "metrics",
- "id": "01HQ5Z2K3VF9A8BPXTNEC7RD4M",
- "attributes": {
- "kind": "count",
- "name": "Checkout Conversions",
- "description": "Number of completed checkouts."
},
}
]
}Returns only the resource identifiers for the funnel's metrics relationship.
| id required | string (Ulid) Example: 01HQ5Z2K3VF9A8BPXTNEC7RD4M Funnel ULID. |
{- "data": [
- {
- "type": "string",
- "id": "string"
}
],
}Variants within a funnel, each with a set of feature flag values. Feature sets can have custom traffic weight.
Returns the collection of variants (feature sets) that belong to a funnel.
| id required | string (Ulid) Example: 01HQ5Z2K3VF9A8BPXTNEC7RD4M Funnel ULID. |
{- "data": [
- {
- "type": "feature-sets",
- "id": "01HQ5Z2K3VF9A8BPXTNEC7RD4M",
- "attributes": {
- "name": "Dark Mode Enabled",
- "weight": 50,
- "features": {
- "dark-mode": true,
- "button-color": "blue"
}, - "created_at": "2024-01-15T10:30:00.000000Z",
- "updated_at": "2024-06-01T08:00:00.000000Z"
}, - "relationships": {
- "funnel": {
- "data": {
- "type": "string",
- "id": "string"
},
}
},
}
]
}Returns the metrics tracked for an experiment funnel.
| id required | string (Ulid) Example: 01HQ5Z2K3VF9A8BPXTNEC7RD4M Funnel ULID. |
{- "data": [
- {
- "type": "metrics",
- "id": "01HQ5Z2K3VF9A8BPXTNEC7RD4M",
- "attributes": {
- "kind": "count",
- "name": "Checkout Conversions",
- "description": "Number of completed checkouts."
},
}
]
}Records a metric data point for a specific feature set variant in an experiment.
Processing is asynchronous — returns 202 Accepted immediately; the value is written in the background.
Constraints:
metric must be attached to the experiment that owns the featureSet.metric and featureSet must belong to the authenticated project.required | object |
{- "data": {
- "type": "metric-time-series",
- "attributes": {
- "time_segment": "2024-06-01T12:00:00Z",
- "value": 42
}, - "relationships": {
- "metric": {
- "data": {
- "type": "metrics",
- "id": "01HQ5Z2K3VF9A8BPXTNEC7RD4M"
}
}, - "featureSet": {
- "data": {
- "type": "feature-sets",
- "id": "01HR7Y4MNPXE2CQVB8DFGJW93K"
}
}
}
}
}{- "data": [
- null
], - "meta": {
- "message": "The metric value will be recorded asynchronously."
}
}Creates a new actor or updates an existing actor's feature flag assignments (upsert).
id (e.g. a user ID, session token) to upsert by a stable reference.id is omitted, a ULID is auto-generated and a new actor is always created.features map uses feature names as keys. Unknown feature names are silently ignored.Returns 201 Created when a new actor is created, 200 OK when an existing actor is updated.
required | object |
{- "data": {
- "type": "actors",
- "id": "user_12345",
- "attributes": {
- "features": {
- "dark-mode": true,
- "max-items": 10
}
}
}
}{- "data": {
- "type": "actors",
- "id": "user_12345",
- "attributes": {
- "features": {
- "dark-mode": true,
- "max-items": 10
}, - "created_at": "2024-03-10T09:00:00.000000Z",
- "updated_at": "2024-06-01T08:00:00.000000Z"
},
}
}Returns an actor and their current feature flag assignments.
| id required | string Example: user_12345 The actor's reference identifier. |
{- "data": {
- "type": "actors",
- "id": "user_12345",
- "attributes": {
- "features": {
- "dark-mode": true,
- "max-items": 10
}, - "created_at": "2024-03-10T09:00:00.000000Z",
- "updated_at": "2024-06-01T08:00:00.000000Z"
},
}
}