Orova Pocket

Docs

Pocket SDK

Build a small web app that runs right inside Orova Chat on web, mobile and desktop, then publish it to every user.

What is a Pocket

A Pocket is a static web app (HTML, CSS, JS, images) that runs in the Pocket tab of Orova Chat on web, iOS, iPad, Android, macOS, Windows and Linux. It talks to Orova only through the SDK window.orova.

Orova serves your app from https://pocketapp.orova.vn/<slug>/ inside a sandboxed iframe whose origin is "null". That means:

  • Use relative paths for files in your zip (style.css, fetch("data.json")). Scripts, CSS and fonts load only from your Pocket itself (no CDN, no Google Fonts) — ship them in the zip.
  • Calling an external server (fetch, images, media, form posts) requires the host in domains; otherwise the browser blocks it. Child iframes are not allowed.
  • There are no cookies and page localStorage is unavailable — store data with orova.storage.
  • A Pocket is a single-page app: following a link or changing location.href makes Orova close it. Open outside pages with orova.openUrl().

Publishing flow

  1. Create a Pocket in the console (ID, name) or call create_pocket.
  2. Build a static web app, load the SDK, zip it with pocket.json at the root.
  3. Upload the zip as a new version. Orova checks the structure and manifest on upload.
  4. Open it in the sandbox: only you see it, inside the real Orova Chat, 15-minute link.
  5. Fill in every app detail, then submit for Orova review (free, resubmitting is free too).
  6. Approved → live in production for everyone. Upkeep is 20 USD per Pocket per year, paid from your balance.

Sandbox

A freshly uploaded, unreviewed version (it expires after 30 days without activity). Only the owner sees it in their own Pocket list. Sandbox links last 15 minutes; when one expires, reopen it from the console or call get_pocket_sandbox_url. Storage is shared with the production version.

Production

The reviewed version, shown to every user in the regions and on the platforms you declare. Needs an active 20 USD/year upkeep: when it lapses it is charged from your balance; not enough balance → 402 maintenance_required. Billing

Quick start

A minimal Pocket has 4 files. pocket.json must sit at the ROOT of the zip (not inside a folder).

hello-pocket.zip
├── pocket.json   required, at the root
├── index.html    start page (entry)
├── app.js
├── style.css
└── icon.png      square, png/webp/jpg

pocket.json

pocket.json
{
  "name": "Hello Pocket",
  "slug": "hello-pocket",
  "version": "1.0.0",
  "entry": "index.html",
  "icon": "icon.png",
  "category": "utilities",
  "short_description": "Say hi to a chat",
  "changelog": { "vi": "Bản đầu tiên", "en": "First release" },
  "privacy_url": "https://example.com/privacy",
  "support_email": "support@example.com",
  "age_rating": "4+",
  "permissions": ["user.profile", "conversation.send"],
  "domains": [],
  "locales": ["en", "vi"],
  "regions": ["*"],
  "platforms": ["*"]
}

index.html

index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="color-scheme" content="light dark">
<title>Hello Pocket</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<main id="app">
  <h1 id="hi">Hello</h1>
  <button type="button" id="send">Send to a chat</button>
</main>
<script src="https://pocketapp.orova.vn/_sdk/orova-pocket-sdk.v1.js"></script>
<script src="app.js"></script>
</body>
</html>

Load the SDK with a script tag right in index.html (the full URL above, or the relative /_sdk/orova-pocket-sdk.v1.js). The handshake must start within 1.5 s after the page loads; scripts injected later cannot connect.

app.js

app.js
orova.ready().then(function (ctx) {
  document.documentElement.dataset.theme = ctx.theme;  // "light" | "dark"
  orova.on("theme", function (d) { document.documentElement.dataset.theme = d.theme; });
  return orova.getUser();
}).then(function (u) {
  document.getElementById("hi").textContent = "Hello, " + u.name;
}).catch(function (e) {
  if (e.code === "not_supported") document.body.textContent = "Open me inside Orova Chat.";
});

document.getElementById("send").addEventListener("click", function () {
  orova.sendToConversation({ text: "Hi from Hello Pocket" })
    .then(function () { orova.toast("Sent"); })
    .catch(function (e) { if (e.code !== "user_cancelled") orova.toast(e.message || e.code); });
});

Opening the file in a normal tab or on localhost gives not_supported. Test your app in the sandbox inside Orova Chat.

pocket.json

A JSON manifest (UTF-8, up to 256 KB) at the zip root. Orova checks every field on upload; a bad one returns 400 manifest_invalid with field and reason. Unknown fields only raise an unknown_field warning.

FieldRequiredTypeRule
name Yes string 1–30 characters (counted after NFC). The name shown in Orova Chat.
slug Yes string 3–48 characters of a-z, 0-9 and hyphen; must start and end with a letter or digit. Must equal the Pocket ID in the console (otherwise slug_mismatch). Reserved slugs (orova, official, admin, api, app, pocket, sdk, chat, mcp, help, support, test, demo…) and anything starting with orova- are rejected.
version Yes string X.Y.Z (e.g. 1.0.0), up to 32 characters. Every upload needs a new version number (a repeat → version_exists).
entry No string Start page (.html/.htm), default index.html. Must exist in the zip (otherwise entry_missing).
icon Yes string Relative path to an image inside the zip: png, webp, jpg, jpeg. Missing → icon_missing. An icon uploaded in the console (square ≥ 128 px, ≤ 1 MB) takes priority.
category Yes string An English category key, see the list below.
privacy_url Yes string An https link to your privacy policy, up to 500 characters.
support_email Yes string A valid support email, 3–200 characters.
age_rating Yes string One of 4+, 9+, 12+, 17+.
short_description No string One line, up to 30 characters. Required before you submit (set it here or in the console).
description No string Long description, multi-line.
changelog No string | {locale: string} What changed in this version, multi-line: a string, or {locale: string} (≤ 2000 characters per language; picked by the user’s language → en → vi).
permissions No array<string> Permissions the app requests, each from the Permissions table. Missing → []. Unknown value → unknown_permission.
permission_reasons No object A reason for each user.* data permission (except user.profile): 10–80 characters. Missing → missing_reason:<permission>.
domains No array<string> Every external host your code talks to (fetch, images, media, forms). https host names only: no path, no IP, no port, no *.orova.vn.
locales No array<string> Languages your UI supports (the 54 Orova Chat codes, e.g. vi, en, ja, zh-tw). Missing → ["vi", "en"].
regions No array<string> ["*"] or two-letter ISO 3166-1 country codes (e.g. ["VN", "TH"]). Missing → ["*"].
platforms No array<string> ["*"] or a subset of web, ios, ipad, android, macos, windows, linux. Missing → ["*"].
i18n No object Name and descriptions per language: { "<code>": { name ≤ 30, short_description ≤ 30, description ≤ 4000 } }.

App details — required before you submit

Icon, name, Pocket ID, short description, category, support email, privacy policy (https), at least 1 language, at least 1 region and at least 1 platform are all REQUIRED. If any is missing, submitting returns 400 profile_incomplete with a missing list. The manifest only provides starting values: edit these fields in the console or through the API update_pocket.

Categories category

productivitybusinessutilitieseducationfinanceentertainmentsocialcommunicationtravelfood_drinkhealth_fitnesslifestyleshoppingnewsphoto_videomusicgamessportsweathernavigationreferencedeveloper_toolsgovernmentmedicalbookskidsgraphics_designother

permissions + permission_reasons

Request only what you use. The 7 user.* data permissions (except user.profile) are sensitive: each REQUIRES a 10–80 character reason, shown to the user in the permission dialog, and a version requesting them is always checked by an Orova reviewer by hand (never auto-approved).

pocket.json
"permissions": ["user.profile", "user.phone", "conversation.send"],
"permission_reasons": {
  "user.phone": "Fill in your phone number on the booking form"
}

i18n

Name and descriptions per language. Orova Chat shows the translation that matches the user’s language, then falls back to "en", then to the top-level name/short_description/description.

pocket.json
"i18n": {
  "en": { "name": "Split Bill", "short_description": "Split costs: who owes whom" },
  "vi": { "name": "Chia tiền nhóm", "short_description": "Chia tiền ăn chơi, ai nợ ai" }
}

The top-level name/short_description/description are the base language (the first entry of locales). i18n in pocket.json only provides starting values: after that, edit the name and descriptions per language in the console (Pocket details page, pick a language) or with update_pocket i18n. Each call sends the FULL set: a language you leave out loses its translation, null clears them all. For an approved app the translations go to the draft and are reviewed like any other info.

changelog

What changed in this version: a string, or {locale: string} so each user reads it in their language (≤ 2000 characters per language). The API returns changelog in the caller’s language and the full set as changelog_i18n.

pocket.json
"changelog": {
  "en": "Dark mode. Faster totals.",
  "vi": "Giao diện tối. Tính tổng nhanh hơn."
}

locales ≠ regions ≠ platforms

These three fields answer three different questions. Do not mix them up:

FieldMeansValuesEffect
localesWhich languages your app speaks["en", "vi", "ja"]Shown on the app listing. Does NOT hide the app from anyone. The user’s language is in getContext().locale so the app can pick its strings.
regionsWhich countries see your app["*"], ["VN", "TH"]Users outside these countries do not see the app in the catalog. "*" = worldwide.
platformsWhich devices run your app["*"], ["web", "ipad"]Orova Chat lists the app only on matching platforms. "*" = every platform.

The owner always sees their own Pocket in every country and on every platform, for testing.

Permissions

Storage, context, title, toast, close, formatting and the date picker need NO permission. Calling a method whose permission is not requested → permission_not_declared.

PermissionAllowsSDKKind
user.profile See your name and profile photo getUser() Feature
conversation.pick Pick one of your conversations to use in the app pickConversation() Feature
conversation.send Send messages to a chat when you agree sendToConversation() Feature
share Share content through Orova Chat share() Feature
open_url Open external links openUrl() Feature
user.phone See your phone number getUser().phone Sensitive
user.birthday See your birthday getUser().birthday Sensitive
user.gender See your gender getUser().gender Sensitive
user.address See your address getUser().address Sensitive
user.company See your company getUser().company Sensitive
user.website See your website getUser().website Sensitive
user.locale_country See your country and language getUser().locale, .country Sensitive

How users are asked

  • The first time a Pocket opens, Orova shows a dialog listing EVERY permission the app requests, with the reasons for sensitive ones. The app runs only after the user taps “Agree and open”; closing the dialog means the app does not open.
  • Consent covers the WHOLE set: there is no per-permission toggle. The app opens only after the user agrees to all of them; otherwise it does not run.
  • A new version that adds or changes permissions → users are asked again on the next open.
  • To withdraw, the user removes the Pocket (Remove Pocket in the Pocket info dialog in Chat, the Connected apps & Pockets page, or revoke_connected_pocket): every permission is revoked, the Pocket is unpinned, and the next open asks again. The API and MCP have no operation to grant or agree on the user’s behalf.
  • Permissions belong to the app: pick them and write the reasons in the console (Pocket details page) or with update_pocket. The pocket.json values are only a starting point.
  • Send, share and open-link dialogs still ask the user EVERY time, even with the permission granted. Orova never agrees on the user’s behalf.

SDK window.orova

One file, no dependencies, works in ES5 browsers with Promise. Every method that calls Orova returns a Promise; errors are Error objects with name "OrovaPocketError" and a code (see Error codes). Methods that show a dialog wait up to 120 s, all others 15 s, then reject with timeout.

SDK
https://pocketapp.orova.vn/_sdk/orova-pocket-sdk.v1.js
Version
1.0.0
Events
theme — { theme: "light" | "dark" } when the user switches light/dark

Lifecycle and frame

orova.readyNo permission

orova.ready() → Promise<context>

Waits for the handshake with Orova, then resolves with the context (same as getContext). Safe to call many times. Calls made before the connection is ready are queued and sent automatically.

Returns
context
Errors
not_supported — Outside Orova it rejects with not_supported, immediately in a normal tab or after 3 s inside a non-Orova frame.
js
orova.ready().then(function (ctx) {
  document.documentElement.dataset.theme = ctx.theme;
}).catch(function (e) {
  if (e.code === "not_supported") showOutsideOrova();
});

orova.getContextNo permission

orova.getContext() → Promise<context>

Where your Pocket is running. platform ∈ web, ios, ipad, android, macos, windows, linux; safe_area is in px.

Returns
{ pocket: { slug, version, name }, locale, theme: "light" | "dark", platform, os, is_app, safe_area: { top, bottom } }
Errors
not_supported, timeout
js
orova.getContext().then(function (c) {
  document.body.style.paddingBottom = c.safe_area.bottom + "px";
  setLanguage(c.locale);
});

orova.setTitleNo permission

orova.setTitle(text) → Promise<null>

Sets the subtitle under your Pocket’s name in the header, 0–60 characters (empty string clears it).

Returns
null
Errors
invalid_params
js
orova.setTitle("Dinner · 4 people");

orova.toastNo permission

orova.toast(text) → Promise<null>

Shows a short Orova Chat toast, 1–120 characters, at most 5 per 10 seconds.

Returns
null
Errors
invalid_params, rate_limited
js
orova.toast("Saved");

orova.closeNo permission

orova.close() → Promise<null>

Closes your Pocket and returns to Orova Chat.

Returns
null
Errors
not_supported
js
doneButton.addEventListener("click", function () { orova.close(); });

orova.versionNo permission

orova.version → "1.0.0"

SDK version (a string, not a function). window.orova is frozen and cannot be overwritten.

Returns
string
Errors
—
js
console.log(orova.version); // "1.0.0"

User

orova.getUseruser.profile

orova.getUser() → Promise<user>

The first call asks the user. id is an anonymous ID unique to your Pocket: stable for the same user, different across Pockets. Data fields appear only when the user granted the matching permission (not granted → key absent; granted but empty → null).

Returns
{ id, name, email, avatar_url } + phone (user.phone), birthday "YYYY-MM-DD" (user.birthday), gender "male" | "female" | "other" (user.gender), address "City, CC" (user.address), company (user.company), website (user.website), locale + country ISO-2 (user.locale_country)
Errors
permission_denied, permission_not_declared, user_cancelled, timeout (120 s)
js
orova.getUser().then(function (u) {
  hello.textContent = "Hi " + u.name;
  if ("phone" in u) phoneField.value = u.phone || "";
}).catch(function (e) {
  if (e.code === "permission_denied") showGuestMode();
});

Conversations and links

orova.pickConversationconversation.pick

orova.pickConversation({ kind? }) → Promise<conversation>

The user picks a conversation. kind: "group", "direct" or "any" (default). You never see the real ID; keep id_token (valid 24 h) to send to it later.

Returns
{ id_token, title, kind, members: [{ name, avatar_url }] }
Errors
invalid_params, permission_not_declared, user_cancelled, rate_limited, timeout (120 s)
js
orova.pickConversation({ kind: "group" }).then(function (c) {
  saved = c.id_token;
  people = c.members.map(function (m) { return m.name; });
});

orova.sendToConversationconversation.send

orova.sendToConversation({ text, id_token? }) → Promise<{ sent: true }>

text is 1–4000 characters. Orova always shows a preview and the user must press Send. Without id_token the user picks the conversation first.

Returns
{ sent: true }
Errors
invalid_params, permission_not_declared, user_cancelled, network_error, timeout (120 s)
js
orova.sendToConversation({
  text: "Poll closed: 7 yes, 2 no",
  id_token: saved
}).then(function () { orova.toast("Sent"); });

orova.shareshare

orova.share({ text, url? }) → Promise<{ sent: true }>

Like sendToConversation, but the user always picks the conversation. url must be https:// and is appended on its own line.

Returns
{ sent: true }
Errors
invalid_params, permission_not_declared, user_cancelled, timeout (120 s)
js
orova.share({ text: "Join my poll", url: "https://example.com/poll/42" });

orova.openUrlopen_url

orova.openUrl(url) → Promise<{ opened: true }>

Asks “Open external link <host>?” and opens a new tab. https:// only, up to 2048 characters. A Pocket is a single-page app: never navigate the frame away (Orova closes the Pocket).

Returns
{ opened: true }
Errors
invalid_params, permission_not_declared, user_cancelled, timeout (120 s)
js
helpLink.addEventListener("click", function (e) {
  e.preventDefault();
  orova.openUrl("https://example.com/help");
});

Events

orova.onNo permission

orova.on(event, fn) → orova

Listens to an event from Orova; returns orova so calls can chain. Bad arguments throw TypeError. An error inside your handler is logged and does not affect other handlers.

Returns
orova
Errors
TypeError
js
function onTheme(d) { document.documentElement.dataset.theme = d.theme; }
orova.on("theme", onTheme);

orova.offNo permission

orova.off(event, fn?) → orova

Removes one handler; without fn removes every handler of that event.

Returns
orova
Errors
—
js
orova.off("theme", onTheme);
orova.off("theme"); // remove all

Storage

orova.storage.getNo permission

orova.storage.get(key) → Promise<value | null>

Reads a key from the private per-user, per-Pocket store. Missing → null.

Returns
JSON | null
Errors
invalid_params, network_error
js
orova.storage.get("score:best").then(function (v) {
  best = v ? v.n : 0;
});

orova.storage.setNo permission

orova.storage.set(key, value) → Promise<undefined>

Writes any JSON value (up to ~16 MB per value). Keys: 1–128 characters of A-Z a-z 0-9 . _ : -

Returns
undefined
Errors
invalid_params, network_error
js
orova.storage.set("score:best", { n: 42 });

orova.storage.removeNo permission

orova.storage.remove(key) → Promise<undefined>

Deletes a key.

Returns
undefined
Errors
invalid_params, network_error
js
orova.storage.remove("draft");

orova.storage.keysNo permission

orova.storage.keys() → Promise<string[]>

Lists every stored key.

Returns
string[]
Errors
network_error
js
orova.storage.keys().then(function (ks) {
  ks.filter(function (k) { return k.indexOf("split:") === 0; });
});

Number, money and date formatting

orova.fmt.numberNo permission

orova.fmt.number(n, { decimals? }) → string

Orova-style numbers in every language: comma thousands, dot decimals. No decimals → up to 2, trailing zeros dropped; decimals 0–10 → fixed. Not a number → "". Synchronous, no host call.

Returns
string
Errors
—
js
orova.fmt.number(1234567.891);           // "1,234,567.89"
orova.fmt.number(5, { decimals: 2 });     // "5.00"

orova.fmt.moneyNo permission

orova.fmt.money(n, currency?) → string

Money: VND (default) with 0 decimals, USD with $, other codes after the number.

Returns
string
Errors
—
js
orova.fmt.money(250000);        // "250,000 đ"
orova.fmt.money(1234.5, "USD"); // "$1,234.50"
orova.fmt.money(12.5, "EUR");   // "12.50 EUR"

orova.fmt.dateNo permission

orova.fmt.date(d, locale?) → string

Dates are always dd/mm/yyyy in every language. d = Date, "yyyy-mm-dd", an ISO date-time or epoch ms. Invalid → "".

Returns
string
Errors
—
js
orova.fmt.date("2026-11-07"); // "07/11/2026"

UI

orova.ui.datePickNo permission

orova.ui.datePick(inputEl | selector, { locale?, min?, max?, value?, onChange? }) → picker

Turns a text input into a date field with the Orova Chat calendar (month/year pickers, Today, Clear). The input shows dd/mm/yyyy; the real ISO value is in inputEl.dataset.iso. min/max are ISO dates. Enter / Space / ArrowDown open, Esc closes. REQUIRED instead of input type="date": native pickers follow the device language, not your app.

Returns
{ get(), set(iso), open(), close(), destroy() }
Errors
TypeError
js
var due = orova.ui.datePick("#due", {
  min: "2026-01-01",
  onChange: function (iso, text) { draft.due = iso; }
});
due.set("2026-11-07");

Error reporting

orova.track.errorNo permission

orova.track.error(msg, meta?) → undefined

Reports an error to your Pocket’s stats in the console. Never throws or rejects. msg is cut to 500 characters; meta is a JSON object ≤ 2000 characters (larger is dropped). The SDK captures window “error” and “unhandledrejection” by itself. At most 10 reports per page session.

Returns
undefined
Errors
—
js
try { recalc(); }
catch (e) { orova.track.error(e.message, { step: "recalc" }); }

SDK error codes

Read e.code in your catch. Codes are always English snake_case.

codeMeaning
permission_deniedThe user declined the permission.
permission_not_declaredThe app does not request this permission (manifest/console).
user_cancelledThe user closed the dialog or picker, or the Pocket was closed midway.
invalid_paramsBad arguments (checked by the SDK before sending).
not_supportedNot running inside Orova, or the method is unavailable on this platform.
rate_limitedToo many calls (e.g. more than 5 toasts per 10 s, more than 8 pending dialogs).
network_errorOrova could not reach its servers.
internal_errorUnexpected error on Orova’s side.
timeoutNo answer in time (120 s for dialogs, 15 s otherwise).

Limits and review

These caps only stop abusive uploads (zip bombs, disk filling); they are not feature limits.

ItemCapIf exceeded
Zip size50 MBbundle_too_large (413)
Total unpacked200 MBzip_bomb
Files2000too_many_files
Compression ratio of a file ≥ 1 MB100×zip_bomb
pocket.json256 KBmanifest_invalid
Path length1024 characters, 255 bytes per segmentunsafe_path
Name / short description30 / 30 charactersmanifest_invalid · too_long
Long description per language4000 charactersmanifest_invalid · too_long
Sensitive permission reason10–80 charactersmanifest_invalid · bad_reason
Icon uploaded in the console≤ 1 MB, square ≥ 128 px (stored as 256 px WebP)400
Submissions10 per hour per accountrate_limited (429)
Storage value~16 MB413
Sandbox Pocket lifetime30 days after the last activity (upload, opening the Pocket). Orova emails a reminder 3 days before; 30 days after expiry the bundles are deleted.sandbox_expired (409)
Sandbox Pockets per developer20sandbox_limit (400)
Unsubmitted versions per Pocket10The oldest is deleted automatically
Creating Pockets / uploading versions10 creations and 30 uploads per dayrate_limited (429)

Accepted file types: html, htm, css, js, mjs, json, map, png, jpg, jpeg, gif, webp, svg, ico, avif, woff, woff2, ttf, otf, txt, md, wasm, mp3, mp4, webm, ogg, wav, pdf. Server files (php, py, sh, exe…), .htaccess and symlinks are rejected.

Orova review

  1. Automatic code scan: crypto mining, obfuscated code, calls to hosts outside domains, forms posting elsewhere.
  2. Content and behaviour are scored against Orova’s criteria; every finding must quote real text from your files.
  3. Fixed rules decide: Approved → live right away; Unsure → a reviewer looks; Rejected → reasons per criterion (where, quote, how to fix).
  • Versions requesting sensitive user.* permissions are always checked by a reviewer by hand.
  • Never ask for passwords, OTP codes, payment cards or Orova sign-in details. Never send or share without a clear user action. No hidden features, misleading UI, malware, crypto mining, adult, hateful or illegal content.
  • Submitting and resubmitting are free. Orova may take down a Pocket that breaks the rules at any time.

Pocket API (REST)

Do everything the console does from code: create Pockets, edit details and translations, upload the icon and zip, get a sandbox link, submit, publish/unpublish, read stats, manage your developer profile; list and remove the Pockets you connected. Call it with an API key that has pockets:read / pockets:write — create a key, authentication.

API base URL
https://chat.orova.vn/api/chat/v1
OperationWhat it doesScope
list_pocketsGET/pockets List Pockets pockets:read
get_developer_overviewGET/developer/overview Get developer overview pockets:read
list_my_pocketsGET/developer/pockets List your Pockets pockets:read
create_pocketPOST/developer/pockets Create a Pocket Idempotency-Key pockets:write
get_my_pocketGET/developer/pockets/{pocket_id} Get one of your Pockets pockets:read
update_pocketPATCH/developer/pockets/{pocket_id} Update a Pocket pockets:write
upload_pocket_iconPOST/developer/pockets/{pocket_id}/icon Upload a Pocket icon pockets:write
publish_pocketPOST/developer/pockets/{pocket_id}/publish Publish a Pocket pockets:write
unpublish_pocketPOST/developer/pockets/{pocket_id}/unpublish Unpublish a Pocket pockets:write
get_pocket_statsGET/developer/pockets/{pocket_id}/stats Get Pocket statistics pockets:read
submit_pocket_infoPOST/developer/pockets/{pocket_id}/submit_info Submit Pocket info for review Idempotency-Key pockets:write
upload_pocket_versionPOST/developer/pockets/{pocket_id}/versions Upload a Pocket version Idempotency-Key pockets:write
get_pocket_versionGET/developer/versions/{version_id} Get a Pocket version pockets:read
delete_pocket_versionDELETE/developer/versions/{version_id} Delete a Pocket version pockets:write
get_pocket_sandbox_urlGET/developer/versions/{version_id}/sandbox_url Get a sandbox link pockets:read
submit_pocket_versionPOST/developer/versions/{version_id}/submit Submit a version for review Idempotency-Key pockets:write
get_developer_profileGET/developer/profile Get your developer profile pockets:read
update_developer_profilePUT/developer/profile Update your developer profile pockets:write
submit_developer_profilePOST/developer/profile/submit Submit your developer profile for review Idempotency-Key pockets:write
list_connected_pocketsGET/connected_pockets List connected Pockets pockets:read
revoke_connected_pocketDELETE/connected_pockets/{slug} Remove a connected Pocket pockets:write

Full parameters, bodies and responses for each operation are in the REST API reference.

1. Create a Pocket — create_pocket

curl
curl -X POST https://chat.orova.vn/api/chat/v1/developer/pockets \
  -H "X-Api-Key: ock_…" \
  -H "X-Api-Secret: ocs_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: create-hello-pocket-1" \
  -d '{
    "slug": "hello-pocket",
    "name": "Hello Pocket",
    "short_description": "Say hi to a chat",
    "category": "utilities",
    "locales": ["en", "vi"],
    "regions": ["*"],
    "platforms": ["*"]
  }'
# → 201 { "app": { "id": 42, "slug": "hello-pocket", "status": … } }
# slug in use → 409 slug_taken

2. Upload a version — upload_pocket_version

curl
curl -X POST https://chat.orova.vn/api/chat/v1/developer/pockets/42/versions \
  -H "X-Api-Key: ock_…" \
  -H "X-Api-Secret: ocs_…" \
  -F file=@hello-pocket.zip
# → 201 { "version": { "id": 108, "version": "1.0.0", "status": "uploaded", "warnings": [] } }
# 400 manifest_invalid {field, reason} · 409 version_exists · 413 bundle_too_large

curl https://chat.orova.vn/api/chat/v1/developer/versions/108/sandbox_url \
  -H "X-Api-Key: ock_…" -H "X-Api-Secret: ocs_…"
# → { "url": "https://pocketapp.orova.vn/_sb/108/…/index.html", "expires_at": "…" }   (15 min)

3. Complete details and submit — update_pocket, submit_pocket_version

curl
curl -X PATCH https://chat.orova.vn/api/chat/v1/developer/pockets/42 \
  -H "X-Api-Key: ock_…" -H "X-Api-Secret: ocs_…" \
  -H "Content-Type: application/json" \
  -d '{
    "support_email": "support@example.com",
    "privacy_url": "https://example.com/privacy",
    "permissions": ["user.profile", "conversation.send"],
    "permission_reasons": {},
    "i18n": {
      "vi": { "name": "Chào Pocket", "short_description": "Gửi lời chào vào chat" }
    }
  }'
# a required field left empty → 400 missing_field {field}
# approved app → { "draft": true, … }, then POST /developer/pockets/42/submit_info

curl -X POST https://chat.orova.vn/api/chat/v1/developer/versions/108/submit \
  -H "X-Api-Key: ock_…" -H "X-Api-Secret: ocs_…" \
  -H "Idempotency-Key: submit-108"
# → { "status": "in_review" }
# 400 profile_incomplete {missing: [...]} · 429 rate_limited

After submitting, poll get_pocket_version for the status (in_review → live, needs_human, or rejected with reasons per criterion). Going to production needs an active upkeep; not enough balance → 402 maintenance_required.

MCP

AI assistants (Claude, ChatGPT…) connected over MCP get tools with the same names for the operations above, except the 2 binary uploads (upload_pocket_icon, upload_pocket_version) — use REST for those. See MCP