For the complete documentation index, see llms.txt. This page is also available as Markdown.

Feature Flag

The HTTP API can only be used in a server environment.

You can use the HTTP API to check the Feature Flag Decision result for a user.

Authentication is performed using the SDK Key.

  • Add the SDK Key to the HTTP header as shown below.

  • You can find the SDK Key in the Hackle Dashboard under SDK Integration Info.

X-HACKLE-API-KEY: {YOUR_SERVER_SDK_KEY}

Request

POST https://api.hackle.io/v1/feature-flag

Request Body

Field
Type
Required
Description

featureKey

number

O

Feature Key to evaluate

user

User object

O

User to evaluate

User Object

Field
Type
Required
Description

userId

string

X

User ID (Hackle ID can be used)

deviceId

string

X

Device ID (Hackle ID can be used)

identifiers

object

X

Custom identifier key(string)-value(string) pair

properties

object

X

User Property key(string)-value(string)

Example

Response

200 OK

Returns a 200 response and the decision result for a successful request.

Response Body

Field
Type
Description

isOn

boolean

Decision result (true/false)

reason

string

Decision reason

parameters

object

Parameters configured for the decision result

Example

400 Bad Request

Returns a 400 status for invalid request information.

401 Unauthorized

Returns a 401 status when the X-HACKLE-API-KEY header value is missing or the SDK Key is invalid.

Last updated