Ciresk dev API
The REST API behind ciresk dev and its MCP tools: sessions, their access and sharing, and the organization's policy, templates, usage and logs. Every endpoint is in the reference below, generated from the API's OpenAPI document.
Quickstart
Create a key on platform.ciresk.com under OrganizationAPI keys (Organization, then API keys) with New API key and the product Ciresk Dev. The key is shown once and starts with csk_live_eu_ for an organization in the EU region. Then set two variables:
export CIRESK_API=https://api.eu.ciresk.com
export CIRESK_KEY=csk_live_eu_...List your live sessions:
curl -s "$CIRESK_API/v1/dev/sessions?limit=5" \
-H "Authorization: Bearer $CIRESK_KEY"Read your and your organization's use against the policy's budgets:
curl -s "$CIRESK_API/v1/dev/usage" \
-H "Authorization: Bearer $CIRESK_KEY"A key acts for the person who created it: the sessions it lists, starts and stops are that person's, and the organization's dev policy applies to them as to the person.
What the CLI does for you
Starting a session from your own code takes more than one call: POST /v1/dev/sessions creates the session or returns the worktree's live one, then the client pushes the worktree's tree, opens the tunnel with a device key and a ticket of at most 30 seconds, and keeps the files in sync. ciresk dev up does all of it. Use the API for what is one call: reading sessions and their events, stopping them, sharing them, raising and answering needs, the policy, templates, usage, the connection and egress logs, and the kill switch.
Base URL and conventions
Every endpoint is under https://api.eu.ciresk.com/v1/dev. The version is part of the path.
- Requests and responses are JSON, with
snake_casefields. Changes are additive: clients ignore unknown fields. - IDs are prefixed: a session is
devs_, a device grantdevg_and a memberdevm_, followed by 32 hex characters. - Lists page with
cursorandlimit(at most 200, 50 by default) and answerdata,has_moreandnext_cursor; see Pagination. - Stopping, pausing and starting a session and the kill switch take an
Idempotency-Keyheader; a retry with the same key acts once. See Idempotency. - Errors are
application/problem+jsonwith a stablecode, and many carrynext, the exact command that fixes them. See Errors. GET /v1/dev/sessions/{session_id}waits for a state withwait_for(at most 25 seconds) andGET /v1/dev/sessions/{session_id}/eventsfollows the session's journal withfollow; call again while the session is still on its way.
Good to know
- The CLI is the reference client:
ciresk dev <command> --jsonprints what the API answers in one JSON envelope. - Agents reach the same capabilities through
ciresk dev mcp, thedev_session_*MCP tools, which call this API with the person's credential. - The platform-wide rules every endpoint below follows are on this tab: API keys, Scopes, Regions, Idempotency, Pagination, Errors and Request IDs.