289 lines
9.8 KiB
JSON
289 lines
9.8 KiB
JSON
{
|
|
"/api/v1/lumi/telegram/link": {
|
|
"post": {
|
|
"summary": "Create a one-use Lumi Telegram account link",
|
|
"description": "Authenticated account only. The link expires after ten minutes. Account signing keys stay in the app.",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Bot deep link"
|
|
},
|
|
"401": {
|
|
"description": "Sign in required"
|
|
},
|
|
"503": {
|
|
"description": "Bot unavailable"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"summary": "Disconnect the account's Telegram chat",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Disconnected"
|
|
},
|
|
"401": {
|
|
"description": "Sign in required"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/lumi/telegram/updates": {
|
|
"get": {
|
|
"summary": "Claim the next app action or owner feedback message",
|
|
"description": "Requires a stable 64-character app client identifier. Each update belongs to one executor. Owner feedback is restricted to the configured immutable account ID.",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "client",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 64,
|
|
"maxLength": 64
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Link status and next claimed update"
|
|
},
|
|
"400": {
|
|
"description": "Invalid client"
|
|
},
|
|
"401": {
|
|
"description": "Sign in required"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/lumi/telegram/ack": {
|
|
"post": {
|
|
"summary": "Acknowledge an action claimed by this app client",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Acknowledged"
|
|
},
|
|
"400": {
|
|
"description": "Invalid receipt"
|
|
},
|
|
"401": {
|
|
"description": "Sign in required"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/lumi/telegram/messages": {
|
|
"post": {
|
|
"summary": "Acknowledge a legacy Lumi conversation upload without sending to Telegram",
|
|
"description": "Telegram is input-only. Authenticated uploads from older apps drain silently, including stale history and previous uncertain deliveries. Conversation history remains in encrypted account sync. No Telegram text, actions or notifications are sent.",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Acknowledged without external delivery"
|
|
},
|
|
"400": {
|
|
"description": "Invalid upload"
|
|
},
|
|
"401": {
|
|
"description": "Sign in required"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/lumi/telegram/webhook": {
|
|
"post": {
|
|
"summary": "Accept private-chat updates from the dedicated Lumi bot",
|
|
"description": "Requires X-Telegram-Bot-Api-Secret-Token. Only numeric sender identities in their own private chats are accepted. Duplicate update IDs cannot execute a second action.",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Accepted or ignored"
|
|
},
|
|
"400": {
|
|
"description": "Invalid update"
|
|
},
|
|
"401": {
|
|
"description": "Webhook authentication required"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/telegram/environment": {
|
|
"get": {
|
|
"summary": "Read the issuing node and production bot identity",
|
|
"description": "Issuing-node only. Entries expire after ten minutes. Telegram identity is verified server-side; no owner private key or recovery passphrase is accepted. Status, cancel and bind require fresh one-use key proofs. Bind additionally requires an existing owner bearer and unchanged v6 owner/device transaction signatures.",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Verified result"
|
|
},
|
|
"400": {
|
|
"description": "Malformed proof"
|
|
},
|
|
"401": {
|
|
"description": "Identity or signature rejected"
|
|
},
|
|
"409": {
|
|
"description": "Expired, conflicting, or replayed entry"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/telegram/entry": {
|
|
"post": {
|
|
"summary": "Read an expiring bot entry challenge",
|
|
"description": "Issuing-node only. Entries expire after ten minutes. Telegram identity is verified server-side; no owner private key or recovery passphrase is accepted. Status, cancel and bind require fresh one-use key proofs. Bind additionally requires an existing owner bearer and unchanged v6 owner/device transaction signatures.",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Verified result"
|
|
},
|
|
"400": {
|
|
"description": "Malformed proof"
|
|
},
|
|
"401": {
|
|
"description": "Identity or signature rejected"
|
|
},
|
|
"409": {
|
|
"description": "Expired, conflicting, or replayed entry"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/telegram/entry/verify": {
|
|
"post": {
|
|
"summary": "Verify raw Telegram initData and possession of separate delegate keys",
|
|
"description": "Issuing-node only. Entries expire after ten minutes. Telegram identity is verified server-side; no owner private key or recovery passphrase is accepted. Status, cancel and bind require fresh one-use key proofs. Bind additionally requires an existing owner bearer and unchanged v6 owner/device transaction signatures.",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Verified result"
|
|
},
|
|
"400": {
|
|
"description": "Malformed proof"
|
|
},
|
|
"401": {
|
|
"description": "Identity or signature rejected"
|
|
},
|
|
"409": {
|
|
"description": "Expired, conflicting, or replayed entry"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/telegram/entry/status": {
|
|
"post": {
|
|
"summary": "Read verified entry status using a fresh delegate proof",
|
|
"description": "Issuing-node only. Entries expire after ten minutes. Telegram identity is verified server-side; no owner private key or recovery passphrase is accepted. Status, cancel and bind require fresh one-use key proofs. Bind additionally requires an existing owner bearer and unchanged v6 owner/device transaction signatures.",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Verified result"
|
|
},
|
|
"400": {
|
|
"description": "Malformed proof"
|
|
},
|
|
"401": {
|
|
"description": "Identity or signature rejected"
|
|
},
|
|
"409": {
|
|
"description": "Expired, conflicting, or replayed entry"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/telegram/entry/rendezvous": {
|
|
"post": {
|
|
"summary": "Discover an owner authorization request using a fresh verified delegate proof",
|
|
"description": "Issuing-node only. Requires the same verified numeric Telegram sender and delegate signing/encryption keys as the expiring bot entry. Each proof is bound to the entry, action, node, audience, expiry and one-use nonce. URL possession alone cannot poll. The response contains only expiring authorization rendezvous metadata; account identity, numeric sender, private keys and recovery data are never returned. This discovery does not approve a grant.",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Minimal matching owner authorization rendezvous"
|
|
},
|
|
"202": {
|
|
"description": "Verified entry is waiting for an owner authorization request"
|
|
},
|
|
"400": {
|
|
"description": "Malformed entry action"
|
|
},
|
|
"401": {
|
|
"description": "Verified delegate proof rejected or expired"
|
|
},
|
|
"404": {
|
|
"description": "Entry unavailable"
|
|
},
|
|
"409": {
|
|
"description": "Proof replayed or current account binding conflicts"
|
|
},
|
|
"503": {
|
|
"description": "Entry or owner request unavailable"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/telegram/entry/cancel": {
|
|
"post": {
|
|
"summary": "Cancel a verified entry with a fresh delegate proof",
|
|
"description": "Issuing-node only. Entries expire after ten minutes. Telegram identity is verified server-side; no owner private key or recovery passphrase is accepted. Status, cancel and bind require fresh one-use key proofs. Bind additionally requires an existing owner bearer and unchanged v6 owner/device transaction signatures.",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Verified result"
|
|
},
|
|
"400": {
|
|
"description": "Malformed proof"
|
|
},
|
|
"401": {
|
|
"description": "Identity or signature rejected"
|
|
},
|
|
"409": {
|
|
"description": "Expired, conflicting, or replayed entry"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/telegram/account/bind": {
|
|
"post": {
|
|
"summary": "Bind a locally created or restored owner account to the verified Telegram entry",
|
|
"description": "Issuing-node only. Entries expire after ten minutes. Telegram identity is verified server-side; no owner private key or recovery passphrase is accepted. Status, cancel and bind require fresh one-use key proofs. Bind additionally requires an existing owner bearer and unchanged v6 owner/device transaction signatures.",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Verified result"
|
|
},
|
|
"400": {
|
|
"description": "Malformed proof"
|
|
},
|
|
"401": {
|
|
"description": "Identity or signature rejected"
|
|
},
|
|
"409": {
|
|
"description": "Expired, conflicting, or replayed entry"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|