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

Examples

Complete programs, ready to run.

Eight small programs, each one whole: it creates what it needs, does one useful thing and prints the result. Every example comes in curl, Python, TypeScript and the command line; choose a language once and every page follows.

reading time about 3 min

These programs are executed, not just writtenEach tab of each example is taken from the published page and run against a server of the API whenever the site changes, so a program that stops working cannot stay here. They only use what the API does today.
Example 01 · 3 min

A device twin with a series and daily totals

A wristband sends step counts several times a day. Keep every reading as a point of the series, then read the week as one total per day, with the days without data left empty.

twins · series append · series range with buckets
Example 02 · 4 min

A derived measure the server keeps up to date

Define a layer of your own with a measure computed from two others. Write the inputs; read the result. The server recomputes it in the same transaction, and refuses anyone who tries to write it.

layer schemas · state · derived measures
Example 03 · 3 min

Two writers and one version: safe updates

Two processes read the same measure and both want to change it. With the version they read in the request, the second one is refused instead of silently overwriting the first, and retries with fresh data.

state · versions · compare-and-set with If-Match
Example 04 · 5 min

Events by cursor, and a webhook receiver that verifies signatures

Read what changed in a project with a cursor, and write the one function every webhook receiver needs: the check that a delivery really comes from STARCO and is not a replay.

events · webhook signatures (HMAC-SHA256)
Example 05 · 2 min

Export a twin and check its fingerprint

Download a twin as one JSON document and prove that the bytes you stored are the bytes the server sent.

export · X-Content-SHA256
Example 06 · 4 min

Verify the audit chain away from the server

Read every row of your project's audit chain and recompute its hashes on your own machine. No secret is involved, so anyone you give the rows to can do the same.

audit chain · SHA-256
Example 07 · 4 min

A read-only assistant over MCP

Give an AI assistant one hour of read-only access to the twins of one project, list the tools it gets and call one the way the assistant would. It never holds your project key.

MCP tokens · JSON-RPC · read tools
Example 08 · 4 min

Import a batch and handle what was refused

Send a batch of observations from a file. Each line is judged on its own: the good ones are stored, the bad ones come back with the index of the line and a stable reason, and sending the same batch again stores nothing twice.

observations · validation per line · idempotent import

Before you run one#

  • You need a project key with the read and write scopes in STARCO_KEY. The quickstart gets you one in five minutes.
  • curl tabs use jq. Python tabs use requests. TypeScript and CLI tabs use the SDK and the command line, which are not published in a package registry yet.
  • Everything is synthetic. Do not send real personal or health data.