# Buffalo Orbit API Base URL: https://dashboard.buffaloorbit.com Public docs: https://docs.buffaloorbit.com OpenAPI 3.1: https://docs.buffaloorbit.com/openapi.json Agent guide: https://docs.buffaloorbit.com/llms.txt (also /llms-full.txt) These documentation URLs require no credentials. Business APIs require the credentials declared per operation. ## Authentication and token aliases Create an API Key in Dashboard → API Keys using your account session. The permission selector defaults to All; the key cannot exceed your account's permissions. Expiry is 1–365 days (default 30). The secret is shown once. Revocation takes effect immediately. Store the key in your secret manager under alias buffalo-orbit-api, bound to dashboard.buffaloorbit.com. An alias is a local secret-manager name, not a token accepted by the server. Resolve it at request time; send Authorization: Bearer . Never embed real tokens in source, examples, logs or chat. With Buffalo Agents, run secret_list to check aliases. If missing, use secret_request --alias buffalo-orbit-api --provider BuffaloOrbit, then add the key in Settings → Secret Keys. First use may ask you to allow the host/header; after allowing, repeat the request. Read-only example (Buffalo injects the stored key): ```sh buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/auth/v1/profile' --header Authorization --prefix 'Bearer ' buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/tasks/v1/server-tasks?limit=50&after=0' ``` Create an account (administrator + MANAGE_USERS; executes immediately): ```sh buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/auth/v1/accounts' --method POST --headers '{"Content-Type":"application/json"}' --body '{"email":"new.member@example.com","name":"New member","password":"REPLACE_WITH_GENERATED_PASSWORD","role":"member"}' ``` The password above is a placeholder, never a real account credential. Generate and deliver credentials through a secure channel. Clients without Buffalo should resolve the alias using their own secret manager before setting Authorization. Do not send the literal alias as the Bearer token. ## Agency isolation and permissions The server derives tenant and agency from the authenticated account. Do not supply identity headers or switch agency through request payloads. A new account inherits the creator's agency. Only an administrator created in Root agency (agency 1) may create other agencies. POST /global/v1/managed-agencies requires SUPER_ADMIN and provisions its database plus initial administrator. POST /global/v1/agencies requires MANAGE_ROLES and creates a grouping entry only. Use managed-agencies for an operational agency. API Key authority is the intersection of the key mask and the account's current mask; role, activation and original agency are checked live. All does not bypass agency boundaries. Conversations, tasks and attachments stay in the caller's tenant/agency. Members only see their own tasks; admins see their tenant's tasks. Permission bits: MANAGE_USERS=1, VIEW_USERS=2, MANAGE_TASKS=4, VIEW_TASKS=8, MANAGE_ROLES=16, MANAGE_SETTINGS=32, VIEW_REPORTS=64, MANAGE_BILLING=128, SUPER_ADMIN=256. The per-operation x-permission-bit is the API Key/MCP requirement; x-access describes account access. GET accounts/users also support account sessions with VIEW_USERS without an admin role; API Key discovery currently requires admin for those operations. Device list needs VIEW_USERS, and device actions need admin + MANAGE_USERS. API Keys cannot manage keys, enroll/approve devices, log out sessions, create Telegram link codes, perform device sync/node operations, or transfer raw attachment bytes. Use the documented account/device flows for these operations. A public schema does not grant access to any API. ## MCP for agents Endpoint: https://dashboard.buffaloorbit.com/mcp (Streamable HTTP). Use the same resolved API Key in Authorization. Configure the client to resolve your secret alias locally; alias placeholders are not literal server credentials. MCP supports POST JSON-RPC with Accept: application/json, text/event-stream. Initialize the client, then tools/list or tools/call with name api_list and arguments {}. Discovery returns only operations allowed by the key's current permissions, role and agency. Tools validate path, query and body. Writes execute immediately; confirm destructive actions with the user before calling them. Never retry mutations automatically. ## JSON, pagination, revisions and errors Send Content-Type: application/json for JSON bodies. Most success responses use {"data":...}. Legacy user, agency, role and conversation lists also return code:200 and paging:{total,limit,offset,page}. See each response schema. Pagination uses limit=1..200 (default 50) and offset>=0 (default 0). For array lists without paging, continue until fewer than limit items are returned. Task summaries use data.items and data.has_more. Server task changes use after=, ordered by seq, and include deletion tombstones. Keep decimal revision, sequence, checkpoint and task ID strings as strings; do not coerce them to floating-point numbers. For PATCH, read the current entity, send its revision and on 409 reload before deciding whether to retry. Agent configuration revisions are numbers; account/device/server-task revisions are decimal strings. Errors use {"error":{"code":"...","message":"..."}}; validation errors may include issues. Common statuses: 400 malformed JSON, 401 missing/expired/revoked credentials, 403 insufficient role/permission or API Key scope, 404 unavailable/not-owned entity, 409 revision/idempotency/lifecycle conflict, 411 missing upload Content-Length, 413 body too large, 422 invalid fields/pagination, 501 unsupported legacy provisioning, 502/503 upstream unavailable. Treat a network failure during a write as an ambiguous result. ## Uploads and destructive agency actions Account/device flow: POST attachment intent with optional UUID X-Request-ID; reuse that ID and identical body to retry the intent. PUT raw bytes to upload_url with Content-Length (up to 50 MiB), then POST complete. GET download returns binary bytes, not a JSON envelope. API Keys support attachment metadata actions but raw PUT/download require account/device credentials. Managed agency deletion is two-step: POST /managed-agencies/{code}/delete marks deleting and revokes access; POST /managed-agencies/{code}/confirm-delete with {"confirmation":""} permanently deletes the database/accounts and retires its namespace. Prefix both paths with /global/v1. Root is protected. ## Endpoint contracts ### GET /auth/v1/api-keys List your API Keys; never returns secrets. ```json { "operationId": "get_auth_v1_api_keys", "tags": [ "auth-service" ], "summary": "List API keys", "description": "List your API Keys; never returns secrets. Account session. API Keys are accepted only when x-api-key-supported is true. API Keys are not supported; use the declared account, device or webhook credential.", "x-access": "session", "x-api-key-supported": false, "x-permission-bit": 0, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "description": "limit (1-200, default 50)", "schema": { "type": "integer", "minimum": 1, "maximum": 200, "default": 50 } }, { "name": "offset", "in": "query", "required": false, "description": "offset (default 0)", "schema": { "type": "integer", "minimum": 0, "default": 0 } } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "hint": { "type": "string" }, "permission_mask": { "type": "number" }, "expires_at": { "type": "string" }, "revoked_at": { "type": [ "string", "null" ] }, "created_at": { "type": "string" } }, "required": [ "id", "name", "hint", "permission_mask", "expires_at", "revoked_at", "created_at" ], "additionalProperties": {} } } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /auth/v1/api-keys Create an expiring permission-limited API Key. Secret returned only once. Account session required. ```json { "operationId": "post_auth_v1_api_keys", "tags": [ "auth-service" ], "summary": "Create API key", "description": "Create an expiring permission-limited API Key. Secret returned only once. Account session required. Account session. API Keys are accepted only when x-api-key-supported is true. API Keys are not supported; use the declared account, device or webhook credential.", "x-access": "session", "x-api-key-supported": false, "x-permission-bit": 0, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 100 }, "permission_mask": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "expires_in_days": { "default": 30, "type": "integer", "minimum": 1, "maximum": 365 } }, "required": [ "name", "permission_mask" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "hint": { "type": "string" }, "permission_mask": { "type": "number" }, "expires_at": { "type": "string" }, "revoked_at": { "type": [ "string", "null" ] }, "created_at": { "type": "string" }, "key": { "type": "string" } }, "required": [ "id", "name", "hint", "permission_mask", "expires_at", "revoked_at", "created_at", "key" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### DELETE /auth/v1/api-keys/{id} Revoke your API Key immediately. Account session required. ```json { "operationId": "delete_auth_v1_api_keys_id", "tags": [ "auth-service" ], "summary": "Revoke API key", "description": "Revoke your API Key immediately. Account session required. Account session. API Keys are accepted only when x-api-key-supported is true. API Keys are not supported; use the declared account, device or webhook credential.", "x-access": "session", "x-api-key-supported": false, "x-permission-bit": 0, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] } ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "boolean", "const": true } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /conversations/v1/agent-config Read masked tenant Agent configuration; API keys are never returned. ```json { "operationId": "get_conversations_v1_agent_config", "tags": [ "conversation-service" ], "summary": "Get agent settings", "description": "Read masked tenant Agent configuration; API keys are never returned. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_SETTINGS (32).", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 32, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/conversations/v1/agent-config' --method GET" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "provider": { "type": "string", "enum": [ "cloudflare", "buffalo" ] }, "protocol": { "type": "string", "enum": [ "chat", "responses" ] }, "model": { "type": "string" }, "revision": { "type": "number" }, "has_key": { "type": "boolean" }, "has_jev_key": { "type": "boolean" } }, "required": [ "provider", "protocol", "model", "revision", "has_key", "has_jev_key" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### PUT /conversations/v1/agent-config Save tenant Cloudflare/Buffalo Agent selection, Vilao protocol/model and encrypted key; revision must match. ```json { "operationId": "put_conversations_v1_agent_config", "tags": [ "conversation-service" ], "summary": "Update agent settings", "description": "Save tenant Cloudflare/Buffalo Agent selection, Vilao protocol/model and encrypted key; revision must match. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_SETTINGS (32).", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 32, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "provider": { "type": "string", "enum": [ "cloudflare", "buffalo" ] }, "protocol": { "type": "string", "enum": [ "chat", "responses" ] }, "model": { "type": "string", "minLength": 1, "maxLength": 200 }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "api_key": { "type": "string", "maxLength": 4096 }, "jev_key": { "type": "string", "maxLength": 4096 }, "remove_jev_key": { "type": "boolean" }, "curl": { "type": "string", "maxLength": 16000 } }, "required": [ "provider", "protocol", "model", "revision" ] } } } }, "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/conversations/v1/agent-config' --method PUT --headers '{\"Content-Type\":\"application/json\"}' --body - < request.json\n# request.json must match this operation’s request schema." } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "provider": { "type": "string", "enum": [ "cloudflare", "buffalo" ] }, "protocol": { "type": "string", "enum": [ "chat", "responses" ] }, "model": { "type": "string" }, "revision": { "type": "number" }, "has_key": { "type": "boolean" }, "has_jev_key": { "type": "boolean" } }, "required": [ "provider", "protocol", "model", "revision", "has_key", "has_jev_key" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### DELETE /conversations/v1/agent-config Delete encrypted key and switch tenant to Cloudflare; revision must match. ```json { "operationId": "delete_conversations_v1_agent_config", "tags": [ "conversation-service" ], "summary": "Remove provider key", "description": "Delete encrypted key and switch tenant to Cloudflare; revision must match. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_SETTINGS (32).", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 32, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "revision": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } }, "required": [ "revision" ] } } } }, "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/conversations/v1/agent-config' --method DELETE --headers '{\"Content-Type\":\"application/json\"}' --body - < request.json\n# request.json must match this operation’s request schema." } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "provider": { "type": "string", "enum": [ "cloudflare", "buffalo" ] }, "protocol": { "type": "string", "enum": [ "chat", "responses" ] }, "model": { "type": "string" }, "revision": { "type": "number" }, "has_key": { "type": "boolean" }, "has_jev_key": { "type": "boolean" } }, "required": [ "provider", "protocol", "model", "revision", "has_key", "has_jev_key" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /conversations/v1/agent-config/test Measure saved provider with a synthetic tool round trip; never writes tasks or changes provider selection. ```json { "operationId": "post_conversations_v1_agent_config_test", "tags": [ "conversation-service" ], "summary": "Test agent settings", "description": "Measure saved provider with a synthetic tool round trip; never writes tasks or changes provider selection. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_SETTINGS (32).", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 32, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "case_id": { "type": "integer", "minimum": 1, "maximum": 26 }, "provider": { "type": "string", "enum": [ "cloudflare", "buffalo" ] }, "reasoning_mode": { "default": "adaptive", "type": "string", "enum": [ "provider-default", "none", "low", "high", "adaptive" ] }, "scenario": { "default": "read", "type": "string", "enum": [ "read", "chat", "reason" ] }, "optimize_reads": { "default": true, "type": "boolean" } }, "required": [ "provider" ] } } } }, "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/conversations/v1/agent-config/test' --method POST --headers '{\"Content-Type\":\"application/json\"}' --body - < request.json\n# request.json must match this operation’s request schema." } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "anyOf": [ { "type": "object", "properties": { "provider": { "type": "string" }, "model": { "type": "string" }, "scenario": { "type": "string" }, "reasoning_mode": { "type": "string" }, "synthetic": { "type": "boolean" }, "direct_read": { "type": "boolean" }, "metrics": { "type": "array", "items": {} }, "answer": { "type": "string" }, "passed": { "type": "boolean" }, "router": { "type": "string" }, "duration_ms": { "type": "number" }, "tool_call_ok": { "type": "boolean" } }, "required": [ "provider", "model", "scenario", "reasoning_mode", "synthetic", "direct_read", "metrics", "answer", "passed", "router", "duration_ms", "tool_call_ok" ], "additionalProperties": {} }, { "type": "object", "properties": { "provider": { "type": "string" }, "id": { "type": "number" }, "prompt": { "type": "string" }, "expect": { "type": "string" }, "calls": { "type": "array", "items": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "proposals": { "type": "array", "items": {} }, "metrics": { "type": "array", "items": {} }, "duration_ms": { "type": "number" }, "synthetic": { "type": "boolean" }, "category": { "type": "string" }, "answer": { "type": "string" }, "confirmation": { "type": "boolean" }, "inference_calls": { "type": "number" }, "direct_read": { "type": "boolean" }, "error": { "type": "string" } }, "required": [ "provider", "id", "prompt", "expect", "calls", "proposals", "metrics", "duration_ms", "synthetic" ], "additionalProperties": {} } ] } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /global/v1/managed-agencies Root admin only: provision an agency D1, its first administrator and live task binding. Retry the same code after a provisioning failure. ```json { "operationId": "post_global_v1_managed_agencies", "tags": [ "directory-service" ], "summary": "Create managed agency", "description": "Root admin only: provision an agency D1, its first administrator and live task binding. Retry the same code after a provisioning failure. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: SUPER_ADMIN (256). Root agency (agency 1) administrator only.", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 256, "x-root-agency-only": true, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "code": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{1,40}$" }, "name": { "type": "string", "minLength": 1, "maxLength": 200 }, "admin_email": { "type": "string", "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "admin_password": { "type": "string", "minLength": 12, "maxLength": 72 } }, "required": [ "code", "name", "admin_email", "admin_password" ], "additionalProperties": false } } } }, "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/global/v1/managed-agencies' --method POST --headers '{\"Content-Type\":\"application/json\"}' --body - < request.json\n# request.json must match this operation’s request schema." } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "number" }, "code": { "type": "string" }, "name": { "type": "string" }, "parent_code": { "type": [ "string", "null" ] }, "level": { "type": "number" }, "path": { "type": "string" }, "db_name": { "type": "string" }, "db_host": { "type": "string" }, "is_active": { "type": "boolean" }, "phone": { "type": "string" }, "address": { "type": "string" }, "status": { "type": "number" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" }, "dynamic_key": { "type": [ "string", "null" ] }, "db_state": { "type": [ "string", "null" ] }, "already_provisioned": { "type": "boolean" } }, "required": [ "id", "code", "name", "parent_code", "level", "path", "db_name", "db_host", "is_active", "phone", "address", "status", "created_at", "updated_at", "dynamic_key", "db_state" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /global/v1/managed-agencies/{code}/delete Root admin only: mark deleting and revoke agency sessions; database remains until confirmation. ```json { "operationId": "post_global_v1_managed_agencies_code_delete", "tags": [ "directory-service" ], "summary": "Mark agency for deletion", "description": "Root admin only: mark deleting and revoke agency sessions; database remains until confirmation. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: SUPER_ADMIN (256). Root agency (agency 1) administrator only.", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 256, "x-root-agency-only": true, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [ { "name": "code", "in": "path", "required": true, "schema": { "type": "string" } } ], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/global/v1/managed-agencies/{code}/delete' --method POST" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "code": { "type": "string" }, "state": { "type": "string", "const": "deleting" } }, "required": [ "code", "state" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /global/v1/managed-agencies/{code}/confirm-delete Root admin only: irreversibly delete a previously marked agency, its D1 and accounts; retire its namespace. ```json { "operationId": "post_global_v1_managed_agencies_code_confirm_delete", "tags": [ "directory-service" ], "summary": "Delete agency permanently", "description": "Root admin only: irreversibly delete a previously marked agency, its D1 and accounts; retire its namespace. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: SUPER_ADMIN (256). Root agency (agency 1) administrator only.", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 256, "x-root-agency-only": true, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [ { "name": "code", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "confirmation": { "type": "string", "minLength": 1, "maxLength": 41 } }, "required": [ "confirmation" ], "additionalProperties": false } } } }, "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/global/v1/managed-agencies/{code}/confirm-delete' --method POST --headers '{\"Content-Type\":\"application/json\"}' --body - < request.json\n# request.json must match this operation’s request schema." } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "code": { "type": "string" }, "state": { "type": "string", "const": "deleted" } }, "required": [ "code", "state" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /auth/v1/login Sign in; sets the orbit_session cookie and returns the token. ```json { "operationId": "post_auth_v1_login", "tags": [ "auth-service" ], "summary": "Sign in", "description": "Sign in; sets the orbit_session cookie and returns the token. No credentials. API Keys are not supported; use the declared account, device or webhook credential.", "x-access": "public", "x-api-key-supported": false, "x-permission-bit": 0, "x-root-agency-only": false, "security": [], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "email": { "type": "string", "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "password": { "type": "string", "maxLength": 1024 } }, "required": [ "email", "password" ] } } } }, "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "access_token": { "type": "object", "properties": { "token": { "type": "string" }, "expires_at": { "type": "string" } }, "required": [ "token", "expires_at" ], "additionalProperties": {} }, "account": { "type": "object", "properties": { "id": { "type": "string" }, "tenant_id": { "type": "string" }, "agency": { "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" }, "role": { "type": "string", "enum": [ "admin", "member" ] }, "active": { "type": "boolean" }, "revision": { "type": "string", "pattern": "^\\d+$" }, "created_at": { "type": "string" } }, "required": [ "id", "tenant_id", "agency", "email", "name", "role", "active", "revision", "created_at" ], "additionalProperties": {} } }, "required": [ "access_token", "account" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /auth/v1/logout End the current session. ```json { "operationId": "post_auth_v1_logout", "tags": [ "auth-service" ], "summary": "Sign out", "description": "End the current session. Account session. API Keys are accepted only when x-api-key-supported is true. API Keys are not supported; use the declared account, device or webhook credential.", "x-access": "session", "x-api-key-supported": false, "x-permission-bit": 0, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] } ], "parameters": [], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "boolean", "const": true } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /auth/v1/profile Current account with its permission mask. ```json { "operationId": "get_auth_v1_profile", "tags": [ "auth-service" ], "summary": "Get profile", "description": "Current account with its permission mask. Account session. API Keys are accepted only when x-api-key-supported is true. API Keys are supported. Required permission: authenticated account.", "x-access": "session", "x-api-key-supported": true, "x-permission-bit": 0, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/auth/v1/profile' --method GET" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "sub": { "type": "string" }, "email": { "type": "string" }, "tenant_id": { "type": "string" }, "agency": { "type": "string" }, "role": { "type": "string", "enum": [ "admin", "member" ] }, "name": { "type": "string" }, "permission_mask": { "type": "number" } }, "required": [ "sub", "email", "tenant_id", "agency", "role", "name", "permission_mask" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /auth/v1/accounts List accounts of the tenant. ```json { "operationId": "get_auth_v1_accounts", "tags": [ "auth-service" ], "summary": "List accounts", "description": "List accounts of the tenant. Account session with VIEW_USERS; API Keys additionally require administrator role. API Keys are supported. Required permission: VIEW_USERS (2).", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 2, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "description": "limit (1-200, default 50)", "schema": { "type": "integer", "minimum": 1, "maximum": 200, "default": 50 } }, { "name": "offset", "in": "query", "required": false, "description": "offset (default 0)", "schema": { "type": "integer", "minimum": 0, "default": 0 } } ], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/auth/v1/accounts' --method GET" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "tenant_id": { "type": "string" }, "agency": { "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" }, "role": { "type": "string", "enum": [ "admin", "member" ] }, "active": { "type": "boolean" }, "revision": { "type": "string", "pattern": "^\\d+$" }, "created_at": { "type": "string" } }, "required": [ "id", "tenant_id", "agency", "email", "name", "role", "active", "revision", "created_at" ], "additionalProperties": {} } } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /auth/v1/accounts Create an account. ```json { "operationId": "post_auth_v1_accounts", "tags": [ "auth-service" ], "summary": "Create account", "description": "Create an account. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_USERS (1).", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 1, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "email": { "type": "string", "maxLength": 254, "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "password": { "type": "string", "minLength": 12 }, "name": { "type": "string", "minLength": 1, "maxLength": 200 }, "role": { "default": "member", "type": "string", "enum": [ "admin", "member" ] } }, "required": [ "email", "password", "name" ], "additionalProperties": false } } } }, "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/auth/v1/accounts' --method POST --headers '{\"Content-Type\":\"application/json\"}' --body - < request.json\n# request.json must match this operation’s request schema." } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "tenant_id": { "type": "string" }, "agency": { "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" }, "role": { "type": "string", "enum": [ "admin", "member" ] }, "active": { "type": "boolean" }, "revision": { "type": "string", "pattern": "^\\d+$" }, "created_at": { "type": "string" } }, "required": [ "id", "tenant_id", "agency", "email", "name", "role", "active", "revision", "created_at" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### PATCH /auth/v1/accounts/{id} Update name, role or active flag; revision must match. ```json { "operationId": "patch_auth_v1_accounts_id", "tags": [ "auth-service" ], "summary": "Update account", "description": "Update name, role or active flag; revision must match. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_USERS (1).", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 1, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 200 }, "role": { "type": "string", "enum": [ "admin", "member" ] }, "active": { "type": "boolean" }, "revision": { "type": "string", "pattern": "^\\d+$" } }, "required": [ "name", "role", "active", "revision" ], "additionalProperties": false } } } }, "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/auth/v1/accounts/{id}' --method PATCH --headers '{\"Content-Type\":\"application/json\"}' --body - < request.json\n# request.json must match this operation’s request schema." } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "tenant_id": { "type": "string" }, "agency": { "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" }, "role": { "type": "string", "enum": [ "admin", "member" ] }, "active": { "type": "boolean" }, "revision": { "type": "string", "pattern": "^\\d+$" }, "created_at": { "type": "string" } }, "required": [ "id", "tenant_id", "agency", "email", "name", "role", "active", "revision", "created_at" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /user/v1/users List users in the legacy CMS shape, with paging.total. ```json { "operationId": "get_user_v1_users", "tags": [ "auth-service" ], "summary": "List users", "description": "List users in the legacy CMS shape, with paging.total. Account session with VIEW_USERS; API Keys additionally require administrator role. API Keys are supported. Required permission: VIEW_USERS (2).", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 2, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "description": "limit (1-200, default 50)", "schema": { "type": "integer", "minimum": 1, "maximum": 200, "default": 50 } }, { "name": "offset", "in": "query", "required": false, "description": "offset (default 0)", "schema": { "type": "integer", "minimum": 0, "default": 0 } } ], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/user/v1/users' --method GET" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "email": { "type": "string" }, "phone": { "type": "string" }, "avatar": { "type": "string" }, "gender": { "type": "string" }, "agency_user_id": { "type": "string" }, "agency_code": { "type": "string" }, "permission_mask": { "type": "number" }, "agency_id": { "type": "number" }, "status": { "type": "number" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": [ "id", "first_name", "last_name", "email", "phone", "avatar", "gender", "agency_user_id", "agency_code", "permission_mask", "agency_id", "status", "created_at", "updated_at" ], "additionalProperties": {} } }, "code": { "type": "number", "const": 200 }, "paging": { "type": "object", "properties": { "total": { "type": "number" }, "limit": { "type": "number" }, "offset": { "type": "number" }, "page": { "type": "number" } }, "required": [ "total", "limit", "offset", "page" ], "additionalProperties": {} } }, "required": [ "data", "code", "paging" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### PATCH /user/v1/users/{id}/permission Set a user permission bitmask. ```json { "operationId": "patch_user_v1_users_id_permission", "tags": [ "auth-service" ], "summary": "Update user permissions", "description": "Set a user permission bitmask. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_USERS (1).", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 1, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "permission_mask": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "agency_id": { "default": 0, "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "permission_mask" ], "additionalProperties": false } } } }, "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/user/v1/users/{id}/permission' --method PATCH --headers '{\"Content-Type\":\"application/json\"}' --body - < request.json\n# request.json must match this operation’s request schema." } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "boolean", "const": true } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /devices/v1/devices/enroll Register a device installation (pending until approved). ```json { "operationId": "post_devices_v1_devices_enroll", "tags": [ "device-service" ], "summary": "Enroll device", "description": "Register a device installation (pending until approved). Account session. API Keys are accepted only when x-api-key-supported is true. API Keys are not supported; use the declared account, device or webhook credential.", "x-access": "session", "x-api-key-supported": false, "x-permission-bit": 0, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "enrollment_key": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "platform": { "type": "string", "enum": [ "macos", "windows", "linux" ] }, "manufacturer": { "type": "string", "minLength": 1, "maxLength": 100 }, "serial": { "type": "string", "minLength": 1, "maxLength": 200 }, "label": { "type": "string", "minLength": 1, "maxLength": 200 }, "reinstall": { "default": false, "type": "boolean" } }, "required": [ "enrollment_key", "platform", "manufacturer", "serial", "label" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "tenant_id": { "type": "string" }, "account_id": { "type": "string" }, "enrollment_key": { "type": "string" }, "platform": { "type": "string" }, "manufacturer": { "type": "string" }, "serial": { "type": "string" }, "label": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "approved", "revoked" ] }, "dynamic_key": { "type": [ "string", "null" ] }, "generation": { "type": "string", "pattern": "^\\d+$" }, "revision": { "type": "string", "pattern": "^\\d+$" }, "created_at": { "type": "string" } }, "required": [ "id", "tenant_id", "account_id", "enrollment_key", "platform", "manufacturer", "serial", "label", "status", "dynamic_key", "generation", "revision", "created_at" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /devices/v1/devices/me The calling device: its id and the dynamic key it must put in task keys before pushing. ```json { "operationId": "get_devices_v1_devices_me", "tags": [ "device-service" ], "summary": "Get current device", "description": "The calling device: its id and the dynamic key it must put in task keys before pushing. Account session or approved device credential; some sync operations require a device. API Keys also need x-api-key-supported. API Keys are not supported; use the declared account, device or webhook credential.", "x-access": "device", "x-api-key-supported": false, "x-permission-bit": 0, "x-root-agency-only": false, "security": [ { "DeviceCredential": [] } ], "parameters": [], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "dynamic_key": { "type": "string" } }, "required": [ "id", "dynamic_key" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /devices/v1/devices List devices (admins see the whole tenant). ```json { "operationId": "get_devices_v1_devices", "tags": [ "device-service" ], "summary": "List devices", "description": "List devices (admins see the whole tenant). Account session. API Keys are accepted only when x-api-key-supported is true. API Keys are not supported; use the declared account, device or webhook credential.", "x-access": "session", "x-api-key-supported": false, "x-permission-bit": 0, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "description": "limit (1-200, default 50)", "schema": { "type": "integer", "minimum": 1, "maximum": 200, "default": 50 } }, { "name": "offset", "in": "query", "required": false, "description": "offset (default 0)", "schema": { "type": "integer", "minimum": 0, "default": 0 } } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "tenant_id": { "type": "string" }, "account_id": { "type": "string" }, "enrollment_key": { "type": "string" }, "platform": { "type": "string" }, "manufacturer": { "type": "string" }, "serial": { "type": "string" }, "label": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "approved", "revoked" ] }, "dynamic_key": { "type": [ "string", "null" ] }, "generation": { "type": "string", "pattern": "^\\d+$" }, "revision": { "type": "string", "pattern": "^\\d+$" }, "created_at": { "type": "string" } }, "required": [ "id", "tenant_id", "account_id", "enrollment_key", "platform", "manufacturer", "serial", "label", "status", "dynamic_key", "generation", "revision", "created_at" ], "additionalProperties": {} } } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /devices/v1/devices/{id}/{action} action is approve, revoke or rotate; approve and rotate return a one-time credential. ```json { "operationId": "post_devices_v1_devices_id_action", "tags": [ "device-service" ], "summary": "Manage device", "description": "action is approve, revoke or rotate; approve and rotate return a one-time credential. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are not supported; use the declared account, device or webhook credential.", "x-access": "admin", "x-api-key-supported": false, "x-permission-bit": 0, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] } ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "action", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "approve", "revoke", "rotate" ] } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "revision": { "type": "string", "pattern": "^\\d+$" } }, "required": [ "revision" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "device": { "type": "object", "properties": { "id": { "type": "string" }, "tenant_id": { "type": "string" }, "account_id": { "type": "string" }, "enrollment_key": { "type": "string" }, "platform": { "type": "string" }, "manufacturer": { "type": "string" }, "serial": { "type": "string" }, "label": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "approved", "revoked" ] }, "dynamic_key": { "type": [ "string", "null" ] }, "generation": { "type": "string", "pattern": "^\\d+$" }, "revision": { "type": "string", "pattern": "^\\d+$" }, "created_at": { "type": "string" } }, "required": [ "id", "tenant_id", "account_id", "enrollment_key", "platform", "manufacturer", "serial", "label", "status", "dynamic_key", "generation", "revision", "created_at" ], "additionalProperties": {} }, "credential": { "type": [ "string", "null" ] } }, "required": [ "device", "credential" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /tasks/v1/sync Commit a batch of tasks from a device. Replaying the same idempotency_key returns the first result. ```json { "operationId": "post_tasks_v1_sync", "tags": [ "task-service" ], "summary": "Sync tasks", "description": "Commit a batch of tasks from a device. Replaying the same idempotency_key returns the first result. Account session or approved device credential; some sync operations require a device. API Keys also need x-api-key-supported. API Keys are not supported; use the declared account, device or webhook credential.", "x-access": "device", "x-api-key-supported": false, "x-permission-bit": 4, "x-root-agency-only": false, "security": [ { "DeviceCredential": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "workspace": { "type": "string", "minLength": 1, "maxLength": 200 }, "idempotency_key": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "after": { "type": "string", "maxLength": 20, "pattern": "^(0|[1-9]\\d*)$" }, "sequence": { "type": "string", "maxLength": 20, "pattern": "^(0|[1-9]\\d*)$" }, "snapshot": { "default": false, "type": "boolean" }, "tasks": { "maxItems": 40, "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "minLength": 4, "maxLength": 25 }, "id": { "type": "string", "pattern": "^[1-9]\\d{0,18}$" }, "workspace": { "type": "string", "minLength": 1, "maxLength": 200 }, "title": { "type": "string", "minLength": 1, "maxLength": 1000 }, "status": { "type": "string", "enum": [ "icebox", "backlog", "in_progress", "in_review", "blocked", "done" ] }, "revision": { "type": "string", "maxLength": 20, "pattern": "^(0|[1-9]\\d*)$" }, "priority": { "type": "string", "maxLength": 100 }, "labels": { "maxItems": 100, "type": "array", "items": { "type": "string", "maxLength": 100 } }, "parent": { "anyOf": [ { "type": "string", "maxLength": 25 }, { "type": "null" } ] }, "lane": { "anyOf": [ { "type": "string", "maxLength": 100 }, { "type": "null" } ] }, "body": { "type": "string", "maxLength": 2000000 }, "claimed_by": { "type": [ "string", "null" ] }, "worktree": { "type": [ "string", "null" ] }, "criteria": { "maxItems": 1000, "type": "array", "items": { "type": "object", "properties": { "text": { "type": "string" }, "completed": { "type": "boolean" } }, "required": [ "text", "completed" ] } }, "plan": { "type": [ "string", "null" ] }, "notes": { "maxItems": 10000, "type": "array", "items": { "type": "string" } }, "spec": { "type": [ "string", "null" ] }, "last_verified_result": { "type": [ "string", "null" ] }, "report_score": { "type": [ "string", "null" ] }, "aliases": { "type": "array", "items": { "type": "string" } }, "front_matter": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "deleted": { "default": false, "type": "boolean" } }, "required": [ "key", "workspace", "title", "status", "revision", "priority", "labels", "body", "criteria", "notes" ], "additionalProperties": false } } }, "required": [ "workspace", "idempotency_key", "after", "sequence", "tasks" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "checkpoint": { "type": "string", "pattern": "^\\d+$" }, "accepted": { "type": "number" }, "idempotency_key": { "type": "string" } }, "required": [ "checkpoint", "accepted", "idempotency_key" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /tasks/v1/sync/checkpoint Last committed checkpoint of a workspace. ```json { "operationId": "get_tasks_v1_sync_checkpoint", "tags": [ "task-service" ], "summary": "Get sync checkpoint", "description": "Last committed checkpoint of a workspace. Account session or approved device credential; some sync operations require a device. API Keys also need x-api-key-supported. API Keys are not supported; use the declared account, device or webhook credential.", "x-access": "device", "x-api-key-supported": false, "x-permission-bit": 8, "x-root-agency-only": false, "security": [ { "DeviceCredential": [] } ], "parameters": [ { "name": "workspace", "in": "query", "required": true, "description": "workspace (required)", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "checkpoint": { "type": "string", "pattern": "^\\d+$" } }, "required": [ "checkpoint" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /tasks/v1/tasks List synced tasks. ```json { "operationId": "get_tasks_v1_tasks", "tags": [ "task-service" ], "summary": "List synced tasks", "description": "List synced tasks. Account session or approved device credential; some sync operations require a device. API Keys also need x-api-key-supported. API Keys are supported. Required permission: VIEW_TASKS (8).", "x-access": "device", "x-api-key-supported": true, "x-permission-bit": 8, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] }, { "DeviceCredential": [] } ], "parameters": [ { "name": "workspace", "in": "query", "required": false, "description": "workspace", "schema": { "type": "string" } }, { "name": "status", "in": "query", "required": false, "description": "status", "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "description": "limit (1-200, default 50)", "schema": { "type": "integer", "minimum": 1, "maximum": 200, "default": 50 } }, { "name": "offset", "in": "query", "required": false, "description": "offset (default 0)", "schema": { "type": "integer", "minimum": 0, "default": 0 } } ], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/tasks/v1/tasks' --method GET" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "tenant_id": { "type": "string" }, "account_id": { "type": "string" }, "device_id": { "type": "string" }, "workspace": { "type": "string" }, "local_key": { "type": "string" }, "display_key": { "type": "string" }, "revision": { "type": "string", "pattern": "^\\d+$" }, "payload": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "deleted": { "type": "boolean" } }, "required": [ "id", "tenant_id", "account_id", "device_id", "workspace", "local_key", "display_key", "revision", "payload", "deleted" ], "additionalProperties": {} } } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /tasks/v1/task-summaries Dashboard list: bounded summaries only, ordered by updated_at descending and id. Returns {items,has_more}; excludes deleted tasks. Open the source-specific detail endpoint for full content. ```json { "operationId": "get_tasks_v1_task_summaries", "tags": [ "task-service" ], "summary": "List task summaries", "description": "Dashboard list: bounded summaries only, ordered by updated_at descending and id. Returns {items,has_more}; excludes deleted tasks. Open the source-specific detail endpoint for full content. Account session or approved device credential; some sync operations require a device. API Keys also need x-api-key-supported. API Keys are supported. Required permission: VIEW_TASKS (8).", "x-access": "device", "x-api-key-supported": true, "x-permission-bit": 8, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] }, { "DeviceCredential": [] } ], "parameters": [ { "name": "source", "in": "query", "required": false, "description": "source (device, server or all; default all)", "schema": { "type": "string", "enum": [ "device", "server", "all" ], "default": "all" } }, { "name": "workspace", "in": "query", "required": false, "description": "workspace", "schema": { "type": "string" } }, { "name": "status", "in": "query", "required": false, "description": "status", "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "description": "limit (1-200, default 50)", "schema": { "type": "integer", "minimum": 1, "maximum": 200, "default": 50 } }, { "name": "offset", "in": "query", "required": false, "description": "offset (default 0)", "schema": { "type": "integer", "minimum": 0, "default": 0 } } ], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/tasks/v1/task-summaries' --method GET" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "key": { "type": "string" }, "source": { "type": "string", "enum": [ "device", "server" ] }, "workspace": { "type": "string" }, "revision": { "type": "string", "pattern": "^\\d+$" }, "updated_at": { "type": "string" }, "title": { "type": "string" }, "status": { "type": "string" }, "priority": { "type": "string" }, "labels": { "type": "array", "items": { "type": "string" } }, "body_preview": { "type": "string" }, "claimed_by": { "type": [ "string", "null" ] }, "spec": { "type": [ "string", "null" ] }, "criteria_total": { "type": "number" }, "criteria_completed": { "type": "number" }, "created_via": { "type": [ "string", "null" ] } }, "required": [ "id", "key", "source", "workspace", "revision", "updated_at", "title", "status", "priority", "labels", "body_preview", "claimed_by", "spec", "criteria_total", "criteria_completed", "created_via" ], "additionalProperties": {} } }, "has_more": { "type": "boolean" } }, "required": [ "items", "has_more" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /tasks/v1/workspaces/ensure Register a workspace (git repository) in your agency, or return it if it exists. Returns workspace_id (derived from the key; a salt is added only on a rare collision) and max_counter, the highest task counter this device already pushed. ```json { "operationId": "post_tasks_v1_workspaces_ensure", "tags": [ "task-service" ], "summary": "Ensure workspace", "description": "Register a workspace (git repository) in your agency, or return it if it exists. Returns workspace_id (derived from the key; a salt is added only on a rare collision) and max_counter, the highest task counter this device already pushed. Account session or approved device credential; some sync operations require a device. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_TASKS (4).", "x-access": "device", "x-api-key-supported": true, "x-permission-bit": 4, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] }, { "DeviceCredential": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "key": { "type": "string", "minLength": 1, "maxLength": 200 }, "name": { "type": "string", "maxLength": 200 }, "remote_url": { "type": "string", "maxLength": 500 } }, "required": [ "key" ], "additionalProperties": false } } } }, "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/tasks/v1/workspaces/ensure' --method POST --headers '{\"Content-Type\":\"application/json\"}' --body - < request.json\n# request.json must match this operation’s request schema." } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "workspace_id": { "type": "number" }, "key": { "type": "string" }, "salt": { "type": "number" }, "name": { "type": "string" }, "remote_url": { "type": "string" }, "created_by": { "type": "string" }, "created_at": { "type": "string" }, "max_counter": { "type": "number" } }, "required": [ "workspace_id", "key", "salt", "name", "remote_url", "created_by", "created_at", "max_counter" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /tasks/v1/workspaces Workspaces registered in your agency. ```json { "operationId": "get_tasks_v1_workspaces", "tags": [ "task-service" ], "summary": "List workspaces", "description": "Workspaces registered in your agency. Account session or approved device credential; some sync operations require a device. API Keys also need x-api-key-supported. API Keys are supported. Required permission: VIEW_TASKS (8).", "x-access": "device", "x-api-key-supported": true, "x-permission-bit": 8, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] }, { "DeviceCredential": [] } ], "parameters": [], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/tasks/v1/workspaces' --method GET" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "workspace_id": { "type": "number" }, "key": { "type": "string" }, "salt": { "type": "number" }, "name": { "type": "string" }, "remote_url": { "type": "string" }, "created_by": { "type": "string" }, "created_at": { "type": "string" } }, "required": [ "workspace_id", "key", "salt", "name", "remote_url", "created_by", "created_at" ], "additionalProperties": {} } } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /tasks/v1/nodes/me The node (dynamic key) this device mints task ids with, the epoch of the 41-bit timestamp, and the newest timestamp this node already used, so a reinstalled machine never repeats an id. ```json { "operationId": "get_tasks_v1_nodes_me", "tags": [ "task-service" ], "summary": "Get task ID node", "description": "The node (dynamic key) this device mints task ids with, the epoch of the 41-bit timestamp, and the newest timestamp this node already used, so a reinstalled machine never repeats an id. Account session or approved device credential; some sync operations require a device. API Keys also need x-api-key-supported. API Keys are not supported; use the declared account, device or webhook credential.", "x-access": "device", "x-api-key-supported": false, "x-permission-bit": 8, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "DeviceCredential": [] } ], "parameters": [], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "node": { "type": [ "number", "null" ] }, "epoch": { "type": "number" }, "last_timestamp": { "type": [ "number", "null" ] } }, "required": [ "node", "epoch", "last_timestamp" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /tasks/v1/server-tasks Create a server task with the agency dynamic key and recorded creator. Members see only what they created; admins see the tenant. ```json { "operationId": "post_tasks_v1_server_tasks", "tags": [ "task-service" ], "summary": "Create server task", "description": "Create a server task with the agency dynamic key and recorded creator. Members see only what they created; admins see the tenant. Account session or approved device credential; some sync operations require a device. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_TASKS (4).", "x-access": "device", "x-api-key-supported": true, "x-permission-bit": 4, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] }, { "DeviceCredential": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 1000 }, "status": { "default": "backlog", "type": "string", "enum": [ "icebox", "backlog", "in_progress", "in_review", "blocked", "done" ] }, "priority": { "default": "medium", "type": "string", "minLength": 1, "maxLength": 100 }, "body": { "default": "", "type": "string", "maxLength": 200000 }, "labels": { "default": [], "maxItems": 100, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 100 } }, "workspace": { "default": "", "type": "string", "maxLength": 200 }, "plan": { "default": null, "anyOf": [ { "type": "string", "maxLength": 200000 }, { "type": "null" } ] }, "criteria": { "default": [], "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "text": { "type": "string", "maxLength": 2000 }, "completed": { "type": "boolean" } }, "required": [ "text", "completed" ] } }, "notes": { "default": [], "maxItems": 500, "type": "array", "items": { "type": "string", "maxLength": 20000 } } }, "required": [ "title" ], "additionalProperties": false } } } }, "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/tasks/v1/server-tasks' --method POST --headers '{\"Content-Type\":\"application/json\"}' --body - < request.json\n# request.json must match this operation’s request schema." } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "key": { "type": "string" }, "local_key": { "type": "string" }, "workspace": { "type": "string" }, "revision": { "type": "string", "pattern": "^\\d+$" }, "seq": { "type": "string", "pattern": "^\\d+$" }, "deleted": { "type": "boolean" }, "payload": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "created_by": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": [ "key", "local_key", "workspace", "revision", "seq", "deleted", "payload", "created_by", "created_at", "updated_at" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /tasks/v1/server-tasks List server tasks ordered by change sequence; pass after= to pull only newer changes. ```json { "operationId": "get_tasks_v1_server_tasks", "tags": [ "task-service" ], "summary": "List server tasks", "description": "List server tasks ordered by change sequence; pass after= to pull only newer changes. Account session or approved device credential; some sync operations require a device. API Keys also need x-api-key-supported. API Keys are supported. Required permission: VIEW_TASKS (8).", "x-access": "device", "x-api-key-supported": true, "x-permission-bit": 8, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] }, { "DeviceCredential": [] } ], "parameters": [ { "name": "after", "in": "query", "required": false, "description": "after (sequence cursor)", "schema": { "type": "string", "pattern": "^\\d+$", "default": "0" } }, { "name": "workspace", "in": "query", "required": false, "description": "workspace", "schema": { "type": "string" } }, { "name": "status", "in": "query", "required": false, "description": "status", "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "description": "limit (1-200, default 50)", "schema": { "type": "integer", "minimum": 1, "maximum": 200, "default": 50 } } ], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/tasks/v1/server-tasks' --method GET" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "local_key": { "type": "string" }, "workspace": { "type": "string" }, "revision": { "type": "string", "pattern": "^\\d+$" }, "seq": { "type": "string", "pattern": "^\\d+$" }, "deleted": { "type": "boolean" }, "payload": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "created_by": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": [ "key", "local_key", "workspace", "revision", "seq", "deleted", "payload", "created_by", "created_at", "updated_at" ], "additionalProperties": {} } } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /tasks/v1/server-tasks/{key} One server task by display key (BF-...). ```json { "operationId": "get_tasks_v1_server_tasks_key", "tags": [ "task-service" ], "summary": "Get server task", "description": "One server task by display key (BF-...). Account session or approved device credential; some sync operations require a device. API Keys also need x-api-key-supported. API Keys are supported. Required permission: VIEW_TASKS (8).", "x-access": "device", "x-api-key-supported": true, "x-permission-bit": 8, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] }, { "DeviceCredential": [] } ], "parameters": [ { "name": "key", "in": "path", "required": true, "schema": { "type": "string" } } ], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/tasks/v1/server-tasks/{key}' --method GET" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "key": { "type": "string" }, "local_key": { "type": "string" }, "workspace": { "type": "string" }, "revision": { "type": "string", "pattern": "^\\d+$" }, "seq": { "type": "string", "pattern": "^\\d+$" }, "deleted": { "type": "boolean" }, "payload": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "created_by": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": [ "key", "local_key", "workspace", "revision", "seq", "deleted", "payload", "created_by", "created_at", "updated_at" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### PATCH /tasks/v1/server-tasks/{key} Edit a server task. revision must equal the current one; the first writer wins and later ones get 409 REVISION_CONFLICT and must reload. ```json { "operationId": "patch_tasks_v1_server_tasks_key", "tags": [ "task-service" ], "summary": "Update server task", "description": "Edit a server task. revision must equal the current one; the first writer wins and later ones get 409 REVISION_CONFLICT and must reload. Account session or approved device credential; some sync operations require a device. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_TASKS (4).", "x-access": "device", "x-api-key-supported": true, "x-permission-bit": 4, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] }, { "DeviceCredential": [] } ], "parameters": [ { "name": "key", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 1000 }, "status": { "type": "string", "enum": [ "icebox", "backlog", "in_progress", "in_review", "blocked", "done" ] }, "priority": { "type": "string", "minLength": 1, "maxLength": 100 }, "body": { "type": "string", "maxLength": 200000 }, "labels": { "maxItems": 100, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 100 } }, "workspace": { "type": "string", "maxLength": 200 }, "plan": { "anyOf": [ { "type": "string", "maxLength": 200000 }, { "type": "null" } ] }, "criteria": { "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "text": { "type": "string", "maxLength": 2000 }, "completed": { "type": "boolean" } }, "required": [ "text", "completed" ] } }, "notes": { "maxItems": 500, "type": "array", "items": { "type": "string", "maxLength": 20000 } }, "revision": { "type": "string", "pattern": "^\\d+$" }, "deleted": { "type": "boolean", "const": true } }, "required": [ "revision" ], "additionalProperties": false } } } }, "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/tasks/v1/server-tasks/{key}' --method PATCH --headers '{\"Content-Type\":\"application/json\"}' --body - < request.json\n# request.json must match this operation’s request schema." } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "key": { "type": "string" }, "local_key": { "type": "string" }, "workspace": { "type": "string" }, "revision": { "type": "string", "pattern": "^\\d+$" }, "seq": { "type": "string", "pattern": "^\\d+$" }, "deleted": { "type": "boolean" }, "payload": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "created_by": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": [ "key", "local_key", "workspace", "revision", "seq", "deleted", "payload", "created_by", "created_at", "updated_at" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /tasks/v1/tasks/{id} One synced task. ```json { "operationId": "get_tasks_v1_tasks_id", "tags": [ "task-service" ], "summary": "Get synced task", "description": "One synced task. Account session or approved device credential; some sync operations require a device. API Keys also need x-api-key-supported. API Keys are supported. Required permission: VIEW_TASKS (8).", "x-access": "device", "x-api-key-supported": true, "x-permission-bit": 8, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] }, { "DeviceCredential": [] } ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/tasks/v1/tasks/{id}' --method GET" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "tenant_id": { "type": "string" }, "account_id": { "type": "string" }, "device_id": { "type": "string" }, "workspace": { "type": "string" }, "local_key": { "type": "string" }, "display_key": { "type": "string" }, "revision": { "type": "string", "pattern": "^\\d+$" }, "payload": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "deleted": { "type": "boolean" } }, "required": [ "id", "tenant_id", "account_id", "device_id", "workspace", "local_key", "display_key", "revision", "payload", "deleted" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /storage/v1/attachments List attachments; optionally filter by a device task UUID or server task BF key. ```json { "operationId": "get_storage_v1_attachments", "tags": [ "storage-service" ], "summary": "List attachments", "description": "List attachments; optionally filter by a device task UUID or server task BF key. Account session or approved device credential; some sync operations require a device. API Keys also need x-api-key-supported. API Keys are supported. Required permission: VIEW_TASKS (8).", "x-access": "device", "x-api-key-supported": true, "x-permission-bit": 8, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] }, { "DeviceCredential": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "description": "limit (1-200, default 50)", "schema": { "type": "integer", "minimum": 1, "maximum": 200, "default": 50 } }, { "name": "offset", "in": "query", "required": false, "description": "offset (default 0)", "schema": { "type": "integer", "minimum": 0, "default": 0 } }, { "name": "task_id", "in": "query", "required": false, "description": "task_id (optional UUID or BF key)", "schema": { "type": "string" } } ], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/storage/v1/attachments' --method GET" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "task_id": { "type": "string" }, "filename": { "type": "string" }, "size": { "type": "number" }, "content_type": { "type": "string" }, "checksum": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "uploading", "uploaded", "ready", "deleted" ] }, "created_at": { "type": "string" }, "expires_at": { "type": "string" } }, "required": [ "id", "task_id", "filename", "size", "content_type", "checksum", "status", "created_at", "expires_at" ], "additionalProperties": {} } } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /storage/v1/attachments Start or resume an upload; X-Request-ID UUID makes retries idempotent. ```json { "operationId": "post_storage_v1_attachments", "tags": [ "storage-service" ], "summary": "Start attachment upload", "description": "Start or resume an upload; X-Request-ID UUID makes retries idempotent. Account session or approved device credential; some sync operations require a device. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_TASKS (4). Repeat X-Request-ID with the same body after an ambiguous response to reuse the attachment.", "x-access": "device", "x-api-key-supported": true, "x-permission-bit": 4, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] }, { "DeviceCredential": [] } ], "parameters": [ { "name": "X-Request-ID", "in": "header", "required": false, "description": "UUID; reuse with the same body to retry an ambiguous upload-intent response.", "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "task_id": { "anyOf": [ { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "string", "pattern": "^BF-[1-9A-HJ-NP-Za-km-z]{1,22}$" } ] }, "filename": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[^\\/\\\\\\x00-\\x1f\\x7f]+$" }, "size": { "type": "integer", "minimum": 1, "maximum": 52428800 }, "content_type": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[a-zA-Z0-9!#$&^_.+-]+\\/[a-zA-Z0-9!#$&^_.+-]+$" }, "checksum": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, "required": [ "task_id", "filename", "size", "content_type", "checksum" ], "additionalProperties": false } } } }, "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/storage/v1/attachments' --method POST --headers '{\"Content-Type\":\"application/json\"}' --body - < request.json\n# request.json must match this operation’s request schema." } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "status": { "type": "string" }, "upload_url": { "type": "string" } }, "required": [ "id", "status", "upload_url" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### PUT /storage/v1/attachments/{id}/content Upload the bytes (Content-Length required, up to 50 MiB). ```json { "operationId": "put_storage_v1_attachments_id_content", "tags": [ "storage-service" ], "summary": "Upload attachment", "description": "Upload the bytes (Content-Length required, up to 50 MiB). Account session or approved device credential; some sync operations require a device. API Keys also need x-api-key-supported. API Keys are not supported; use the declared account, device or webhook credential. Body is the raw file.", "x-access": "device", "x-api-key-supported": false, "x-permission-bit": 4, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "DeviceCredential": [] } ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "Content-Length", "in": "header", "required": true, "description": "File size in bytes; 1 to 50 MiB.", "schema": { "type": "integer", "minimum": 1, "maximum": 52428800 } } ], "requestBody": { "required": true, "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "status": { "type": "string", "const": "uploaded" } }, "required": [ "id", "status" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /storage/v1/attachments/{id}/complete Verify size and checksum and mark the attachment ready. ```json { "operationId": "post_storage_v1_attachments_id_complete", "tags": [ "storage-service" ], "summary": "Complete attachment upload", "description": "Verify size and checksum and mark the attachment ready. Account session or approved device credential; some sync operations require a device. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_TASKS (4).", "x-access": "device", "x-api-key-supported": true, "x-permission-bit": 4, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] }, { "DeviceCredential": [] } ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/storage/v1/attachments/{id}/complete' --method POST" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "task_id": { "type": "string" }, "filename": { "type": "string" }, "size": { "type": "number" }, "content_type": { "type": "string" }, "checksum": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "uploading", "uploaded", "ready", "deleted" ] }, "created_at": { "type": "string" }, "expires_at": { "type": "string" } }, "required": [ "id", "task_id", "filename", "size", "content_type", "checksum", "status", "created_at", "expires_at" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /storage/v1/attachments/{id}/download Download the file bytes. ```json { "operationId": "get_storage_v1_attachments_id_download", "tags": [ "storage-service" ], "summary": "Download attachment", "description": "Download the file bytes. Account session or approved device credential; some sync operations require a device. API Keys also need x-api-key-supported. API Keys are not supported; use the declared account, device or webhook credential.", "x-access": "device", "x-api-key-supported": false, "x-permission-bit": 8, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "DeviceCredential": [] } ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "File bytes.", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### DELETE /storage/v1/attachments/{id} Delete an attachment. ```json { "operationId": "delete_storage_v1_attachments_id", "tags": [ "storage-service" ], "summary": "Delete attachment", "description": "Delete an attachment. Account session or approved device credential; some sync operations require a device. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_TASKS (4).", "x-access": "device", "x-api-key-supported": true, "x-permission-bit": 4, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] }, { "DeviceCredential": [] } ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/storage/v1/attachments/{id}' --method DELETE" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "status": { "type": "string", "const": "deleted" } }, "required": [ "id", "status" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /global/v1/agencies List agencies (flat; build the tree from parent_code). ```json { "operationId": "get_global_v1_agencies", "tags": [ "directory-service" ], "summary": "List agencies", "description": "List agencies (flat; build the tree from parent_code). Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_ROLES (16).", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 16, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "description": "limit (1-200, default 50)", "schema": { "type": "integer", "minimum": 1, "maximum": 200, "default": 50 } }, { "name": "offset", "in": "query", "required": false, "description": "offset (default 0)", "schema": { "type": "integer", "minimum": 0, "default": 0 } } ], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/global/v1/agencies' --method GET" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "number" }, "code": { "type": "string" }, "name": { "type": "string" }, "parent_code": { "type": [ "string", "null" ] }, "level": { "type": "number" }, "path": { "type": "string" }, "db_name": { "type": "string" }, "db_host": { "type": "string" }, "is_active": { "type": "boolean" }, "phone": { "type": "string" }, "address": { "type": "string" }, "status": { "type": "number" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" }, "dynamic_key": { "type": [ "string", "null" ] }, "db_state": { "type": [ "string", "null" ] }, "already_provisioned": { "type": "boolean" } }, "required": [ "id", "code", "name", "parent_code", "level", "path", "db_name", "db_host", "is_active", "phone", "address", "status", "created_at", "updated_at", "dynamic_key", "db_state" ], "additionalProperties": {} } }, "code": { "type": "number", "const": 200 }, "paging": { "type": "object", "properties": { "total": { "type": "number" }, "limit": { "type": "number" }, "offset": { "type": "number" }, "page": { "type": "number" } }, "required": [ "total", "limit", "offset", "page" ], "additionalProperties": {} } }, "required": [ "data", "code", "paging" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /global/v1/agencies/{code} One agency by code. ```json { "operationId": "get_global_v1_agencies_code", "tags": [ "directory-service" ], "summary": "Get agency", "description": "One agency by code. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_ROLES (16).", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 16, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [ { "name": "code", "in": "path", "required": true, "schema": { "type": "string" } } ], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/global/v1/agencies/{code}' --method GET" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "number" }, "code": { "type": "string" }, "name": { "type": "string" }, "parent_code": { "type": [ "string", "null" ] }, "level": { "type": "number" }, "path": { "type": "string" }, "db_name": { "type": "string" }, "db_host": { "type": "string" }, "is_active": { "type": "boolean" }, "phone": { "type": "string" }, "address": { "type": "string" }, "status": { "type": "number" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" }, "dynamic_key": { "type": [ "string", "null" ] }, "db_state": { "type": [ "string", "null" ] }, "already_provisioned": { "type": "boolean" } }, "required": [ "id", "code", "name", "parent_code", "level", "path", "db_name", "db_host", "is_active", "phone", "address", "status", "created_at", "updated_at", "dynamic_key", "db_state" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /global/v1/agencies Root agency admin with MANAGE_ROLES only: create an agency; parent_code makes it a sub-agency. ```json { "operationId": "post_global_v1_agencies", "tags": [ "directory-service" ], "summary": "Create agency", "description": "Root agency admin with MANAGE_ROLES only: create an agency; parent_code makes it a sub-agency. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_ROLES (16). Root agency (agency 1) administrator only.", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 16, "x-root-agency-only": true, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "code": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]{1,99}$" }, "name": { "type": "string", "minLength": 1, "maxLength": 255 }, "parent_code": { "anyOf": [ { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]{1,99}$" }, { "type": "null" } ] }, "phone": { "default": "", "type": "string", "maxLength": 20 }, "address": { "default": "", "type": "string", "maxLength": 500 } }, "required": [ "code", "name" ], "additionalProperties": false } } } }, "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/global/v1/agencies' --method POST --headers '{\"Content-Type\":\"application/json\"}' --body - < request.json\n# request.json must match this operation’s request schema." } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "number" }, "code": { "type": "string" }, "name": { "type": "string" }, "parent_code": { "type": [ "string", "null" ] }, "level": { "type": "number" }, "path": { "type": "string" }, "db_name": { "type": "string" }, "db_host": { "type": "string" }, "is_active": { "type": "boolean" }, "phone": { "type": "string" }, "address": { "type": "string" }, "status": { "type": "number" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" }, "dynamic_key": { "type": [ "string", "null" ] }, "db_state": { "type": [ "string", "null" ] }, "already_provisioned": { "type": "boolean" } }, "required": [ "id", "code", "name", "parent_code", "level", "path", "db_name", "db_host", "is_active", "phone", "address", "status", "created_at", "updated_at", "dynamic_key", "db_state" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### DELETE /global/v1/agencies/{code} Soft-delete an agency that has no sub-agencies. ```json { "operationId": "delete_global_v1_agencies_code", "tags": [ "directory-service" ], "summary": "Delete agency", "description": "Soft-delete an agency that has no sub-agencies. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_ROLES (16).", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 16, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [ { "name": "code", "in": "path", "required": true, "schema": { "type": "string" } } ], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/global/v1/agencies/{code}' --method DELETE" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "boolean", "const": true } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /global/v1/agencies/{code}/provision-database Not supported on this platform; always 501. ```json { "operationId": "post_global_v1_agencies_code_provision_database", "tags": [ "directory-service" ], "summary": "Provision agency database", "description": "Not supported on this platform; always 501. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are not supported; use the declared account, device or webhook credential.", "x-access": "admin", "x-api-key-supported": false, "x-permission-bit": 16, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] } ], "parameters": [ { "name": "code", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "501": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /global/v1/roles List permission roles (each owns one bit). ```json { "operationId": "get_global_v1_roles", "tags": [ "directory-service" ], "summary": "List roles", "description": "List permission roles (each owns one bit). Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_ROLES (16).", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 16, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/global/v1/roles' --method GET" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "number" }, "name": { "type": "string" }, "display_name": { "type": "string" }, "bit_value": { "type": "number" }, "description": { "type": "string" } }, "required": [ "id", "name", "display_name", "bit_value", "description" ], "additionalProperties": {} } }, "code": { "type": "number", "const": 200 }, "paging": { "type": "object", "properties": { "total": { "type": "number" }, "limit": { "type": "number" }, "offset": { "type": "number" }, "page": { "type": "number" } }, "required": [ "total", "limit", "offset", "page" ], "additionalProperties": {} } }, "required": [ "data", "code", "paging" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /global/v1/roles Create a role; the next free bit is assigned. ```json { "operationId": "post_global_v1_roles", "tags": [ "directory-service" ], "summary": "Create role", "description": "Create a role; the next free bit is assigned. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_ROLES (16).", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 16, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "name": { "type": "string", "pattern": "^[a-z][a-z0-9_]{1,63}$" }, "display_name": { "type": "string", "minLength": 1, "maxLength": 100 }, "description": { "default": "", "type": "string", "maxLength": 500 } }, "required": [ "name" ], "additionalProperties": false } } } }, "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/global/v1/roles' --method POST --headers '{\"Content-Type\":\"application/json\"}' --body - < request.json\n# request.json must match this operation’s request schema." } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "number" }, "name": { "type": "string" }, "display_name": { "type": "string" }, "bit_value": { "type": "number" }, "description": { "type": "string" } }, "required": [ "id", "name", "display_name", "bit_value", "description" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /conversations/v1/telegram/webhook Telegram bot webhook. Authenticated by the X-Telegram-Bot-Api-Secret-Token header; not for clients. ```json { "operationId": "post_conversations_v1_telegram_webhook", "tags": [ "conversation-service" ], "summary": "Receive Telegram webhook", "description": "Telegram bot webhook. Authenticated by the X-Telegram-Bot-Api-Secret-Token header; not for clients. Telegram only: X-Telegram-Bot-Api-Secret-Token header. API Keys are not supported; use the declared account, device or webhook credential. Body is a Telegram Update.", "x-access": "webhook", "x-api-key-supported": false, "x-permission-bit": 32, "x-root-agency-only": false, "security": [ { "TelegramWebhook": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Telegram Update; unsupported updates are acknowledged with status ignored.", "additionalProperties": true } } } }, "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "status": { "type": "string" } }, "required": [ "status" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### POST /conversations/v1/link-codes Create a one-time code (valid 10 minutes). Send `/link ` to the Telegram bot to let it read and edit tasks as this account. ```json { "operationId": "post_conversations_v1_link_codes", "tags": [ "conversation-service" ], "summary": "Create Telegram link code", "description": "Create a one-time code (valid 10 minutes). Send `/link ` to the Telegram bot to let it read and edit tasks as this account. Account session. API Keys are accepted only when x-api-key-supported is true. API Keys are not supported; use the declared account, device or webhook credential.", "x-access": "session", "x-api-key-supported": false, "x-permission-bit": 32, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] } ], "parameters": [], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "code": { "type": "string" }, "expires_at": { "type": "string" } }, "required": [ "code", "expires_at" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /conversations/v1/conversations List chat sessions, newest activity first. ```json { "operationId": "get_conversations_v1_conversations", "tags": [ "conversation-service" ], "summary": "List conversations", "description": "List chat sessions, newest activity first. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: VIEW_REPORTS (64).", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 64, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "description": "limit (1-200, default 50)", "schema": { "type": "integer", "minimum": 1, "maximum": 200, "default": 50 } }, { "name": "offset", "in": "query", "required": false, "description": "offset (default 0)", "schema": { "type": "integer", "minimum": 0, "default": 0 } } ], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/conversations/v1/conversations' --method GET" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "channel": { "type": "string" }, "external_chat_id": { "type": "string" }, "title": { "type": "string" }, "username": { "type": "string" }, "message_count": { "type": "number" }, "last_message": { "type": "string" }, "last_message_at": { "type": [ "string", "null" ] }, "created_at": { "type": "string" } }, "required": [ "id", "channel", "external_chat_id", "title", "username", "message_count", "last_message", "last_message_at", "created_at" ], "additionalProperties": {} } }, "code": { "type": "number", "const": 200 }, "paging": { "type": "object", "properties": { "total": { "type": "number" }, "limit": { "type": "number" }, "offset": { "type": "number" }, "page": { "type": "number" } }, "required": [ "total", "limit", "offset", "page" ], "additionalProperties": {} } }, "required": [ "data", "code", "paging" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /conversations/v1/conversations/{id} One conversation. ```json { "operationId": "get_conversations_v1_conversations_id", "tags": [ "conversation-service" ], "summary": "Get conversation", "description": "One conversation. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: VIEW_REPORTS (64).", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 64, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/conversations/v1/conversations/{id}' --method GET" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "channel": { "type": "string" }, "external_chat_id": { "type": "string" }, "title": { "type": "string" }, "username": { "type": "string" }, "message_count": { "type": "number" }, "last_message": { "type": "string" }, "last_message_at": { "type": [ "string", "null" ] }, "created_at": { "type": "string" } }, "required": [ "id", "channel", "external_chat_id", "title", "username", "message_count", "last_message", "last_message_at", "created_at" ], "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### GET /conversations/v1/conversations/{id}/messages Messages of a conversation, oldest first. ```json { "operationId": "get_conversations_v1_conversations_id_messages", "tags": [ "conversation-service" ], "summary": "List messages", "description": "Messages of a conversation, oldest first. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: VIEW_REPORTS (64).", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 64, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "description": "limit (1-200, default 50)", "schema": { "type": "integer", "minimum": 1, "maximum": 200, "default": 50 } }, { "name": "offset", "in": "query", "required": false, "description": "offset (default 0)", "schema": { "type": "integer", "minimum": 0, "default": 0 } } ], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/conversations/v1/conversations/{id}/messages' --method GET" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "role": { "type": "string" }, "content": { "type": "string" }, "created_at": { "type": "string" } }, "required": [ "id", "role", "content", "created_at" ], "additionalProperties": {} } } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ``` ### DELETE /conversations/v1/conversations/{id} Delete a conversation and its messages. ```json { "operationId": "delete_conversations_v1_conversations_id", "tags": [ "conversation-service" ], "summary": "Delete conversation", "description": "Delete a conversation and its messages. Administrator and the required permission bit. API Keys also need x-api-key-supported. API Keys are supported. Required permission: MANAGE_SETTINGS (32).", "x-access": "admin", "x-api-key-supported": true, "x-permission-bit": 32, "x-root-agency-only": false, "security": [ { "AccountSession": [] }, { "SessionCookie": [] }, { "ApiKey": [] } ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "x-codeSamples": [ { "lang": "Shell", "label": "Buffalo token alias", "source": "buffalo api_request --alias buffalo-orbit-api --url 'https://dashboard.buffaloorbit.com/conversations/v1/conversations/{id}' --method DELETE" } ], "responses": { "200": { "description": "Success.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "type": "boolean", "const": true } }, "required": [ "data" ], "additionalProperties": {} } } } }, "4XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "5XX": { "description": "Error code and message; validation errors may include issues.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } ```