Beta. STARCO Dev works with synthetic data only: do not send real personal or health data. Every feature shows its real status (Available Beta Beta · in development Coming).

Documentation menu

Quickstart

Your first call in five minutes.

Create an account, verify your email, sign in, create a project and a key, create a synthetic twin, send it one observation, read the recomputed layer and see your calls in the audit chain.

time 5 minyou need curl and jq, or Python 3 with requests; the TypeScript and CLI tabs use the SDK and the command line, which are not published yetdata syntheticstatus Beta
Synthetic data only.The service is a Beta: the requests and answers below are the real contract, and names can still change (the changelog says so when they do). Prefer a form? Sign up in the browser does steps 1 to 3 for you. To try the same flow with no account, open the playground, which simulates it in your browser.
  1. 1Account
  2. 2Project
  3. 3Key
  4. 4Twin
  5. 5Observe
  6. 6Read
  7. 7Audit

STEP 1 Create an account and verify your email Beta#

Read the version of the developer terms in force and accept exactly that version when you sign up; it is stored with your account. Passwords need 12 characters or more and common passwords are refused. Keep yours in the environment variable STARCO_PASSWORD (for example with read -s STARCO_PASSWORD; export STARCO_PASSWORD), so it never appears in a command line or in your code. The curl lines use jq to read the fields they need.

export API="https://api.starco.dev/v1"
V=$(curl -s "$API/terms" | jq -r .version)
curl -s -X POST "$API/accounts" -H "Content-Type: application/json" \
  -d "{\"email\": \"dev@example.test\", \"password\": \"$STARCO_PASSWORD\", \"accept_terms_version\": \"$V\"}"
Expected outputillustrative · synthetic
202 { "status": "verification_required", "expires_in_minutes": 1440,
      "note": "A message was sent to the address. Verify it with the link or token of the message (POST /v1/accounts/verify) and then sign in with POST /v1/sessions. If the address already had an account, the message says so and nothing changed." }

The answer is the same whether or not the address already had an account. Another terms version answers 422 terms_version_mismatch with the expected one.

Verify your email

The message has a link that works once, for 24 hours. Open it: that is all, and it is what the Python and TypeScript tabs assume you did. With the API alone or the command line, the link ends in #token=…: keep that token in STARCO_VERIFY_TOKEN and send it (in the SDKs, accounts.verify(token)).

curl -s -X POST "$API/accounts/verify" -H "Content-Type: application/json" \
  -d "{\"token\": \"$STARCO_VERIFY_TOKEN\"}"
Expected outputillustrative · synthetic
{ "verified": true, "note": "Sign in with POST /v1/sessions." }

Until the address is verified, signing in answers exactly like a wrong password. A forgotten password is reset with POST /v1/password/forgot and POST /v1/password/reset.

STEP 2 Sign in and create a project Beta#

Signing in gives a console token (starco_dc_…) valid for 12 hours, shown once. It manages your account, projects and keys; it cannot read twins. The curl lines keep it in STARCO_CONSOLE and the Python lines in console; later guides use those names. A new project comes with a cohort of 8 synthetic twins, each with the 14 days that end yesterday.

export STARCO_CONSOLE=$(curl -s -X POST "$API/sessions" -H "Content-Type: application/json" \
  -d "{\"email\": \"dev@example.test\", \"password\": \"$STARCO_PASSWORD\"}" | jq -r .token)
PROJECT=$(curl -s -X POST "$API/projects" -H "Authorization: Bearer $STARCO_CONSOLE" -H "Content-Type: application/json" \
  -d '{"name": "Quickstart"}' | jq -r .project.id)
echo "$PROJECT"
Expected outputillustrative · synthetic
{ "project": { "id": "0b7e4c1a-5d2f-4e8a-9c3b-7f1e2d6a8b90", "name": "Quickstart",
               "data_class": "synthetic", "rate_limit_per_minute": 60, "twin_count": 8,
               "audit_head": { "seq": 2, "hash": "5f0c…a41e" }, "created_at": "2026-11-19T15:39:40Z" } }

The audit chain already has two rows: project.created and cohort.generated. In the CLI tab of the next steps, <twin> is the id that creating the twin prints.

STEP 3 Create a key Beta#

Project keys (starco_dk_…) have scopes and an expiry. read reads, write creates, sends and erases; write does not include read, so ask for both here. ttl_days is 30 by default and 90 at most.

RESP=$(curl -s -X POST "$API/projects/$PROJECT/keys" -H "Authorization: Bearer $STARCO_CONSOLE" -H "Content-Type: application/json" \
  -d '{"name": "quickstart", "scopes": ["read", "write"], "ttl_days": 7}')
echo "$RESP"
export STARCO_KEY=$(echo "$RESP" | jq -r .secret)
Expected outputillustrative · synthetic
{ "key": { "id": "51c0e7d2-…", "name": "quickstart", "prefix": "starco_dk_51c0e7d2",
           "scopes": ["read", "write"], "state": "active", "expires_at": "2026-11-26T15:40:02Z",
           "revoked_at": null, "last_used_at": null, "created_at": "2026-11-19T15:40:02Z" },
  "secret": "starco_dk_51c0e7d2_…",
  "note": "The secret is shown only now and cannot be recovered. Send it as \"Authorization: Bearer <secret>\"." }

The secret is shown once and STARCO keeps only a keyed hash of it: the curl lines keep it in STARCO_KEY, the Python lines in key, the TypeScript lines in the client and the command line in its own configuration, for the next steps. Keep it in your environment or a secret store, never in code you commit.

STEP 4 Create a twin Beta#

TWIN=$(curl -s -X POST "$API/twins" \
  -H "Authorization: Bearer $STARCO_KEY" -H "Content-Type: application/json" \
  -d '{"template": "daily_movement", "layers": ["wellness"], "label": "quickstart"}' | jq -r .twin.id)
echo "$TWIN"
Expected outputillustrative · synthetic
{ "twin": { "id": "3a9d5e2c-8b14-4f7a-a6d1-c2e09f4b7d31", "template": "daily_movement",
            "layers": ["wellness"], "custom_layers": [], "label": "quickstart", "origin": "api", "data_class": "synthetic",
            "created_at": "2026-11-19T15:41:58Z", "updated_at": "2026-11-19T15:41:58Z" } }

STEP 5 Send an observation Beta#

An observation is one value of one kind, in the kind's exact unit, at the time it refers to (observed_at, RFC 3339 with an offset).

curl -s -X POST "$API/twins/$TWIN/observations" \
  -H "Authorization: Bearer $STARCO_KEY" -H "Content-Type: application/json" \
  -d '{"observations": [{"kind": "steps", "value": 8432, "unit": "steps", "observed_at": "2026-11-18T21:00:00Z"}]}'
Expected outputillustrative · synthetic
200 { "batch_id": "c1d2e3f4-…", "accepted": 1, "rejected": [], "recomputed_layers": ["wellness"] }

The layer was recomputed before the answer. The answer is 200 when at least one line was accepted and 422 when none was.

STEP 6 Read the layer Beta#

curl -s "$API/twins/$TWIN/layers/wellness" -H "Authorization: Bearer $STARCO_KEY"
Response (trimmed)illustrative · synthetic
{ "twin_id": "3a9d5e2c-8b14-4f7a-a6d1-c2e09f4b7d31", "layer": "wellness", "template": "daily_movement",
  "computed_at": "2026-11-19T15:42:31Z", "observation_count": 1,
  "description": "Descriptive values of the observations received: no reference range, no interpretation, no score. Null means no data.",
  "kinds": [
    { "kind": "steps", "unit": "steps", "count": 1,
      "latest": { "value": 8432, "observed_at": "2026-11-18T21:00:00Z" },
      "min": 8432, "max": 8432, "mean": 8432, "mean_last_7_days": 8432,
      "first_observed_at": "2026-11-18T21:00:00Z", "last_observed_at": "2026-11-18T21:00:00Z" },
    { "kind": "sleep_hours", "unit": "h", "count": 0, "latest": null,
      "min": null, "max": null, "mean": null, "mean_last_7_days": null,
      "first_observed_at": null, "last_observed_at": null },
    … ] }

Notice sleep_hours: no observations, so its values are null, not zero.

STEP 7 See yourself in the audit chain Beta#

curl -s "$API/audit?after_seq=2" -H "Authorization: Bearer $STARCO_KEY"
Expected outputillustrative · synthetic
3 console e4a1c7d0-…         key.created         201
4 key     starco_dk_51c0e7d2  twins.store         201
5 key     starco_dk_51c0e7d2  observations.store  200
6 key     starco_dk_51c0e7d2  layers.show         200

Console actions name the account id, key requests the key's prefix; never a secret.

What just happened

You created a project, a key and a twin; one observation triggered a recompute of the wellness layer; you read it; and each of those actions became a row of the project's audit chain, including the read. The row of the request that lists the chain is appended after its answer, so you will see it next time.

key twin observe recompute read audit chain · each row chained to the previous one with SHA-256

Next#