/v1/sdk/evaluate
POST
/v1/sdk/evaluate
const url = 'https://eval.featureflip.io/v1/sdk/evaluate';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"flagKey":"example","context":{"userId":"example","attributes":{"additionalProperty":"example"}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://eval.featureflip.io/v1/sdk/evaluate \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "flagKey": "example", "context": { "userId": "example", "attributes": { "additionalProperty": "example" } } }'Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
flagKey
required
string
context
required
object
userId
string
attributes
object
key
additional properties
Examplegenerated
{ "flagKey": "example", "context": { "userId": "example", "attributes": { "additionalProperty": "example" } }}object
flagKey
required
string
context
required
object
userId
string
attributes
object
key
additional properties
Examplegenerated
{ "flagKey": "example", "context": { "userId": "example", "attributes": { "additionalProperty": "example" } }}object
flagKey
required
string
context
required
object
userId
string
attributes
object
key
additional properties
Examplegenerated
{ "flagKey": "example", "context": { "userId": "example", "attributes": { "additionalProperty": "example" } }}Responses
Section titled “Responses”OK
Media typeapplication/json
object
key
required
string
variation
required
string
value
required
reason
required
string
prerequisiteKey
string
Examplegenerated
{ "key": "example", "variation": "example", "value": "example", "reason": "example", "prerequisiteKey": "example"}Unauthorized
Media typeapplication/json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
Media typeapplication/json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}