Context
[BETA] Create a context field
[BETA] This API is in beta state, which means it may change or be removed in the future.
Endpoint that allows creation of custom context fields
post/api/admin/projects/{projectId}/context
Path parameters
projectIdstring required
Request body
Example request
{
"description": "The user's subscription tier",
"sortOrder": 2,
"legalValues": [
{
"value": "gold"
},
{
"value": "silver"
},
{
"value": "crystal"
}
],
"project": "my-project",
"name": "subscriptionTier"
}Response
The resource was successfully created.
Example response
{
"name": "userId",
"description": "Used to uniquely identify users",
"stickiness": true,
"sortOrder": 900,
"createdAt": "2023-06-29T10:19:00.000Z",
"usedInFeatures": 3,
"usedInProjects": 2,
"legalValues": [
{
"value": "#c154c1",
"description": "Deep fuchsia"
}
],
"project": "my-project"
}