HTTP API
Not using Node? No problem. The library is a fairly thin wrapper around a small HTTP API, and you can call that from anything that speaks HTTP.
There are libraries for more languages on the way. Until then, this page has everything you need.
The basics
- Base URL:
https://api.dev-team-tools.com - Auth: send your API key as a bearer token:
Authorization: Bearer fs_srv_… - Bodies: JSON in, JSON out.
Every key belongs to one environment, so you never name the environment in a request.
Which endpoint?
There are two ways to get answers, and which one you want depends on where your code runs:
- On a server, download the rules with
GET /sdk/v1/configand work out the answers yourself. It's quick, and checks don't need the network. It's a little more work to build, though. - Anywhere else (or if you'd rather keep things simple), ask for the answers with
POST /sdk/v1/evaluate. It works with either kind of key.
Errors
| Status | Meaning |
|---|---|
400 |
The body isn't right. The response says what's wrong |
401 |
No Authorization header |
403 |
The key is malformed, unknown, or revoked (or it's a client key on /config) |
503 |
The environment's switches haven't been published yet. This only happens for a few minutes after an environment is created |
Whatever you build, please make sure a failed request never breaks your app. Keep using the last answers you had, or fall back to a sensible default (usually off).
GET /sdk/v1/key
Checks a key works, and tells you what it belongs to. Handy for a health check, or when you're setting things up and want to make sure you've pasted the right key.
curl https://api.dev-team-tools.com/sdk/v1/key \ -H "Authorization: Bearer fs_srv_…"
{ "keyId": "8f0c…", "workspaceId": "1b2e…", "environmentId": "c4d1…", "kind": "server"}
POST /sdk/v1/evaluate
Works out the answers for one context. Either kind of key.
curl -X POST https://api.dev-team-tools.com/sdk/v1/evaluate \ -H "Authorization: Bearer fs_cli_…" \ -H "Content-Type: application/json" \ -d '{ "context": { "userId": "u_123", "plan": "pro" } }'
{ "version": 12, "etag": "\"12-3f9a0c1b2d4e5f60\"", "switches": { "newCheckout": { "value": true, "reason": "RULE_MATCH", "ruleId": "5e1a…" }, "newSearch": { "value": false, "reason": "DEFAULT" } }}
The body takes:
context(required): who the answers are for.userIdis required, and the rest is up to you. Values can be strings, numbers, booleans, or lists of strings. Up to 50 attributes, strings up to 1,000 characters, lists up to 100 items.keys(optional): only work out these switches, up to 500 of them. Leave it out to get every switch in the environment. Keys that don't exist are left out of the response.
Each switch comes back with a value and a reason:
reason |
Meaning |
|---|---|
RULE_MATCH |
A rule with a fixed value matched. ruleId says which |
ROLLOUT |
A percentage rollout matched, and value says whether this context is in it |
DEFAULT |
No rule matched, so the environment's default was used |
Polling without re-downloading everything
If you're checking for changes regularly, send the last etag back as If-None-Match. When neither the switches nor your context have changed, you get an empty 304 Not Modified instead of the whole lot.
curl -X POST https://api.dev-team-tools.com/sdk/v1/evaluate \ -H "Authorization: Bearer fs_cli_…" \ -H "Content-Type: application/json" \ -H 'If-None-Match: "12-3f9a0c1b2d4e5f60"' \ -d '{ "context": { "userId": "u_123", "plan": "pro" } }'
The etag is in the body as well as the ETag header, because browsers can't read that header across origins. (A small but irritating detail.)
GET /sdk/v1/config
Downloads the environment's switches and rules, so you can work out answers in your own code. Server keys only. Client keys get a 403, because rules may list other people's ids.
curl https://api.dev-team-tools.com/sdk/v1/config \ -H "Authorization: Bearer fs_srv_…"
{ "environmentId": "c4d1…", "workspaceId": "1b2e…", "version": 12, "publishedAt": "2026-11-14T10:21:07.000Z", "switches": { "newCheckout": { "key": "newCheckout", "salt": "k3f9…", "defaultValue": false, "rules": [ { "id": "5e1a…", "conditions": [ { "attribute": "email", "operator": "endsWith", "values": ["@my-company.com"] } ], "serve": { "type": "value", "value": true } }, { "id": "9b77…", "conditions": [], "serve": { "type": "rollout", "basisPoints": 1000, "bucketBy": "userId" } } ] } }}
Send the ETag header back as If-None-Match and you'll get a 304 until something changes. The Node library polls this every 30 seconds, which seems to be a happy middle ground.
Working out an answer
For each switch:
- Go through
rulesin order. A rule matches when all of itsconditionsmatch. A rule with no conditions matches everything. - The first rule that matches decides:
{ "type": "value" }serves itsvalue.{ "type": "rollout" }servestrueif the context is inside the rollout (see below), otherwisefalse.
- If no rule matches, serve
defaultValue.
A condition matches like this:
- If the context doesn't have the
attributeat all, it never matches, whatever the operator. existsmatches as long as the attribute is there.- If the context value is a list, the condition matches if any item does.
isNotOneOfis the exception: it matches only if no item is one of the values. isOneOfandisNotOneOfcompare the value (as a string) exactly againstvalues.contains,startsWithandendsWithmatch if the value does so for any ofvalues. They're case-sensitive.gt,gte,ltandltecompare the value as a number againstvalues[0]. If either isn't a number, it doesn't match. Booleans and empty strings aren't numbers.
Rollouts
A rollout's basisPoints is the percentage in hundredths of a percent, so 1000 is 10%. To check whether a context is inside it:
- Look up the
bucketByattribute in the context. If it's missing, or it's a list, the context is outside the rollout. - Take the MurmurHash3 (x86, 32-bit, seed
0) of the UTF-8 bytes of"{salt}:{value}", using the switch'ssalt. Numbers and booleans are turned into strings first, so42becomes"42". - The bucket is that hash (as an unsigned integer) modulo
10000. - The context is inside the rollout when
bucket < basisPoints.
Do it exactly like this, and you'll get the same answers as the Node library and /evaluate. That matters if you've got a mix of services and you want a user to see the same thing everywhere.
POST /sdk/v1/contexts
Optional, but nice to have. If you work answers out yourself, Dev Team Tools never sees your contexts, so the rule editor can't suggest attributes. This endpoint lets you tell it what you've seen.
curl -X POST https://api.dev-team-tools.com/sdk/v1/contexts \ -H "Authorization: Bearer fs_srv_…" \ -H "Content-Type: application/json" \ -d '{ "attributes": { "userId": ["u_1", "u_2"], "companyId": ["42"] } }'
It answers 202 Accepted. Send it about once a minute at most, with a small sample of values for each attribute (the Node library sends up to 20). Leave out anything you'd rather not share, like email addresses.