Read the caller's experiment assignment for a target
Returns the running experiment registered against the given target key together with the variant this user or workspace is bucketed into, or a null assignment when no running experiment matches. Requires a Clerk session with a synced profile and read access to the workspace. Bucketing is deterministic per subject, so repeated calls return the same variant.
Authorization
apiKey Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/workspaces/string/product-controls/experiments/string"{ "data": { "targetKey": "string", "assignment": { "experimentId": "string", "experimentName": "string", "targetType": "flag", "targetKey": "string", "assignmentUnit": "workspace", "variantId": "string", "variant": "string" } }}{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}Evaluate a feature flag for the caller
Returns whether the named platform feature flag is on for this user and workspace, taking the flag's status, audience targeting, and percentage rollout into account. Requires a Clerk session with a synced profile — API keys are rejected — and the caller must be able to read the workspace, which is loaded first. An unknown key, or any failure while evaluating, resolves to disabled rather than an error.
Create a surface in a workspace
Creates a page, note, form, dashboard, or canvas surface, registers the matching workspace item under the requested parent folder, and optionally seeds it with an initial block tree. Requires the `surfaces:write` permission in the workspace. Rejects `view` as a kind (views are created on their database) and rejects invalid titles, icons, form or dashboard manifests, and non-UUID block ids as validation errors.