REST API
All endpoints are under /api/v1. This page covers the public Bearer-token API for automation and server-side tooling. Requests and responses use JSON.
Authentication
Public REST requests use a Bearer token:
otakit_sk_...) or a user access token from otakit login. The app ID is part of the URL path.# CLI / server operations Authorization: Bearer otakit_sk_...
Apps
Create a new app. The slug should match your Capacitor app identifier. Returns an appId for plugin and CLI usage.
Auth: Bearer
Request body
{ "slug": "com.example.myapp" }Response
{
"id": "uuid",
"slug": "com.example.myapp",
"createdAt": "ISO timestamp"
}Bundles
Start a bundle upload session. Returns a presigned PUT URL. Upload your zip file to this URL with Content-Type: application/zip.
Auth: Bearer
Request body
{
"version": "1.0.1", // semver string
"size": 1048576, // bundle size in bytes
"sha256": "64-char hex checksum of the zip file",
"runtimeVersion": "2026.04" // optional compatibility lane
}Response
{
"uploadId": "uuid",
"presignedUrl": "https://...",
"storageKey": "...",
"expiresAt": "ISO timestamp"
}Finalize a bundle upload session. The server checks that the uploaded object exists and that its size matches the initiated session, then creates the bundle record from the stored session data.
Auth: Bearer
Request body
{
"uploadId": "uuid"
}Response
{
"id": "uuid",
"version": "1.0.1",
"sha256": "...",
"size": 1048576,
"runtimeVersion": "2026.04",
"createdAt": "ISO timestamp"
}List bundles sorted by creation date (newest first).
Auth: Bearer · Query: ?limit=20&offset=0
Response
{
"bundles": [{ id, version, sha256, size, createdAt }],
"total": 42
}Delete a bundle. Bundles that are part of a release history cannot be deleted.
Auth: Bearer
Response
{ "deleted": true, "id": "uuid" }Compare a bundle with another one. Without against or channel, the base is the previous upload of the same runtime version. Zip bundles are read from the archive's central directory and delta bundles from their file list; encrypted bundles cannot be inspected. channel compares with the bundle that channel runs for the target's runtime version (404 when the channel has no release for it); when the target is that bundle, it is compared with the release it replaced there (baseSource channel_previous). against and channel cannot be combined. downloadBytes is what a device on the base downloads: the whole archive for zip updates, at most the content it does not have yet for delta updates (it may already have more), or null when that depends on the device. changes lists up to 5,000 files; unlistedChanges counts the rest. Warning codes: env_file, git_directory and node_modules (warnings); source_map, dotfile, native_installer, large_new_file and size_increase (notes). Warnings help catch build mistakes; they are not a security scan.
Auth: Bearer · Query: ?against=<bundleId> or ?channel=<name> (empty for the base channel)
Response
{
"target": { "id": "…", "version": "1.4.2", "strategy": "deltas", "size": 4508876 },
"base": { "id": "…", "version": "1.4.1", … },
"baseSource": "channel", // "against" | "channel" | "channel_previous" | "previous_upload"
"baseChannel": "production", // with ?channel= (null: base)
"status": "ok", // or "target_unavailable" | "base_unavailable"
"unavailableReason": null, // "encrypted" | "unreadable"
"comparable": true, // false: zip vs deltas, compared by size only
"summary": { "added": 3, "changed": 12, "removed": 1, "unchanged": 210,
"totalBefore": 4299161, "totalAfter": 4508876,
"downloadBytes": 38912 },
"changes": [{ "path": "assets/hero.png", "status": "added",
"sizeBefore": null, "sizeAfter": 3145728 }],
"unlistedChanges": 0,
"warnings": [{ "code": "env_file", "severity": "warning",
"message": "…", "paths": [".env.production"], "count": 1 }]
}Releases
Release a bundle to the base channel or a named channel. The runtimeVersion comes from the bundle itself, so current resolution is per (channel, runtimeVersion). A rolloutPercent below 100 releases to that share of devices; it needs a previous release on the lane. While a rollout is active, another release returns 409 ROLLOUT_IN_PROGRESS unless replaceRollout is true.
Auth: Bearer
Request body
{
"bundleId": "uuid",
"channel": "staging", // optional; omit or null for base channel
"rolloutPercent": 10, // optional; 1-100, default 100
"replaceRollout": true, // optional; cancel the active rollout first
"notes": "Faster checkout." // optional; plain text, up to 2,000 characters
}Response
{
"release": {
"id": "uuid",
"channel": null,
"runtimeVersion": "2026.04",
"bundleId": "uuid",
"bundleVersion": "1.0.1",
"rolloutPercent": 10,
"promotedAt": "ISO timestamp"
},
"previousRelease": { ... } | null
}Change a release's notes. The release's channel is republished, so phones that update from now on get the new text; phones that already updated keep what they received.
Auth: Bearer
Request body
{ "notes": "Faster checkout.\nPhoto upload fixed." } // or null to removeResponse
{ "release": { ..., "notes": "Faster checkout.\nPhoto upload fixed." } }Change the percentage of an active rollout. Only the current release of a lane can change while it is below 100%, and a completed rollout stays complete. To cancel a rollout, revert the release: POST /api/v1/apps/:appId/releases/:releaseId/revert, optionally with expectedRolloutPercent so the revert is refused if the rollout completed or changed meanwhile.
Auth: Bearer
Request body
{
"percent": 50, // 1-100; 100 completes the rollout
"expectedPercent": 10 // optional; rejects the change if the rollout moved
}Response
{
"release": { ..., "rolloutPercent": 50 },
"previousPercent": 10,
"publicationStatus": "published"
}List release history sorted newest first. Omit channel to list every stream, or pass an empty channel value to query only the base channel.
Auth: Bearer · Query: ?channel=staging&limit=20&offset=0
Response
{
"releases": [{
id, channel, runtimeVersion, bundleId, bundleVersion, promotedAt
}],
"total": 12
}A release's client-reported events per UTC hour (24h, 7d) or day (30d), zero-filled, with totals, the rollback share (rollbacks ÷ (applies + rollbacks)) and markers for release, rollout steps and reverts. The range defaults to 24h for releases younger than two days and 7d otherwise. lane=1 adds applies per bucket for the releases of the same channel and runtime that were live during the range, up to 8 around this one. Counts are events, not unique devices; when analytics are unavailable, analyticsAvailable is false.
Auth: Bearer · Query: ?range=24h|7d|30d&platform=ios|android&lane=1
Response
{
"range": "24h",
"granularity": "hour", // "day" for 30d
"asOf": "2026-10-01T12:40:00.000Z", // the last bucket is still filling
"unit": "events",
"analyticsAvailable": true,
"totals": { "downloads": 53, "applied": 48, "downloadErrors": 0,
"rollbacks": 1, "rollbackSharePercent": 2.04 },
"buckets": [{ "start": "2026-10-01T12:00:00.000Z", "downloads": 6,
"applied": 5, "downloadErrors": 0, "rollbacks": 0,
"appliedTotal": 5 }],
"markers": [{ "at": "…", "type": "rollout", "label": "10% → 50%" }],
"lane": { "channel": "production", "releases": [{ "id": "…",
"bundleVersion": "1.4.1", "applied": [3, 2] }] }
}Preview links
Create a preview link that opens the bundle in the installed app, without releasing it. Share url or qrUrl; deepLink is null until the app's URL scheme is known. An app can have 20 active links (409 PREVIEW_LIMIT_REACHED).
Auth: Bearer
Request body
{
"expiresIn": "24h", // optional; 1h, 24h, 7d (default) or 30d
"urlScheme": "myapp" // optional; remembered for the app
}Response
{
"preview": {
"id": "uuid",
"bundleId": "uuid",
"bundleVersion": "1.0.1",
"runtimeVersion": "2026.04",
"expiresAt": "ISO timestamp",
"url": "https://console.otakit.app/p/<token>",
"qrUrl": "https://console.otakit.app/p/<token>/qr.png",
"deepLink": "myapp://otakit-preview?token=<token>" | null
}
}List active preview links, newest first, optionally for one bundle.
Auth: Bearer · Query: ?bundleId=uuid
Response
{
"previews": [{ id, bundleId, bundleVersion, expiresAt, url, qrUrl, deepLink, ... }],
"urlScheme": "myapp" | null
}Revoke a preview link. Phones on it return to their release on their next update check.
Auth: Bearer
Response
{ "status": "revoked" | "already_ended", "previewId": "uuid" }