Rezin Core Rezin Core
Docs

Reference

Management API reference

The routes behind the command-line tool. They act as you, with a personal access token:

Authorization: Bearer rzt_…

The address is https://api.rezincore.com. <id> is a project ID: twenty lowercase letters.

A look-only token can call every GET and read-only SQL. Anything that changes something needs a read-write token and a role in the workspace that may change things.

Routes

RouteWhat it doesToken
GET /v1/manage/meWhich account and token this islook
GET /v1/manage/projectsThe projects the token reacheslook
GET /v1/manage/projects/<id>/tablesTables, columns, row-level securitylook
POST /v1/manage/projects/<id>/sqlRun SQLlook; change with "write": true
GET /v1/manage/projects/<id>/migrationsMigrations already appliedlook
POST /v1/manage/projects/<id>/migrationsApply one migrationchange
GET /v1/manage/projects/<id>/secretsNames of secrets, never valueslook
PUT /v1/manage/projects/<id>/secrets/<NAME>Store or replace a secretchange
GET /v1/manage/projects/<id>/logs?limit=100Newest audit entries (1 to 500)look
GET /v1/manage/projects/<id>/organizationsThe project's organizationslook
GET /v1/manage/projects/<id>/storage/<bucket>?prefix=&org=Files in a bucketlook
PUT /v1/manage/projects/<id>/storage/<bucket>/<path>?org=Upload a file (the file as the body)change
GET /v1/manage/projects/<id>/functionsThe project's functionslook
GET /v1/manage/projects/<id>/functions/<name>One function's code and settingslook
PUT /v1/manage/projects/<id>/functions/<name>Deploy: {"code": "…"} becomes the next version and goes livechange
PATCH /v1/manage/projects/<id>/functions/<name>Change settings: enabled, requireUser, timeoutSeconds, everyMinutes, secrets, versionchange
POST /v1/manage/projects/<id>/functions/<name>/invokeRun once as a test: {"body": "…", "method": "POST"}change
GET /v1/manage/projects/<id>/functions/<name>/logsHow recent runs ended and what they printedlook
DELETE /v1/manage/projects/<id>/functions/<name>Remove a function with its versions and logschange

Moving out and in

Route
GET /v1/manage/projects/<id>/exportsExports made of the project and whether each is ready
POST /v1/manage/projects/<id>/exportsStart one. Body { "passphrase": "..." } is optional (12 characters or more)
GET /v1/manage/projects/<id>/exports/<export id>/downloadThe archive
GET /v1/manage/companies/<company id>/importsImports open in a company
POST /v1/manage/companies/<company id>/importsStart one: { "source": "supabase", "name": "Orchard" } (supabase, firebase, sql, csv, rezin)
PUT /v1/manage/companies/<company id>/imports/<id>/files/<kind>Upload a file as the request body (dump, csv, archive, users, firestore, storage, rules)
POST /v1/manage/companies/<company id>/imports/<id>/sourceWhat is typed and never stored: connectionString, projectUrl with serviceKey, passphrase, firebase
POST /v1/manage/companies/<company id>/imports/<id>/checkThe dry run. Writes nothing
POST /v1/manage/companies/<company id>/imports/<id>/runGo ahead: { "confirm": "<the new project's name>" }. Answers with the new project's keys, once
GET /v1/manage/companies/<company id>/imports/<id>Status, the dry run's plan, the report
POST /v1/manage/companies/<company id>/imports/<id>/rulesPut translated access rules in force: { "rules": "all" }
POST /v1/manage/companies/<company id>/imports/<id>/resyncBring the data over again
DELETE /v1/manage/companies/<company id>/imports/<id>Cancel or close; removes what was uploaded

Exports need a read-write token given Database and Files, held by an owner. Imports need a read-write token for the whole company given Your account and companies, Database and Files, held by an owner.

Examples

Who am I

curl -s https://api.rezincore.com/v1/manage/me -H "authorization: Bearer $REZIN_TOKEN"
{ "email": "[email protected]", "name": "Dev Example", "token": { "level": "read", "expiresAt": "2026-12-26T15:04:05.000Z", "allWorkspaces": false } }

Projects

{ "projects": [ { "id": "…", "ref": "abcdefghijklmnopqrst", "name": "Notes app", "app": "p_abcdefghijklmnopqrst", "workspace": "Example Co", "role": "owner", "defaultOrg": "0d9c8b7a-…" } ] }

ref is the project ID to use in the other routes. app is the project's database schema; the role its application runs as is that name followed by _app.

Run SQL

curl -s https://api.rezincore.com/v1/manage/projects/abcdefghijklmnopqrst/sql \
  -H "authorization: Bearer $REZIN_TOKEN" -H "content-type: application/json" \
  -d '{"sql":"select id, title from notes order by created_at desc limit 5"}'
{
  "ms": 4,
  "results": [
    { "command": "SELECT", "rowCount": 5, "fields": ["id", "title"], "rows": [["…", "Hello"]], "truncated": false }
  ]
}

Rows come back as lists in the order of fields. At most 1,000 rows per statement; truncated says when there were more. Add "write": true to change data or structure.

Apply a migration

curl -s https://api.rezincore.com/v1/manage/projects/abcdefghijklmnopqrst/migrations \
  -H "authorization: Bearer $REZIN_TOKEN" -H "content-type: application/json" \
  -d '{"name":"0002_add_pinned.sql","sql":"alter table notes add column pinned boolean not null default false;"}'
{ "name": "0002_add_pinned.sql", "applied": true }

Applied again, it answers { "name": "…", "applied": false, "note": "Already applied." }.

Set a secret

curl -s -X PUT https://api.rezincore.com/v1/manage/projects/abcdefghijklmnopqrst/secrets/PAYMENT_KEY \
  -H "authorization: Bearer $REZIN_TOKEN" -H "content-type: application/json" \
  -d '{"value":"…","description":"Payment provider, test mode"}'
{ "name": "PAYMENT_KEY", "saved": true }

Logs

{ "events": [ { "seq": 4821, "at": "2026-11-26T15:04:05.000Z", "action": "api.data.insert", "outcome": "success", "resourceType": "table", "organization": "…" } ] }

Errors

StatusCodeWhen
401bad_tokenMissing, wrong, revoked or expired token. The answer carries WWW-Authenticate: Bearer.
403read_onlyThe token is look-only, or your role in the workspace is read-only
404not_foundNo such project for this token, or no such organization in it
400bad_requestMissing or malformed input: a migration name, a secret name, a bucket or path
400sql_errorThe database refused the statement; the message is the database's own
409no_organizationThe project has no organization yet, and files belong to one
503sql_not_readyThe project's SQL role is not available

Every call is on the project's audit record as token.<operation>, with which token was used.

This page as Markdown · llms.txt · Rezin Core is in development and available by invitation.