{"components":{"securitySchemes":{"apiKey":{"bearerFormat":"de_…","description":"A workspace API key, sent as `Authorization: Bearer de_…`. Its scope decides what it may do, each including the one before:\n\n- `read` (Read): Read records, their activity and related records, and the schema: objects, fields, views, page layouts, data sources and plugins; run read-only SQL against the workspace's databases, on any table their connections can read.\n- `write` (Write): Everything Read allows, plus create, change and delete records and add notes to them; change objects and fields; change views and page layouts for yourself; run plugin actions; see and disconnect your own connected apps; leave the workspace.\n- `admin` (Admin): Everything Write allows, plus what owners and admins do: connect and disconnect databases and change their connections and access, add tables and columns to a database that allows schema changes, delete objects and fields and change an object's record key, make, reorder and delete views and save views and page layouts for everyone, manage plugins, API keys, everyone's connected apps and the team, choose the model agents run on, and rename the workspace (an owner's key or app may also delete it). Owners and admins only.\n\nA key's scope is never above what its creator's role holds now: members reach `write`, owners and admins `admin`.","scheme":"bearer","type":"http"},"sessionCookie":{"description":"The better-auth session cookie, set by signing in at /auth/login. Deployments served over https name it `__Secure-better-auth.session_token`; plain-http local development uses `better-auth.session_token`. A person may belong to several workspaces: each call names the one it is for (the body's `workspace`).","in":"cookie","name":"__Secure-better-auth.session_token","type":"apiKey"}},"schemas":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}]},"UndefinedError":{"title":"UndefinedError","type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"message":{"type":"string"},"data":{}},"required":["defined","code","message"]},"Unauthorized":{"title":"UNAUTHORIZED","type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"message":{"type":"string"},"data":{}},"required":["defined","code","message"]},"Forbidden":{"title":"FORBIDDEN","type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"data":{}},"required":["defined","code","message"]},"NotFound":{"title":"NOT_FOUND","type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"data":{}},"required":["defined","code","message"]},"SqlError":{"title":"SQL_ERROR","type":"object","properties":{"defined":{"const":true},"code":{"const":"SQL_ERROR"},"message":{"type":"string"},"data":{"type":"object","properties":{"code":{"type":"string"},"position":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["code","position"],"additionalProperties":false}},"required":["defined","code","message","data"]},"TooManyRequests":{"title":"TOO_MANY_REQUESTS","type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"message":{"type":"string"},"data":{}},"required":["defined","code","message"]}}},"externalDocs":{"description":"API guide","url":"https://www.dataembed.com/docs/api"},"info":{"contact":{"email":"kai@kyh.io","url":"https://www.dataembed.com/contact"},"description":"The Dataembed API: the CRM's whole surface — objects and their fields, records, saved views, data sources, plugins, settings, API keys and the team — the same operations the app and its copilot use.\n\nEvery operation is a POST with a JSON body; errors are JSON with `code` and `message`.\n\nAn operation in a workspace names it in its body: `workspace`, the workspace's slug (`acme-k3x9q0`, the first segment of its pages' URLs). A key names its own workspace; it is refused in any other.\n\nAuthenticate scripts and agents with a workspace API key (`Authorization: Bearer de_…`, created in Settings → AI & agents). A key acts in its own workspace for the person who made it, with the scope it was given (listed under the `apiKey` scheme), capped by their role now; changes are recorded under the key's name.\n\nEach operation's `x-dataembed-access` says who may call it: `callers` (`agents`: API keys too; `people`: only someone signed in; `anyone`: no credential needed), the `scope` a key needs, `ownerOnly` when only an owner's key may call it, and `irreversible` when nothing undoes it.\n\nThe few `people` operations — a person's workspaces, an invitation sent to them, the operators' waitlist — need the session cookie (the `sessionCookie` scheme), refuse API keys and name no workspace.\n\nAgents that speak MCP can use the same API key at /api/mcp instead, or connect there by signing in (OAuth); the access tokens of apps connected that way work only at /api/mcp.","title":"Dataembed API","version":"1.0.0"},"security":[{"apiKey":[]},{"sessionCookie":[]}],"servers":[{"url":"/api/v1"}],"openapi":"3.1.2","paths":{"/activity/comment":{"post":{"operationId":"activity.comment","summary":"Add a note to a record's timeline","description":"Adds a note to a record's timeline, as the person this credential acts for.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":10000},"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"recordId":{"type":"string","minLength":1,"maxLength":1000,"description":"Record id: its key's value (a JSON array for a composite key)"}},"required":["message","object","recordId"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"entry":{"allOf":[{"type":"object","properties":{"actor":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["user","agent","plugin","api_key","oauth","system"]}},"required":["id","name","type"],"additionalProperties":false},"agentSessionId":{"type":["string","null"]},"createdAt":{"type":"string"},"id":{"type":"string"},"objectId":{"type":["string","null"]},"objectLabel":{"type":["string","null"]},"recordId":{"type":["string","null"]},"revertsId":{"type":["string","null"]},"undo":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"undoable"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"by":{"type":"object","properties":{"actorName":{"type":"string"},"createdAt":{"type":"string"},"id":{"type":"string"}},"required":["actorName","createdAt","id"],"additionalProperties":false},"state":{"type":"string","const":"undone"}},"required":["by","state"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["final","cleared","no_change","plugin_deleted","forbidden"]},"reason":{"type":"string"},"state":{"type":"string","const":"refused"}},"required":["code","reason","state"],"additionalProperties":false}]},"viewName":{"type":["string","null"]}},"required":["actor","agentSessionId","createdAt","id","objectId","objectLabel","recordId","revertsId","undo","viewName"],"additionalProperties":false},{"oneOf":[{"oneOf":[{"type":"object","properties":{"changes":{"type":"array","items":{"type":"object","properties":{"after":{"$ref":"#/components/schemas/__schema0"},"attributeId":{"type":"string"}},"required":["after","attributeId"],"additionalProperties":false}},"kind":{"type":"string","const":"record_created"},"cleared":{"type":"boolean","const":false}},"required":["changes","kind"],"additionalProperties":false},{"type":"object","properties":{"changes":{"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string"}},"required":["attributeId"],"additionalProperties":false}},"kind":{"type":"string","const":"record_created"},"cleared":{"type":"boolean","const":true}},"required":["changes","kind","cleared"],"additionalProperties":false}]},{"oneOf":[{"type":"object","properties":{"changes":{"type":"array","items":{"type":"object","properties":{"after":{"$ref":"#/components/schemas/__schema0"},"attributeId":{"type":"string"},"before":{"$ref":"#/components/schemas/__schema0"},"provenance":{"type":"object","properties":{"actor":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["user","agent","plugin","api_key","oauth","system"]}},"required":["id","name","type"],"additionalProperties":false},"evidence":{"type":"string","maxLength":4000},"model":{"type":"string","maxLength":200},"reasoning":{"type":"string","maxLength":4000},"sources":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["url"],"additionalProperties":false}}},"additionalProperties":false}},"required":["after","attributeId","before"],"additionalProperties":false}},"kind":{"type":"string","const":"record_updated"},"cleared":{"type":"boolean","const":false}},"required":["changes","kind"],"additionalProperties":false},{"type":"object","properties":{"changes":{"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string"}},"required":["attributeId"],"additionalProperties":false}},"kind":{"type":"string","const":"record_updated"},"cleared":{"type":"boolean","const":true}},"required":["changes","kind","cleared"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","const":"record_deleted"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"comment"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"after":{"type":"object","propertyNames":{"type":"string","maxLength":200,"pattern":"^[a-z][A-Za-z]*(?::\\S+)?$"},"additionalProperties":{"type":"object","properties":{"base":{"$ref":"#/components/schemas/__schema0"},"value":{"$ref":"#/components/schemas/__schema0"}},"required":["value"],"additionalProperties":false}},"audience":{"type":"string","enum":["everyone","me"]},"before":{"type":"object","propertyNames":{"type":"string","maxLength":200,"pattern":"^[a-z][A-Za-z]*(?::\\S+)?$"},"additionalProperties":{"type":"object","properties":{"base":{"$ref":"#/components/schemas/__schema0"},"value":{"$ref":"#/components/schemas/__schema0"}},"required":["value"],"additionalProperties":false}},"kind":{"type":"string","const":"layer_updated"},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"view"},"viewId":{"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)$"}},"required":["kind","viewId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"shell"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"home"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"record"},"objectId":{"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)$"}},"required":["kind","objectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"plugin"},"pluginId":{"type":"string","pattern":"^ws-[a-z][a-z0-9-]{0,56}$"}},"required":["kind","pluginId"],"additionalProperties":false}]},"cleared":{"type":"boolean","const":false}},"required":["after","audience","before","kind","target"],"additionalProperties":false},{"type":"object","properties":{"audience":{"type":"string","enum":["everyone","me"]},"kind":{"type":"string","const":"layer_updated"},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"view"},"viewId":{"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)$"}},"required":["kind","viewId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"shell"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"home"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"record"},"objectId":{"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)$"}},"required":["kind","objectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"plugin"},"pluginId":{"type":"string","pattern":"^ws-[a-z][a-z0-9-]{0,56}$"}},"required":["kind","pluginId"],"additionalProperties":false}]},"cleared":{"type":"boolean","const":true}},"required":["audience","kind","target","cleared"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","const":"view_created"},"name":{"type":"string"},"viewId":{"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)$"}},"required":["kind","name","viewId"],"additionalProperties":false},{"type":"object","properties":{"after":{"type":"object","properties":{"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false},"before":{"type":"object","properties":{"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false},"kind":{"type":"string","const":"view_updated"},"viewId":{"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)$"}},"required":["after","before","kind","viewId"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"view_deleted"},"layers":{"type":"array","items":{"type":"object","properties":{"fields":{"type":"object","propertyNames":{"type":"string","maxLength":200,"pattern":"^[a-z][A-Za-z]*(?::\\S+)?$"},"additionalProperties":{"type":"object","properties":{"base":{"$ref":"#/components/schemas/__schema0"},"value":{"$ref":"#/components/schemas/__schema0"}},"required":["value"],"additionalProperties":false}},"userId":{"type":["string","null"]}},"required":["fields","userId"],"additionalProperties":false}},"view":{"type":"object","properties":{"createdBy":{"type":["string","null"]},"id":{"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)$"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["createdBy","id","name","position"],"additionalProperties":false},"cleared":{"type":"boolean","const":false}},"required":["kind","layers","view"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"view_deleted"},"view":{"type":"object","properties":{"createdBy":{"type":["string","null"]},"id":{"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)$"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["createdBy","id","name","position"],"additionalProperties":false},"cleared":{"type":"boolean","const":true}},"required":["kind","view","cleared"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","const":"schema_changed"},"statements":{"minItems":1,"type":"array","items":{"type":"string"}},"summary":{"type":"string"}},"required":["kind","statements","summary"],"additionalProperties":false},{"type":"object","properties":{"inserted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"kind":{"type":"string","const":"records_imported"},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["inserted","kind","skipped","updated"],"additionalProperties":false},{"type":"object","properties":{"audience":{"type":"string","enum":["everyone","me"]},"kind":{"type":"string","const":"plugin_deleted"},"name":{"type":"string"},"pluginId":{"type":"string"}},"required":["audience","kind","name","pluginId"],"additionalProperties":false},{"type":"object","properties":{"after":{"type":"object","properties":{"config":{"type":"object","properties":{"ai":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"What AI writes into the field for each record"}},"required":["prompt"],"additionalProperties":false},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"max":{"type":"integer","minimum":1,"maximum":10},"options":{"type":"array","items":{"type":"object","properties":{"color":{"type":"string","enum":["gray","red","orange","amber","green","teal","blue","indigo","purple","pink"]},"label":{"type":"string"},"value":{"type":"string"}},"required":["color","label","value"],"additionalProperties":false}},"reference":{"type":"object","properties":{"columns":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}},"targetColumns":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}},"targetObjectId":{"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)$"}},"required":["columns","targetColumns","targetObjectId"],"additionalProperties":false}},"additionalProperties":false},"description":{"type":["string","null"]},"isHidden":{"type":"boolean"},"label":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false},"attributeId":{"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)$"},"before":{"type":"object","properties":{"config":{"type":"object","properties":{"ai":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"What AI writes into the field for each record"}},"required":["prompt"],"additionalProperties":false},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"max":{"type":"integer","minimum":1,"maximum":10},"options":{"type":"array","items":{"type":"object","properties":{"color":{"type":"string","enum":["gray","red","orange","amber","green","teal","blue","indigo","purple","pink"]},"label":{"type":"string"},"value":{"type":"string"}},"required":["color","label","value"],"additionalProperties":false}},"reference":{"type":"object","properties":{"columns":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}},"targetColumns":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}},"targetObjectId":{"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)$"}},"required":["columns","targetColumns","targetObjectId"],"additionalProperties":false}},"additionalProperties":false},"description":{"type":["string","null"]},"isHidden":{"type":"boolean"},"label":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false},"kind":{"type":"string","const":"attribute_updated"},"name":{"type":"string"}},"required":["after","attributeId","before","kind","name"],"additionalProperties":false},{"type":"object","properties":{"after":{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string"},"isHidden":{"type":"boolean"},"labelAttributeId":{"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":"null"}]},"labelPlural":{"type":"string"},"labelSingular":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false},"before":{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string"},"isHidden":{"type":"boolean"},"labelAttributeId":{"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":"null"}]},"labelPlural":{"type":"string"},"labelSingular":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false},"kind":{"type":"string","const":"object_updated"},"name":{"type":"string"}},"required":["after","before","kind","name"],"additionalProperties":false}]}]}},"required":["entry"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"write"}}},"/activity/list":{"post":{"operationId":"activity.list","summary":"List activity","description":"The workspace's activity, newest first: records created, changed (values before and after, with the evidence given) and deleted, imports, notes, changes to views, page layouts, workspace plugins, fields and objects, plugin deletes and schema changes, each with who made it and its undo.state (undoable, undone or refused). Narrow it to an object, one record (object and recordId), some kinds, or one agent session. A change made only for oneself is listed to its maker alone.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"agentSession":{"description":"Only what one agent session did (a job's, or a copilot conversation's)","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)$"},"cursor":{"description":"nextCursor from the previous page, to continue the same list","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)$"},"kinds":{"description":"Only entries of these kinds","minItems":1,"maxItems":13,"type":"array","items":{"type":"string","enum":["record_created","record_updated","record_deleted","comment","layer_updated","view_created","view_updated","view_deleted","schema_changed","records_imported","plugin_deleted","attribute_updated","object_updated"]}},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"object":{"description":"Only entries about this object","type":"string","minLength":1,"maxLength":100},"recordId":{"description":"Only entries about this record of object","type":"string","minLength":1,"maxLength":1000}}}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"allOf":[{"type":"object","properties":{"actor":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["user","agent","plugin","api_key","oauth","system"]}},"required":["id","name","type"],"additionalProperties":false},"agentSessionId":{"type":["string","null"]},"createdAt":{"type":"string"},"id":{"type":"string"},"objectId":{"type":["string","null"]},"objectLabel":{"type":["string","null"]},"recordId":{"type":["string","null"]},"revertsId":{"type":["string","null"]},"undo":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"undoable"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"by":{"type":"object","properties":{"actorName":{"type":"string"},"createdAt":{"type":"string"},"id":{"type":"string"}},"required":["actorName","createdAt","id"],"additionalProperties":false},"state":{"type":"string","const":"undone"}},"required":["by","state"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["final","cleared","no_change","plugin_deleted","forbidden"]},"reason":{"type":"string"},"state":{"type":"string","const":"refused"}},"required":["code","reason","state"],"additionalProperties":false}]},"viewName":{"type":["string","null"]}},"required":["actor","agentSessionId","createdAt","id","objectId","objectLabel","recordId","revertsId","undo","viewName"],"additionalProperties":false},{"oneOf":[{"oneOf":[{"type":"object","properties":{"changes":{"type":"array","items":{"type":"object","properties":{"after":{"$ref":"#/components/schemas/__schema0"},"attributeId":{"type":"string"}},"required":["after","attributeId"],"additionalProperties":false}},"kind":{"type":"string","const":"record_created"},"cleared":{"type":"boolean","const":false}},"required":["changes","kind"],"additionalProperties":false},{"type":"object","properties":{"changes":{"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string"}},"required":["attributeId"],"additionalProperties":false}},"kind":{"type":"string","const":"record_created"},"cleared":{"type":"boolean","const":true}},"required":["changes","kind","cleared"],"additionalProperties":false}]},{"oneOf":[{"type":"object","properties":{"changes":{"type":"array","items":{"type":"object","properties":{"after":{"$ref":"#/components/schemas/__schema0"},"attributeId":{"type":"string"},"before":{"$ref":"#/components/schemas/__schema0"},"provenance":{"type":"object","properties":{"actor":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["user","agent","plugin","api_key","oauth","system"]}},"required":["id","name","type"],"additionalProperties":false},"evidence":{"type":"string","maxLength":4000},"model":{"type":"string","maxLength":200},"reasoning":{"type":"string","maxLength":4000},"sources":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["url"],"additionalProperties":false}}},"additionalProperties":false}},"required":["after","attributeId","before"],"additionalProperties":false}},"kind":{"type":"string","const":"record_updated"},"cleared":{"type":"boolean","const":false}},"required":["changes","kind"],"additionalProperties":false},{"type":"object","properties":{"changes":{"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string"}},"required":["attributeId"],"additionalProperties":false}},"kind":{"type":"string","const":"record_updated"},"cleared":{"type":"boolean","const":true}},"required":["changes","kind","cleared"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","const":"record_deleted"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"comment"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"after":{"type":"object","propertyNames":{"type":"string","maxLength":200,"pattern":"^[a-z][A-Za-z]*(?::\\S+)?$"},"additionalProperties":{"type":"object","properties":{"base":{"$ref":"#/components/schemas/__schema0"},"value":{"$ref":"#/components/schemas/__schema0"}},"required":["value"],"additionalProperties":false}},"audience":{"type":"string","enum":["everyone","me"]},"before":{"type":"object","propertyNames":{"type":"string","maxLength":200,"pattern":"^[a-z][A-Za-z]*(?::\\S+)?$"},"additionalProperties":{"type":"object","properties":{"base":{"$ref":"#/components/schemas/__schema0"},"value":{"$ref":"#/components/schemas/__schema0"}},"required":["value"],"additionalProperties":false}},"kind":{"type":"string","const":"layer_updated"},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"view"},"viewId":{"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)$"}},"required":["kind","viewId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"shell"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"home"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"record"},"objectId":{"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)$"}},"required":["kind","objectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"plugin"},"pluginId":{"type":"string","pattern":"^ws-[a-z][a-z0-9-]{0,56}$"}},"required":["kind","pluginId"],"additionalProperties":false}]},"cleared":{"type":"boolean","const":false}},"required":["after","audience","before","kind","target"],"additionalProperties":false},{"type":"object","properties":{"audience":{"type":"string","enum":["everyone","me"]},"kind":{"type":"string","const":"layer_updated"},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"view"},"viewId":{"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)$"}},"required":["kind","viewId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"shell"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"home"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"record"},"objectId":{"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)$"}},"required":["kind","objectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"plugin"},"pluginId":{"type":"string","pattern":"^ws-[a-z][a-z0-9-]{0,56}$"}},"required":["kind","pluginId"],"additionalProperties":false}]},"cleared":{"type":"boolean","const":true}},"required":["audience","kind","target","cleared"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","const":"view_created"},"name":{"type":"string"},"viewId":{"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)$"}},"required":["kind","name","viewId"],"additionalProperties":false},{"type":"object","properties":{"after":{"type":"object","properties":{"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false},"before":{"type":"object","properties":{"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false},"kind":{"type":"string","const":"view_updated"},"viewId":{"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)$"}},"required":["after","before","kind","viewId"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"view_deleted"},"layers":{"type":"array","items":{"type":"object","properties":{"fields":{"type":"object","propertyNames":{"type":"string","maxLength":200,"pattern":"^[a-z][A-Za-z]*(?::\\S+)?$"},"additionalProperties":{"type":"object","properties":{"base":{"$ref":"#/components/schemas/__schema0"},"value":{"$ref":"#/components/schemas/__schema0"}},"required":["value"],"additionalProperties":false}},"userId":{"type":["string","null"]}},"required":["fields","userId"],"additionalProperties":false}},"view":{"type":"object","properties":{"createdBy":{"type":["string","null"]},"id":{"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)$"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["createdBy","id","name","position"],"additionalProperties":false},"cleared":{"type":"boolean","const":false}},"required":["kind","layers","view"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"view_deleted"},"view":{"type":"object","properties":{"createdBy":{"type":["string","null"]},"id":{"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)$"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["createdBy","id","name","position"],"additionalProperties":false},"cleared":{"type":"boolean","const":true}},"required":["kind","view","cleared"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","const":"schema_changed"},"statements":{"minItems":1,"type":"array","items":{"type":"string"}},"summary":{"type":"string"}},"required":["kind","statements","summary"],"additionalProperties":false},{"type":"object","properties":{"inserted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"kind":{"type":"string","const":"records_imported"},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["inserted","kind","skipped","updated"],"additionalProperties":false},{"type":"object","properties":{"audience":{"type":"string","enum":["everyone","me"]},"kind":{"type":"string","const":"plugin_deleted"},"name":{"type":"string"},"pluginId":{"type":"string"}},"required":["audience","kind","name","pluginId"],"additionalProperties":false},{"type":"object","properties":{"after":{"type":"object","properties":{"config":{"type":"object","properties":{"ai":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"What AI writes into the field for each record"}},"required":["prompt"],"additionalProperties":false},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"max":{"type":"integer","minimum":1,"maximum":10},"options":{"type":"array","items":{"type":"object","properties":{"color":{"type":"string","enum":["gray","red","orange","amber","green","teal","blue","indigo","purple","pink"]},"label":{"type":"string"},"value":{"type":"string"}},"required":["color","label","value"],"additionalProperties":false}},"reference":{"type":"object","properties":{"columns":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}},"targetColumns":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}},"targetObjectId":{"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)$"}},"required":["columns","targetColumns","targetObjectId"],"additionalProperties":false}},"additionalProperties":false},"description":{"type":["string","null"]},"isHidden":{"type":"boolean"},"label":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false},"attributeId":{"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)$"},"before":{"type":"object","properties":{"config":{"type":"object","properties":{"ai":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"What AI writes into the field for each record"}},"required":["prompt"],"additionalProperties":false},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"max":{"type":"integer","minimum":1,"maximum":10},"options":{"type":"array","items":{"type":"object","properties":{"color":{"type":"string","enum":["gray","red","orange","amber","green","teal","blue","indigo","purple","pink"]},"label":{"type":"string"},"value":{"type":"string"}},"required":["color","label","value"],"additionalProperties":false}},"reference":{"type":"object","properties":{"columns":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}},"targetColumns":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}},"targetObjectId":{"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)$"}},"required":["columns","targetColumns","targetObjectId"],"additionalProperties":false}},"additionalProperties":false},"description":{"type":["string","null"]},"isHidden":{"type":"boolean"},"label":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false},"kind":{"type":"string","const":"attribute_updated"},"name":{"type":"string"}},"required":["after","attributeId","before","kind","name"],"additionalProperties":false},{"type":"object","properties":{"after":{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string"},"isHidden":{"type":"boolean"},"labelAttributeId":{"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":"null"}]},"labelPlural":{"type":"string"},"labelSingular":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false},"before":{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string"},"isHidden":{"type":"boolean"},"labelAttributeId":{"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":"null"}]},"labelPlural":{"type":"string"},"labelSingular":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false},"kind":{"type":"string","const":"object_updated"},"name":{"type":"string"}},"required":["after","before","kind","name"],"additionalProperties":false}]}]}},"nextCursor":{"type":["string","null"]}},"required":["entries","nextCursor"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/activity/undo":{"post":{"operationId":"activity.undo","summary":"Undo activity","description":"Undoes 1–500 entries of the activity log, all or none: record edits (one object at a time) get their earlier values back, and a value changed since is CONFLICT, naming it; view, page layout, workspace plugin, field and object changes are put back except what changed since, which stays (CONFLICT if all of it did). Pass the activityIds a write returned, or entries activity_list shows undoable. Record creates and deletes, imports' added records, view creates, schema changes and plugin deletes are final (a deleted plugin's earlier changes too); a view's delete isn't. Undoing an undo redoes it. Your own entries; owners and admins anyone's.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"activityIds":{"minItems":1,"maxItems":500,"type":"array","items":{"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)$"},"description":"The entries to undo, all or none: the activityIds a write returned, or entries activity_list shows undoable"}},"required":["activityIds"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}}},"required":["activityIds"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"write"}}},"/agent/delete":{"post":{"operationId":"agent.delete","summary":"Delete a copilot thread","description":"Deletes a copilot conversation for good: it leaves the list at once, and its agent session and history are deleted. Changes the copilot made stay.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"thread":{"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)$"}},"required":["thread"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"thread":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"title":{"type":"string"},"updatedAt":{"type":"string"}},"required":["createdAt","id","title","updatedAt"],"additionalProperties":false}},"required":["thread"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"people","irreversible":true},"security":[{"sessionCookie":[]}]}},"/agent/get":{"post":{"operationId":"agent.get","summary":"Get a copilot thread","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"thread":{"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)$"}},"required":["thread"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"thread":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"title":{"type":"string"},"updatedAt":{"type":"string"}},"required":["createdAt","id","title","updatedAt"],"additionalProperties":false}},"required":["thread"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"people","irreversible":false},"security":[{"sessionCookie":[]}]}},"/agent/interrupt":{"post":{"operationId":"agent.interrupt","summary":"Stop the copilot","description":"Stops what the copilot is doing in the thread; it waits for a message then.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"thread":{"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)$"}},"required":["thread"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"thread":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"title":{"type":"string"},"updatedAt":{"type":"string"}},"required":["createdAt","id","title","updatedAt"],"additionalProperties":false}},"required":["thread"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"people","irreversible":false},"security":[{"sessionCookie":[]}]}},"/agent/list":{"post":{"operationId":"agent.list","summary":"List copilot threads","description":"The person's copilot conversations in the workspace, the most recent first, and why the copilot can't start one here, if it can't.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"threads":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"title":{"type":"string"},"updatedAt":{"type":"string"}},"required":["createdAt","id","title","updatedAt"],"additionalProperties":false}},"unavailable":{"type":["string","null"]}},"required":["threads","unavailable"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"people","irreversible":false},"security":[{"sessionCookie":[]}]}},"/agent/sendMessage":{"post":{"operationId":"agent.sendMessage","summary":"Message the copilot","description":"Sends the copilot a message in a thread, with what the person is looking at. While it works, the message steers it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"thread":{"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)$"},"context":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"message":{"type":"string","minLength":1,"maxLength":20000}},"required":["thread","message"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"thread":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"title":{"type":"string"},"updatedAt":{"type":"string"}},"required":["createdAt","id","title","updatedAt"],"additionalProperties":false},"messageId":{"type":"string"}},"required":["thread","messageId"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"people","irreversible":false},"security":[{"sessionCookie":[]}]}},"/agent/start":{"post":{"operationId":"agent.start","summary":"Start a copilot thread","description":"Starts a copilot conversation with its first message: a new agent session acting for the person, with their role, through dataembed's agent tools.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"context":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"message":{"type":"string","minLength":1,"maxLength":20000}},"required":["message"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"thread":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"title":{"type":"string"},"updatedAt":{"type":"string"}},"required":["createdAt","id","title","updatedAt"],"additionalProperties":false},"messageId":{"type":"string"}},"required":["thread","messageId"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"people","irreversible":false},"security":[{"sessionCookie":[]}]}},"/agent/threadEvents":{"post":{"operationId":"agent.threadEvents","summary":"Follow a copilot thread","description":"What a copilot conversation says: its history, then what happens live. A reconnect sends the last event id it got and resumes after it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"thread":{"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)$"}},"required":["thread"]}]}}}},"responses":{"200":{"description":"OK","content":{"text/event-stream":{"schema":{"oneOf":[{"type":"object","properties":{"event":{"const":"message"},"data":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","const":"message"},"role":{"type":"string","enum":["person","agent"]},"text":{"type":"string"}},"required":["id","kind","role","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","const":"messageUnread"},"messageId":{"type":"string"}},"required":["id","kind","messageId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"textStart"},"messageId":{"type":"string"}},"required":["kind","messageId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"textDelta"},"messageId":{"type":"string"},"text":{"type":"string"}},"required":["kind","messageId","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"kind":{"type":"string","const":"toolUse"},"name":{"type":"string"},"runner":{"type":"string","enum":["dataembed","sandbox","other"]}},"required":["id","input","kind","name","runner"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","const":"toolResult"},"outcome":{"type":"string","enum":["done","failed"]},"summary":{"type":"string"},"toolUseId":{"type":"string"}},"required":["id","kind","outcome","summary","toolUseId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","const":"toolResult"},"outcome":{"type":"string","const":"stopped"},"toolUseId":{"type":"string"}},"required":["id","kind","outcome","toolUseId"],"additionalProperties":false},{"type":"object","properties":{"approvalId":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string","const":"toolResult"},"outcome":{"type":"string","const":"held"},"toolUseId":{"type":"string"}},"required":["approvalId","id","kind","outcome","toolUseId"],"additionalProperties":false}]},{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","const":"status"},"status":{"type":"string","const":"running"}},"required":["id","kind","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","const":"status"},"status":{"type":"string","const":"idle"},"stopReason":{"type":"string","enum":["endTurn","budgetReached","retriesExhausted","other"]}},"required":["id","kind","status","stopReason"],"additionalProperties":false}]},{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","const":"error"},"message":{"type":"string"},"retrying":{"type":"boolean"}},"required":["id","kind","message","retrying"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","const":"caughtUp"}},"required":["kind"],"additionalProperties":false}]},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event","data"]},{"type":"object","properties":{"event":{"const":"close"},"data":{},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event"]},{"type":"object","properties":{"event":{"const":"error"},"data":{},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event"]}]}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"people","irreversible":false},"security":[{"sessionCookie":[]}]}},"/ai/models":{"post":{"operationId":"ai.models","summary":"List the agents' models","description":"The model the workspace's agents run on (model; null runs defaultModel), the models the AI Gateway serves, and why it can't list them, if it can't.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"defaultModel":{"type":"string"},"model":{"type":["string","null"]},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"pricing":{"anyOf":[{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"}},"required":["input","output"],"additionalProperties":false},{"type":"null"}],"description":"USD per million tokens"},"searches":{"type":"boolean","description":"Whether it can search the web"}},"required":["id","name","pricing","searches"],"additionalProperties":false}},"unavailable":{"type":["string","null"]}},"required":["defaultModel","model","models","unavailable"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/ai/setModel":{"post":{"operationId":"ai.setModel","summary":"Choose the agents' model","description":"Sets the model the workspace's agents (the copilot and jobs) run on from their next step; null: the default. Budgets stay in dollars.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"model":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"An id ai_models lists; null: the default"}},"required":["model"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"defaultModel":{"type":"string"},"model":{"type":["string","null"]}},"required":["defaultModel","model"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"admin"}}},"/apiKeys/create":{"post":{"operationId":"apiKeys.create","summary":"Create an API key","description":"Creates a workspace API key for an external agent or script. It acts for this call's person, with their role; one made with a key or an app's grant is revoked with it, and with a key expires no later. The token is returned once and can't be read again: store it now.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"expiresInDays":{"type":"integer","minimum":1,"maximum":365},"name":{"type":"string","minLength":1,"maxLength":80,"description":"Shown on every change the key makes"},"scope":{"default":"write","description":"What the key may do: read, write (read and change records, objects, fields, views and layouts) or admin","type":"string","enum":["read","write","admin"]}},"required":["name"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"oneOf":[{"type":"object","properties":{"createdAt":{"type":"string"},"createdByName":{"type":["string","null"]},"id":{"type":"string"},"issuedByName":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"prefix":{"type":"string"},"scope":{"type":"string","enum":["read","write","admin"]},"expiresAt":{"description":"Null: it never expires","type":["string","null"]},"status":{"type":"string","const":"active"}},"required":["createdAt","createdByName","id","issuedByName","lastUsedAt","name","prefix","scope","expiresAt","status"],"additionalProperties":false},{"type":"object","properties":{"createdAt":{"type":"string"},"createdByName":{"type":["string","null"]},"id":{"type":"string"},"issuedByName":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"prefix":{"type":"string"},"scope":{"type":"string","enum":["read","write","admin"]},"reason":{"type":"string","const":"creator_left","description":"It never acts again"},"status":{"type":"string","const":"dead"}},"required":["createdAt","createdByName","id","issuedByName","lastUsedAt","name","prefix","scope","reason","status"],"additionalProperties":false},{"type":"object","properties":{"createdAt":{"type":"string"},"createdByName":{"type":["string","null"]},"id":{"type":"string"},"issuedByName":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"prefix":{"type":"string"},"scope":{"type":"string","enum":["read","write","admin"]},"expiresAt":{"type":"string"},"status":{"type":"string","const":"expired"}},"required":["createdAt","createdByName","id","issuedByName","lastUsedAt","name","prefix","scope","expiresAt","status"],"additionalProperties":false},{"type":"object","properties":{"createdAt":{"type":"string"},"createdByName":{"type":["string","null"]},"id":{"type":"string"},"issuedByName":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"prefix":{"type":"string"},"scope":{"type":"string","enum":["read","write","admin"]},"revokedAt":{"type":"string"},"status":{"type":"string","const":"revoked"}},"required":["createdAt","createdByName","id","issuedByName","lastUsedAt","name","prefix","scope","revokedAt","status"],"additionalProperties":false}]},"token":{"type":"string"}},"required":["apiKey","token"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":true,"ownerOnly":false,"scope":"admin"}}},"/apiKeys/list":{"post":{"operationId":"apiKeys.list","summary":"List API keys","description":"The workspace's API keys: name, prefix (never the token), scope, status (active; dead once its creator leaves or with no scope; expired; revoked), creator, issuer (key, app or agent), and last use.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"apiKeys":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"createdAt":{"type":"string"},"createdByName":{"type":["string","null"]},"id":{"type":"string"},"issuedByName":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"prefix":{"type":"string"},"scope":{"type":"string","enum":["read","write","admin"]},"expiresAt":{"description":"Null: it never expires","type":["string","null"]},"status":{"type":"string","const":"active"}},"required":["createdAt","createdByName","id","issuedByName","lastUsedAt","name","prefix","scope","expiresAt","status"],"additionalProperties":false},{"type":"object","properties":{"createdAt":{"type":"string"},"createdByName":{"type":["string","null"]},"id":{"type":"string"},"issuedByName":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"prefix":{"type":"string"},"scope":{"type":"string","enum":["read","write","admin"]},"reason":{"type":"string","const":"creator_left","description":"It never acts again"},"status":{"type":"string","const":"dead"}},"required":["createdAt","createdByName","id","issuedByName","lastUsedAt","name","prefix","scope","reason","status"],"additionalProperties":false},{"type":"object","properties":{"createdAt":{"type":"string"},"createdByName":{"type":["string","null"]},"id":{"type":"string"},"issuedByName":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"prefix":{"type":"string"},"scope":{"type":"string","enum":["read","write","admin"]},"expiresAt":{"type":"string"},"status":{"type":"string","const":"expired"}},"required":["createdAt","createdByName","id","issuedByName","lastUsedAt","name","prefix","scope","expiresAt","status"],"additionalProperties":false},{"type":"object","properties":{"createdAt":{"type":"string"},"createdByName":{"type":["string","null"]},"id":{"type":"string"},"issuedByName":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"prefix":{"type":"string"},"scope":{"type":"string","enum":["read","write","admin"]},"revokedAt":{"type":"string"},"status":{"type":"string","const":"revoked"}},"required":["createdAt","createdByName","id","issuedByName","lastUsedAt","name","prefix","scope","revokedAt","status"],"additionalProperties":false}]}}},"required":["apiKeys"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"admin"}}},"/apiKeys/revoke":{"post":{"operationId":"apiKeys.revoke","summary":"Revoke an API key","description":"Revokes an active API key at once, with every key issued through it; any other is returned as it is. Name it as api_keys_list shows it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":100,"description":"The key's name (or its id, when two of the workspace's keys share a name)"}},"required":["key"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"oneOf":[{"type":"object","properties":{"createdAt":{"type":"string"},"createdByName":{"type":["string","null"]},"id":{"type":"string"},"issuedByName":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"prefix":{"type":"string"},"scope":{"type":"string","enum":["read","write","admin"]},"expiresAt":{"description":"Null: it never expires","type":["string","null"]},"status":{"type":"string","const":"active"}},"required":["createdAt","createdByName","id","issuedByName","lastUsedAt","name","prefix","scope","expiresAt","status"],"additionalProperties":false},{"type":"object","properties":{"createdAt":{"type":"string"},"createdByName":{"type":["string","null"]},"id":{"type":"string"},"issuedByName":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"prefix":{"type":"string"},"scope":{"type":"string","enum":["read","write","admin"]},"reason":{"type":"string","const":"creator_left","description":"It never acts again"},"status":{"type":"string","const":"dead"}},"required":["createdAt","createdByName","id","issuedByName","lastUsedAt","name","prefix","scope","reason","status"],"additionalProperties":false},{"type":"object","properties":{"createdAt":{"type":"string"},"createdByName":{"type":["string","null"]},"id":{"type":"string"},"issuedByName":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"prefix":{"type":"string"},"scope":{"type":"string","enum":["read","write","admin"]},"expiresAt":{"type":"string"},"status":{"type":"string","const":"expired"}},"required":["createdAt","createdByName","id","issuedByName","lastUsedAt","name","prefix","scope","expiresAt","status"],"additionalProperties":false},{"type":"object","properties":{"createdAt":{"type":"string"},"createdByName":{"type":["string","null"]},"id":{"type":"string"},"issuedByName":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"prefix":{"type":"string"},"scope":{"type":"string","enum":["read","write","admin"]},"revokedAt":{"type":"string"},"status":{"type":"string","const":"revoked"}},"required":["createdAt","createdByName","id","issuedByName","lastUsedAt","name","prefix","scope","revokedAt","status"],"additionalProperties":false}]}},"required":["apiKey"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":true,"ownerOnly":false,"scope":"admin"}}},"/approvals/allowances":{"post":{"operationId":"approvals.allowances","summary":"List allowances","description":"The tools owners and admins always allow agents, newest first: each names its agent (a thread or job's session, an API key or a connected app), the tool's procedure and who allowed it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"allowances":{"type":"array","items":{"type":"object","properties":{"agent":{"oneOf":[{"type":"object","properties":{"agentSessionId":{"type":"string"},"kind":{"type":"string","const":"agent"}},"required":["agentSessionId","kind"],"additionalProperties":false},{"type":"object","properties":{"keyId":{"type":"string"},"kind":{"type":"string","const":"api_key"}},"required":["keyId","kind"],"additionalProperties":false},{"type":"object","properties":{"appId":{"type":"string"},"kind":{"type":"string","const":"oauth"}},"required":["appId","kind"],"additionalProperties":false}]},"createdAt":{"type":"string"},"createdByName":{"type":["string","null"]},"id":{"type":"string"},"procedure":{"type":"string"}},"required":["agent","createdAt","createdByName","id","procedure"],"additionalProperties":false}}},"required":["allowances"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"people","irreversible":false},"security":[{"sessionCookie":[]}]}},"/approvals/approve":{"post":{"operationId":"approvals.approve","summary":"Approve a change","description":"Approves a change an agent asked for and runs it at once, as the agent that asked, with that agent's access now; with always, that agent's later calls to the same tool run without asking. Owners and admins who could make the change themselves.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"approval":{"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)$","description":"The approval's id, as a PENDING_APPROVAL error or approvals_list gives it"},"always":{"default":false,"description":"Also allow the agent that asked this tool from now on: a thread or job until it ends, an API key or connected app until the allowance is revoked","type":"boolean"}},"required":["approval"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"approval":{"type":"object","properties":{"agentSessionId":{"type":["string","null"]},"createdAt":{"type":"string"},"id":{"type":"string"},"input":{"anyOf":[{"$ref":"#/components/schemas/__schema0"},{"type":"null"}]},"procedure":{"type":"string"},"requester":{"type":"object","properties":{"kind":{"type":"string","enum":["agent","api_key","oauth"]},"label":{"type":"string"}},"required":["kind","label"],"additionalProperties":false},"summary":{"type":"string"},"targets":{"type":["string","null"]},"decidedAt":{"type":"string"},"decidedByName":{"type":["string","null"]},"byAllowance":{"type":"boolean"},"status":{"type":"string","const":"approved"},"run":{"oneOf":[{"type":"object","properties":{"outcome":{"type":["string","null"]},"result":{"$ref":"#/components/schemas/__schema0"},"state":{"type":"string","const":"succeeded"}},"required":["outcome","state"],"additionalProperties":false},{"type":"object","properties":{"error":{"type":"string"},"state":{"type":"string","const":"failed"}},"required":["error","state"],"additionalProperties":false}]}},"required":["agentSessionId","createdAt","id","input","procedure","requester","summary","targets","decidedAt","decidedByName","byAllowance","status","run"],"additionalProperties":false}},"required":["approval"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"people","irreversible":true},"security":[{"sessionCookie":[]}]}},"/approvals/get":{"post":{"operationId":"approvals.get","summary":"Get an approval","description":"One approval: the change it holds and who asked. status: pending (until expiresAt), approved, rejected or expired. Approved, run.state: running (don't ask again), succeeded (with its answer, for the agent that asked), failed (with why) or unknown (check the change before asking again).","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"approval":{"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)$","description":"The approval's id, as a PENDING_APPROVAL error or approvals_list gives it"}},"required":["approval"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"approval":{"oneOf":[{"type":"object","properties":{"agentSessionId":{"type":["string","null"]},"createdAt":{"type":"string"},"id":{"type":"string"},"input":{"anyOf":[{"$ref":"#/components/schemas/__schema0"},{"type":"null"}]},"procedure":{"type":"string"},"requester":{"type":"object","properties":{"kind":{"type":"string","enum":["agent","api_key","oauth"]},"label":{"type":"string"}},"required":["kind","label"],"additionalProperties":false},"summary":{"type":"string"},"targets":{"type":["string","null"]},"decide":{"type":"object","properties":{"approve":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"reason":{"type":"string"}},"required":["ok","reason"],"additionalProperties":false}]},"reject":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"reason":{"type":"string"}},"required":["ok","reason"],"additionalProperties":false}]}},"required":["approve","reject"],"additionalProperties":false},"expiresAt":{"type":"string"},"status":{"type":"string","const":"pending"}},"required":["agentSessionId","createdAt","id","input","procedure","requester","summary","targets","decide","expiresAt","status"],"additionalProperties":false},{"type":"object","properties":{"agentSessionId":{"type":["string","null"]},"createdAt":{"type":"string"},"id":{"type":"string"},"input":{"anyOf":[{"$ref":"#/components/schemas/__schema0"},{"type":"null"}]},"procedure":{"type":"string"},"requester":{"type":"object","properties":{"kind":{"type":"string","enum":["agent","api_key","oauth"]},"label":{"type":"string"}},"required":["kind","label"],"additionalProperties":false},"summary":{"type":"string"},"targets":{"type":["string","null"]},"decidedAt":{"type":"string"},"decidedByName":{"type":["string","null"]},"byAllowance":{"type":"boolean"},"status":{"type":"string","const":"approved"},"run":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"running"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"outcome":{"type":["string","null"]},"result":{"$ref":"#/components/schemas/__schema0"},"state":{"type":"string","const":"succeeded"}},"required":["outcome","state"],"additionalProperties":false},{"type":"object","properties":{"error":{"type":"string"},"state":{"type":"string","const":"failed"}},"required":["error","state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unknown"}},"required":["state"],"additionalProperties":false}]}},"required":["agentSessionId","createdAt","id","input","procedure","requester","summary","targets","decidedAt","decidedByName","byAllowance","status","run"],"additionalProperties":false},{"type":"object","properties":{"agentSessionId":{"type":["string","null"]},"createdAt":{"type":"string"},"id":{"type":"string"},"input":{"anyOf":[{"$ref":"#/components/schemas/__schema0"},{"type":"null"}]},"procedure":{"type":"string"},"requester":{"type":"object","properties":{"kind":{"type":"string","enum":["agent","api_key","oauth"]},"label":{"type":"string"}},"required":["kind","label"],"additionalProperties":false},"summary":{"type":"string"},"targets":{"type":["string","null"]},"decidedAt":{"type":"string"},"decidedByName":{"type":["string","null"]},"status":{"type":"string","const":"rejected"}},"required":["agentSessionId","createdAt","id","input","procedure","requester","summary","targets","decidedAt","decidedByName","status"],"additionalProperties":false},{"type":"object","properties":{"agentSessionId":{"type":["string","null"]},"createdAt":{"type":"string"},"id":{"type":"string"},"input":{"anyOf":[{"$ref":"#/components/schemas/__schema0"},{"type":"null"}]},"procedure":{"type":"string"},"requester":{"type":"object","properties":{"kind":{"type":"string","enum":["agent","api_key","oauth"]},"label":{"type":"string"}},"required":["kind","label"],"additionalProperties":false},"summary":{"type":"string"},"targets":{"type":["string","null"]},"expiresAt":{"type":"string"},"status":{"type":"string","const":"expired"}},"required":["agentSessionId","createdAt","id","input","procedure","requester","summary","targets","expiresAt","status"],"additionalProperties":false}]}},"required":["approval"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/approvals/list":{"post":{"operationId":"approvals.list","summary":"List approvals","description":"The workspace's approvals, newest first (the last 100): irreversible changes agents asked for (deletes, schema changes, credentials, the team, the workspace), each waiting for an owner or admin, approved (with how it went: run.state), rejected or expired. A pending one expires after 24 hours.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"status":{"description":"Only the approvals in this state","type":"string","enum":["pending","approved","rejected","expired"]}}}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"approvals":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"agentSessionId":{"type":["string","null"]},"createdAt":{"type":"string"},"id":{"type":"string"},"input":{"anyOf":[{"$ref":"#/components/schemas/__schema0"},{"type":"null"}]},"procedure":{"type":"string"},"requester":{"type":"object","properties":{"kind":{"type":"string","enum":["agent","api_key","oauth"]},"label":{"type":"string"}},"required":["kind","label"],"additionalProperties":false},"summary":{"type":"string"},"targets":{"type":["string","null"]},"decide":{"type":"object","properties":{"approve":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"reason":{"type":"string"}},"required":["ok","reason"],"additionalProperties":false}]},"reject":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"reason":{"type":"string"}},"required":["ok","reason"],"additionalProperties":false}]}},"required":["approve","reject"],"additionalProperties":false},"expiresAt":{"type":"string"},"status":{"type":"string","const":"pending"}},"required":["agentSessionId","createdAt","id","input","procedure","requester","summary","targets","decide","expiresAt","status"],"additionalProperties":false},{"type":"object","properties":{"agentSessionId":{"type":["string","null"]},"createdAt":{"type":"string"},"id":{"type":"string"},"input":{"anyOf":[{"$ref":"#/components/schemas/__schema0"},{"type":"null"}]},"procedure":{"type":"string"},"requester":{"type":"object","properties":{"kind":{"type":"string","enum":["agent","api_key","oauth"]},"label":{"type":"string"}},"required":["kind","label"],"additionalProperties":false},"summary":{"type":"string"},"targets":{"type":["string","null"]},"decidedAt":{"type":"string"},"decidedByName":{"type":["string","null"]},"byAllowance":{"type":"boolean"},"status":{"type":"string","const":"approved"},"run":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"running"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"outcome":{"type":["string","null"]},"result":{"$ref":"#/components/schemas/__schema0"},"state":{"type":"string","const":"succeeded"}},"required":["outcome","state"],"additionalProperties":false},{"type":"object","properties":{"error":{"type":"string"},"state":{"type":"string","const":"failed"}},"required":["error","state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unknown"}},"required":["state"],"additionalProperties":false}]}},"required":["agentSessionId","createdAt","id","input","procedure","requester","summary","targets","decidedAt","decidedByName","byAllowance","status","run"],"additionalProperties":false},{"type":"object","properties":{"agentSessionId":{"type":["string","null"]},"createdAt":{"type":"string"},"id":{"type":"string"},"input":{"anyOf":[{"$ref":"#/components/schemas/__schema0"},{"type":"null"}]},"procedure":{"type":"string"},"requester":{"type":"object","properties":{"kind":{"type":"string","enum":["agent","api_key","oauth"]},"label":{"type":"string"}},"required":["kind","label"],"additionalProperties":false},"summary":{"type":"string"},"targets":{"type":["string","null"]},"decidedAt":{"type":"string"},"decidedByName":{"type":["string","null"]},"status":{"type":"string","const":"rejected"}},"required":["agentSessionId","createdAt","id","input","procedure","requester","summary","targets","decidedAt","decidedByName","status"],"additionalProperties":false},{"type":"object","properties":{"agentSessionId":{"type":["string","null"]},"createdAt":{"type":"string"},"id":{"type":"string"},"input":{"anyOf":[{"$ref":"#/components/schemas/__schema0"},{"type":"null"}]},"procedure":{"type":"string"},"requester":{"type":"object","properties":{"kind":{"type":"string","enum":["agent","api_key","oauth"]},"label":{"type":"string"}},"required":["kind","label"],"additionalProperties":false},"summary":{"type":"string"},"targets":{"type":["string","null"]},"expiresAt":{"type":"string"},"status":{"type":"string","const":"expired"}},"required":["agentSessionId","createdAt","id","input","procedure","requester","summary","targets","expiresAt","status"],"additionalProperties":false}]}}},"required":["approvals"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/approvals/reject":{"post":{"operationId":"approvals.reject","summary":"Reject a change","description":"Rejects a change an agent asked for: it never runs.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"approval":{"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)$","description":"The approval's id, as a PENDING_APPROVAL error or approvals_list gives it"}},"required":["approval"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"approval":{"type":"object","properties":{"agentSessionId":{"type":["string","null"]},"createdAt":{"type":"string"},"id":{"type":"string"},"input":{"anyOf":[{"$ref":"#/components/schemas/__schema0"},{"type":"null"}]},"procedure":{"type":"string"},"requester":{"type":"object","properties":{"kind":{"type":"string","enum":["agent","api_key","oauth"]},"label":{"type":"string"}},"required":["kind","label"],"additionalProperties":false},"summary":{"type":"string"},"targets":{"type":["string","null"]},"decidedAt":{"type":"string"},"decidedByName":{"type":["string","null"]},"status":{"type":"string","const":"rejected"}},"required":["agentSessionId","createdAt","id","input","procedure","requester","summary","targets","decidedAt","decidedByName","status"],"additionalProperties":false}},"required":["approval"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"people","irreversible":false},"security":[{"sessionCookie":[]}]}},"/approvals/revokeAllowance":{"post":{"operationId":"approvals.revokeAllowance","summary":"Revoke an allowance","description":"Revokes an allowance: the agent's next call to that tool waits for approval again. Owners and admins.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"allowance":{"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)$","description":"The allowance's id, as approvals.allowances gives it"}},"required":["allowance"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"allowance":{"type":"object","properties":{"agent":{"oneOf":[{"type":"object","properties":{"agentSessionId":{"type":"string"},"kind":{"type":"string","const":"agent"}},"required":["agentSessionId","kind"],"additionalProperties":false},{"type":"object","properties":{"keyId":{"type":"string"},"kind":{"type":"string","const":"api_key"}},"required":["keyId","kind"],"additionalProperties":false},{"type":"object","properties":{"appId":{"type":"string"},"kind":{"type":"string","const":"oauth"}},"required":["appId","kind"],"additionalProperties":false}]},"createdAt":{"type":"string"},"createdByName":{"type":["string","null"]},"id":{"type":"string"},"procedure":{"type":"string"}},"required":["agent","createdAt","createdByName","id","procedure"],"additionalProperties":false}},"required":["allowance"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"people","irreversible":false},"security":[{"sessionCookie":[]}]}},"/attributes/delete":{"post":{"operationId":"attributes.delete","summary":"Delete a missing field","description":"Deletes a field whose column is gone from its table (missing in objects_get), and its settings for good: confirm with the user first. A column that comes back returns as a new field. A key field, or one whose column is still there, is refused: hide it with attributes_update (isHidden).","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"attribute":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"}},"required":["attribute","object"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":true,"ownerOnly":false,"scope":"admin"}}},"/attributes/reorder":{"post":{"operationId":"attributes.reorder","summary":"Reorder an object's fields","description":"Sets the order of an object's fields in the app. Name every field of the object, in the new order.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"attributes":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"description":"Every field of the object, in the new order"},"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"}},"required":["attributes","object"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"ok":{"type":"boolean"}},"required":["activityIds","ok"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"write"}}},"/attributes/update":{"post":{"operationId":"attributes.update","summary":"Update a field","description":"Renames, describes, hides (isHidden) or reconfigures a field. config is merged into the stored config: give only what changes ({ plugin: { prompt } } keeps an AI field's other settings; a list such as options replaces the whole list).","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"attribute":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"config":{"description":"Only the parts to change; they are merged into the stored config","type":"object","properties":{"ai":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"What AI writes into the field for each record"}},"required":["prompt"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"max":{"type":"integer","minimum":1,"maximum":10},"options":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"color":{"default":"gray","type":"string","enum":["gray","red","orange","amber","green","teal","blue","indigo","purple","pink"]},"label":{"type":"string","minLength":1,"maxLength":80},"value":{"type":"string","minLength":1,"maxLength":200}},"required":["label","value"]}}}},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"isHidden":{"description":"Hidden fields are left out everywhere in the app","type":"boolean"},"label":{"type":"string","minLength":1,"maxLength":80}},"required":["attribute","object"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"attribute":{"type":"object","properties":{"filterVariant":{"anyOf":[{"type":"string","enum":["text","number","date","boolean","select","multiSelect","none"]},{"type":"null"}]},"sortable":{"type":"boolean"},"writable":{"type":"object","properties":{"create":{"type":"boolean"},"update":{"type":"boolean"}},"required":["create","update"],"additionalProperties":false},"columnName":{"type":"string"},"config":{"type":"object","properties":{"ai":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"What AI writes into the field for each record"}},"required":["prompt"],"additionalProperties":false},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"max":{"type":"integer","minimum":1,"maximum":10},"options":{"type":"array","items":{"type":"object","properties":{"color":{"type":"string","enum":["gray","red","orange","amber","green","teal","blue","indigo","purple","pink"]},"label":{"type":"string"},"value":{"type":"string"}},"required":["color","label","value"],"additionalProperties":false}},"reference":{"type":"object","properties":{"columns":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}},"targetColumns":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}},"targetObjectId":{"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)$"}},"required":["columns","targetColumns","targetObjectId"],"additionalProperties":false}},"additionalProperties":false},"description":{"type":["string","null"]},"drift":{"type":"string","enum":["ok","missing"]},"hasDefault":{"type":"boolean"},"id":{"type":"string"},"isArray":{"type":"boolean"},"isHidden":{"type":"boolean"},"isNullable":{"type":"boolean"},"isPrimaryKey":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"label":{"type":"string"},"objectId":{"type":"string"},"position":{"type":"number"},"slug":{"type":"string"},"sourceType":{"type":"string"},"type":{"type":"string"}},"required":["filterVariant","sortable","writable","columnName","config","description","drift","hasDefault","id","isArray","isHidden","isNullable","isPrimaryKey","isReadOnly","label","objectId","position","slug","sourceType","type"],"additionalProperties":false}},"required":["activityIds","attribute"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"write"}}},"/connectedApps/list":{"post":{"operationId":"connectedApps.list","summary":"List connected apps","description":"The apps connected to this workspace over OAuth (MCP clients such as Claude, ChatGPT or Cursor): each app, whether its identity was verified, the person it acts for, the scope they allowed, when it was connected and when it last got a token. With the admin scope (owners and admins), everyone's; otherwise only your own.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"apps":{"type":"array","items":{"type":"object","properties":{"appName":{"type":"string"},"createdAt":{"type":"string"},"id":{"type":"string"},"isYours":{"type":"boolean"},"lastUsedAt":{"type":["string","null"]},"personEmail":{"type":"string"},"personName":{"type":"string"},"scope":{"anyOf":[{"type":"string","enum":["read","write","admin"]},{"type":"null"}]},"verifiedDomain":{"type":["string","null"]}},"required":["appName","createdAt","id","isYours","lastUsedAt","personEmail","personName","scope","verifiedDomain"],"additionalProperties":false}}},"required":["apps"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"write"}}},"/connectedApps/revoke":{"post":{"operationId":"connectedApps.revoke","summary":"Disconnect an app","description":"Disconnects an app, named by its name as connected_apps_list shows it: its tokens and the API keys it made stop working at once. Your own, or anyone's with the admin scope. Disconnecting the app this call comes through ends it too.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"app":{"type":"string","minLength":1,"maxLength":200,"description":"The app's name as connected_apps_list shows it (or its id, when two of the apps listed share a name)"}},"required":["app"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"type":"boolean","const":true}},"required":["revoked"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":true,"ownerOnly":false,"scope":"write"}}},"/dataSources/create":{"post":{"operationId":"dataSources.create","summary":"Connect a data source","description":"Connects a Postgres database: connection is tested first, then saved, the password encrypted and never returned. sslMode verify-full (the default) checks the certificate chain and host name, against ca (a PEM CA certificate) when given; disable is for development only. Every table of its schemas becomes an object. accessMode is read_write by default (read_only: no row changes; schema_write: schema changes too). A password typed in a conversation passes through it: offer Settings → Data sources too.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"accessMode":{"default":"read_write","description":"The access it would have: read_write (the default) also checks what record writes need, schema_write also whether the user may change the schema","type":"string","enum":["read_only","read_write","schema_write"]},"connection":{"type":"object","properties":{"ca":{"default":null,"description":"PEM CA certificate(s) the server's chain must lead to; when set, only these are trusted","anyOf":[{"type":"string","maxLength":262144,"pattern":"^-----BEGIN CERTIFICATE-----[A-Za-z0-9+/=\\s]+-----END CERTIFICATE-----(?:\\s+-----BEGIN CERTIFICATE-----[A-Za-z0-9+/=\\s]+-----END CERTIFICATE-----)*$"},{"type":"null"}]},"database":{"type":"string","minLength":1,"maxLength":63},"host":{"type":"string","minLength":1,"maxLength":253},"port":{"default":5432,"type":"integer","minimum":1,"maximum":65535},"sslMode":{"default":"verify-full","type":"string","enum":["verify-full","disable"]},"username":{"type":"string","minLength":1,"maxLength":63},"password":{"type":"string","maxLength":1000,"writeOnly":true,"description":"The database user's password (write-only)"}},"required":["database","host","username","password"]},"schemas":{"default":["public"],"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":63},"description":"Postgres schemas whose tables the workspace browses"},"name":{"type":"string","minLength":1,"maxLength":80}},"required":["connection","name"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dataSource":{"type":"object","properties":{"accessMode":{"type":"string","enum":["read_only","read_write","schema_write"]},"checkedAt":{"type":"string"},"connection":{"anyOf":[{"type":"object","properties":{"ca":{"default":null,"description":"PEM CA certificate(s) the server's chain must lead to; when set, only these are trusted","anyOf":[{"type":"string","maxLength":262144,"pattern":"^-----BEGIN CERTIFICATE-----[A-Za-z0-9+/=\\s]+-----END CERTIFICATE-----(?:\\s+-----BEGIN CERTIFICATE-----[A-Za-z0-9+/=\\s]+-----END CERTIFICATE-----)*$"},{"type":"null"}]},"database":{"type":"string","minLength":1,"maxLength":63},"host":{"type":"string","minLength":1,"maxLength":253},"port":{"default":5432,"type":"integer","minimum":1,"maximum":65535},"sslMode":{"default":"verify-full","type":"string","enum":["verify-full","disable"]},"username":{"type":"string","minLength":1,"maxLength":63}},"required":["ca","database","host","port","sslMode","username"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"health":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"ok"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"since":{"type":"string"},"state":{"type":"string","const":"syncing"}},"required":["since","state"],"additionalProperties":false},{"type":"object","properties":{"at":{"type":"string"},"message":{"type":"string"},"state":{"type":"string","const":"sync_failed"}},"required":["at","message","state"],"additionalProperties":false},{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string","enum":["auth","tls","unreachable","timeout","blocked_host","database_not_found","permission","unknown"]},"message":{"type":"string"},"state":{"type":"string","const":"connection_failed"}},"required":["at","kind","message","state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"credentials_unreadable"}},"required":["state"],"additionalProperties":false}]},"id":{"type":"string"},"introspectedAt":{"type":["string","null"]},"name":{"type":"string"},"objectCount":{"type":"number"},"sample":{"anyOf":[{"type":"object","properties":{"builtAt":{"type":"string"}},"required":["builtAt"],"additionalProperties":false},{"type":"null"}]},"schemas":{"type":"array","items":{"type":"string"}},"secretsSet":{"type":"boolean"}},"required":["accessMode","checkedAt","connection","createdAt","health","id","introspectedAt","name","objectCount","sample","schemas","secretsSet"],"additionalProperties":false}},"required":["dataSource"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":true,"ownerOnly":false,"scope":"admin"}}},"/dataSources/createSample":{"post":{"operationId":"dataSources.createSample","summary":"Use the sample database","description":"Gives the workspace the sample database: its own Sales schema (companies, people, deals, with a Pipeline board) on dataembed's sample server, rows and schema changeable. It stays after the workspace connects its own database, until disconnected. Calling it again returns the same one. It fails with no sample server here (data_sources_list says). If its first sync failed (no objects), data_sources_sync sets it up.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dataSource":{"type":"object","properties":{"accessMode":{"type":"string","enum":["read_only","read_write","schema_write"]},"checkedAt":{"type":"string"},"connection":{"anyOf":[{"type":"object","properties":{"ca":{"default":null,"description":"PEM CA certificate(s) the server's chain must lead to; when set, only these are trusted","anyOf":[{"type":"string","maxLength":262144,"pattern":"^-----BEGIN CERTIFICATE-----[A-Za-z0-9+/=\\s]+-----END CERTIFICATE-----(?:\\s+-----BEGIN CERTIFICATE-----[A-Za-z0-9+/=\\s]+-----END CERTIFICATE-----)*$"},{"type":"null"}]},"database":{"type":"string","minLength":1,"maxLength":63},"host":{"type":"string","minLength":1,"maxLength":253},"port":{"default":5432,"type":"integer","minimum":1,"maximum":65535},"sslMode":{"default":"verify-full","type":"string","enum":["verify-full","disable"]},"username":{"type":"string","minLength":1,"maxLength":63}},"required":["ca","database","host","port","sslMode","username"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"health":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"ok"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"since":{"type":"string"},"state":{"type":"string","const":"syncing"}},"required":["since","state"],"additionalProperties":false},{"type":"object","properties":{"at":{"type":"string"},"message":{"type":"string"},"state":{"type":"string","const":"sync_failed"}},"required":["at","message","state"],"additionalProperties":false},{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string","enum":["auth","tls","unreachable","timeout","blocked_host","database_not_found","permission","unknown"]},"message":{"type":"string"},"state":{"type":"string","const":"connection_failed"}},"required":["at","kind","message","state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"credentials_unreadable"}},"required":["state"],"additionalProperties":false}]},"id":{"type":"string"},"introspectedAt":{"type":["string","null"]},"name":{"type":"string"},"objectCount":{"type":"number"},"sample":{"anyOf":[{"type":"object","properties":{"builtAt":{"type":"string"}},"required":["builtAt"],"additionalProperties":false},{"type":"null"}]},"schemas":{"type":"array","items":{"type":"string"}},"secretsSet":{"type":"boolean"}},"required":["accessMode","checkedAt","connection","createdAt","health","id","introspectedAt","name","objectCount","sample","schemas","secretsSet"],"additionalProperties":false}},"required":["dataSource"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"admin"}}},"/dataSources/delete":{"post":{"operationId":"dataSources.delete","summary":"Disconnect a data source","description":"Disconnects a data source: its objects, views and activity in dataembed are deleted; a database people connected is not touched, while the sample database is dropped. It can't be undone: confirm with the user first.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"dataSource":{"type":"string","minLength":1,"maxLength":100,"description":"Data source id or name"}},"required":["dataSource"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":true,"ownerOnly":false,"scope":"admin"}}},"/dataSources/get":{"post":{"operationId":"dataSources.get","summary":"Get a data source","description":"One data source by name or id, as data_sources_list shows it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"dataSource":{"type":"string","minLength":1,"maxLength":100,"description":"Data source id or name"}},"required":["dataSource"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dataSource":{"type":"object","properties":{"accessMode":{"type":"string","enum":["read_only","read_write","schema_write"]},"checkedAt":{"type":"string"},"connection":{"anyOf":[{"type":"object","properties":{"ca":{"default":null,"description":"PEM CA certificate(s) the server's chain must lead to; when set, only these are trusted","anyOf":[{"type":"string","maxLength":262144,"pattern":"^-----BEGIN CERTIFICATE-----[A-Za-z0-9+/=\\s]+-----END CERTIFICATE-----(?:\\s+-----BEGIN CERTIFICATE-----[A-Za-z0-9+/=\\s]+-----END CERTIFICATE-----)*$"},{"type":"null"}]},"database":{"type":"string","minLength":1,"maxLength":63},"host":{"type":"string","minLength":1,"maxLength":253},"port":{"default":5432,"type":"integer","minimum":1,"maximum":65535},"sslMode":{"default":"verify-full","type":"string","enum":["verify-full","disable"]},"username":{"type":"string","minLength":1,"maxLength":63}},"required":["ca","database","host","port","sslMode","username"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"health":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"ok"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"since":{"type":"string"},"state":{"type":"string","const":"syncing"}},"required":["since","state"],"additionalProperties":false},{"type":"object","properties":{"at":{"type":"string"},"message":{"type":"string"},"state":{"type":"string","const":"sync_failed"}},"required":["at","message","state"],"additionalProperties":false},{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string","enum":["auth","tls","unreachable","timeout","blocked_host","database_not_found","permission","unknown"]},"message":{"type":"string"},"state":{"type":"string","const":"connection_failed"}},"required":["at","kind","message","state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"credentials_unreadable"}},"required":["state"],"additionalProperties":false}]},"id":{"type":"string"},"introspectedAt":{"type":["string","null"]},"name":{"type":"string"},"objectCount":{"type":"number"},"sample":{"anyOf":[{"type":"object","properties":{"builtAt":{"type":"string"}},"required":["builtAt"],"additionalProperties":false},{"type":"null"}]},"schemas":{"type":"array","items":{"type":"string"}},"secretsSet":{"type":"boolean"}},"required":["accessMode","checkedAt","connection","createdAt","health","id","introspectedAt","name","objectCount","sample","schemas","secretsSet"],"additionalProperties":false}},"required":["dataSource"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/dataSources/list":{"post":{"operationId":"dataSources.list","summary":"List data sources","description":"The workspace's data sources (the sample too, if used): access mode, schemas, object count and health (ok; syncing; sync_failed: sync it; connection_failed: test it, or update its connection; credentials_unreadable: update its connection), and whether the sample is offered. Connection details need the admin scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dataSources":{"type":"array","items":{"type":"object","properties":{"accessMode":{"type":"string","enum":["read_only","read_write","schema_write"]},"checkedAt":{"type":"string"},"connection":{"anyOf":[{"type":"object","properties":{"ca":{"default":null,"description":"PEM CA certificate(s) the server's chain must lead to; when set, only these are trusted","anyOf":[{"type":"string","maxLength":262144,"pattern":"^-----BEGIN CERTIFICATE-----[A-Za-z0-9+/=\\s]+-----END CERTIFICATE-----(?:\\s+-----BEGIN CERTIFICATE-----[A-Za-z0-9+/=\\s]+-----END CERTIFICATE-----)*$"},{"type":"null"}]},"database":{"type":"string","minLength":1,"maxLength":63},"host":{"type":"string","minLength":1,"maxLength":253},"port":{"default":5432,"type":"integer","minimum":1,"maximum":65535},"sslMode":{"default":"verify-full","type":"string","enum":["verify-full","disable"]},"username":{"type":"string","minLength":1,"maxLength":63}},"required":["ca","database","host","port","sslMode","username"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"health":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"ok"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"since":{"type":"string"},"state":{"type":"string","const":"syncing"}},"required":["since","state"],"additionalProperties":false},{"type":"object","properties":{"at":{"type":"string"},"message":{"type":"string"},"state":{"type":"string","const":"sync_failed"}},"required":["at","message","state"],"additionalProperties":false},{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string","enum":["auth","tls","unreachable","timeout","blocked_host","database_not_found","permission","unknown"]},"message":{"type":"string"},"state":{"type":"string","const":"connection_failed"}},"required":["at","kind","message","state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"credentials_unreadable"}},"required":["state"],"additionalProperties":false}]},"id":{"type":"string"},"introspectedAt":{"type":["string","null"]},"name":{"type":"string"},"objectCount":{"type":"number"},"sample":{"anyOf":[{"type":"object","properties":{"builtAt":{"type":"string"}},"required":["builtAt"],"additionalProperties":false},{"type":"null"}]},"schemas":{"type":"array","items":{"type":"string"}},"secretsSet":{"type":"boolean"}},"required":["accessMode","checkedAt","connection","createdAt","health","id","introspectedAt","name","objectCount","sample","schemas","secretsSet"],"additionalProperties":false}},"sample":{"type":"object","properties":{"available":{"type":"boolean"}},"required":["available"],"additionalProperties":false}},"required":["dataSources","sample"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/dataSources/sync":{"post":{"operationId":"dataSources.sync","summary":"Sync a data source","description":"Reads a data source's tables again: new tables become objects, new columns fields, and removed tables and columns are flagged missing (nothing is deleted). Tables are also read again on their own when last read over 5 minutes ago or a query found one changed. Its outcome is recorded in the source's health. A sample's first objects also get its icons, field formats and views.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"dataSource":{"type":"string","minLength":1,"maxLength":100,"description":"Data source id or name"}},"required":["dataSource"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"number"},"missing":{"type":"number"},"tables":{"type":"number"}},"required":["added","missing","tables"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"admin"}}},"/dataSources/test":{"post":{"operationId":"dataSources.test","summary":"Test a data source","description":"Tests a data source's stored connection and records the outcome on it; failures say why (auth, tls, unreachable, timeout, …). To test details before saving them, use data_sources_test_connection.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"dataSource":{"type":"string","minLength":1,"maxLength":100,"description":"Data source id or name"}},"required":["dataSource"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"server":{"type":"string"},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["no_schema_privilege","overprivileged","read_only_server"]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}}},"required":["ok","server","warnings"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["auth","tls","unreachable","timeout","blocked_host","database_not_found","permission","unknown"]},"message":{"type":"string"},"ok":{"type":"boolean","const":false}},"required":["kind","message","ok"],"additionalProperties":false}]}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"admin"}}},"/dataSources/testConnection":{"post":{"operationId":"dataSources.testConnection","summary":"Test connection details","description":"Tests connection details before saving them; nothing is stored. It answers the server and any warnings (an overprivileged user, writes asked of a replica, schema_write asked of a user that can't create in the schemas); failures say why (auth, tls, unreachable, timeout, …). data_sources_test tests a saved one.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"accessMode":{"default":"read_write","description":"The access it would have: read_write (the default) also checks what record writes need, schema_write also whether the user may change the schema","type":"string","enum":["read_only","read_write","schema_write"]},"connection":{"type":"object","properties":{"ca":{"default":null,"description":"PEM CA certificate(s) the server's chain must lead to; when set, only these are trusted","anyOf":[{"type":"string","maxLength":262144,"pattern":"^-----BEGIN CERTIFICATE-----[A-Za-z0-9+/=\\s]+-----END CERTIFICATE-----(?:\\s+-----BEGIN CERTIFICATE-----[A-Za-z0-9+/=\\s]+-----END CERTIFICATE-----)*$"},{"type":"null"}]},"database":{"type":"string","minLength":1,"maxLength":63},"host":{"type":"string","minLength":1,"maxLength":253},"port":{"default":5432,"type":"integer","minimum":1,"maximum":65535},"sslMode":{"default":"verify-full","type":"string","enum":["verify-full","disable"]},"username":{"type":"string","minLength":1,"maxLength":63},"password":{"type":"string","maxLength":1000,"writeOnly":true,"description":"The database user's password (write-only)"}},"required":["database","host","username","password"]},"schemas":{"default":["public"],"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":63},"description":"Postgres schemas whose tables the workspace browses"}},"required":["connection"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"server":{"type":"string"},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["no_schema_privilege","overprivileged","read_only_server"]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}}},"required":["ok","server","warnings"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["auth","tls","unreachable","timeout","blocked_host","database_not_found","permission","unknown"]},"message":{"type":"string"},"ok":{"type":"boolean","const":false}},"required":["kind","message","ok"],"additionalProperties":false}]}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"admin"}}},"/dataSources/update":{"post":{"operationId":"dataSources.update","summary":"Update a data source","description":"Renames a connected data source or changes the schemas its tables come from (the tables of a new schema become objects). Its access mode changes with data_sources_update_connection. The sample database can't be changed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"dataSource":{"type":"string","minLength":1,"maxLength":100,"description":"Data source id or name"},"name":{"type":"string","minLength":1,"maxLength":80},"schemas":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":63},"description":"Postgres schemas whose tables the workspace browses"}},"required":["dataSource"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dataSource":{"type":"object","properties":{"accessMode":{"type":"string","enum":["read_only","read_write","schema_write"]},"checkedAt":{"type":"string"},"connection":{"anyOf":[{"type":"object","properties":{"ca":{"default":null,"description":"PEM CA certificate(s) the server's chain must lead to; when set, only these are trusted","anyOf":[{"type":"string","maxLength":262144,"pattern":"^-----BEGIN CERTIFICATE-----[A-Za-z0-9+/=\\s]+-----END CERTIFICATE-----(?:\\s+-----BEGIN CERTIFICATE-----[A-Za-z0-9+/=\\s]+-----END CERTIFICATE-----)*$"},{"type":"null"}]},"database":{"type":"string","minLength":1,"maxLength":63},"host":{"type":"string","minLength":1,"maxLength":253},"port":{"default":5432,"type":"integer","minimum":1,"maximum":65535},"sslMode":{"default":"verify-full","type":"string","enum":["verify-full","disable"]},"username":{"type":"string","minLength":1,"maxLength":63}},"required":["ca","database","host","port","sslMode","username"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"health":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"ok"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"since":{"type":"string"},"state":{"type":"string","const":"syncing"}},"required":["since","state"],"additionalProperties":false},{"type":"object","properties":{"at":{"type":"string"},"message":{"type":"string"},"state":{"type":"string","const":"sync_failed"}},"required":["at","message","state"],"additionalProperties":false},{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string","enum":["auth","tls","unreachable","timeout","blocked_host","database_not_found","permission","unknown"]},"message":{"type":"string"},"state":{"type":"string","const":"connection_failed"}},"required":["at","kind","message","state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"credentials_unreadable"}},"required":["state"],"additionalProperties":false}]},"id":{"type":"string"},"introspectedAt":{"type":["string","null"]},"name":{"type":"string"},"objectCount":{"type":"number"},"sample":{"anyOf":[{"type":"object","properties":{"builtAt":{"type":"string"}},"required":["builtAt"],"additionalProperties":false},{"type":"null"}]},"schemas":{"type":"array","items":{"type":"string"}},"secretsSet":{"type":"boolean"}},"required":["accessMode","checkedAt","connection","createdAt","health","id","introspectedAt","name","objectCount","sample","schemas","secretsSet"],"additionalProperties":false}},"required":["dataSource"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"admin"}}},"/dataSources/updateConnection":{"post":{"operationId":"dataSources.updateConnection","summary":"Change a data source's connection","description":"Points a connected data source at another host, database or user, or changes its TLS or access mode (read_only: no row changes; read_write: rows; schema_write: rows and schema), and renames it or changes its schemas in the same save if given. The password is always required, even for the access mode alone; the connection is tested before anything is saved. The sample database can't be changed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"dataSource":{"type":"string","minLength":1,"maxLength":100,"description":"Data source id or name"},"name":{"type":"string","minLength":1,"maxLength":80},"schemas":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":63},"description":"Postgres schemas whose tables the workspace browses"},"accessMode":{"description":"read_write lets dataembed create, edit and delete rows in this database; schema_write also lets it change the schema","type":"string","enum":["read_only","read_write","schema_write"]},"connection":{"type":"object","properties":{"ca":{"default":null,"description":"PEM CA certificate(s) the server's chain must lead to; when set, only these are trusted","anyOf":[{"type":"string","maxLength":262144,"pattern":"^-----BEGIN CERTIFICATE-----[A-Za-z0-9+/=\\s]+-----END CERTIFICATE-----(?:\\s+-----BEGIN CERTIFICATE-----[A-Za-z0-9+/=\\s]+-----END CERTIFICATE-----)*$"},{"type":"null"}]},"database":{"type":"string","minLength":1,"maxLength":63},"host":{"type":"string","minLength":1,"maxLength":253},"port":{"default":5432,"type":"integer","minimum":1,"maximum":65535},"sslMode":{"default":"verify-full","type":"string","enum":["verify-full","disable"]},"username":{"type":"string","minLength":1,"maxLength":63},"password":{"type":"string","maxLength":1000,"writeOnly":true,"description":"The database user's password (write-only)"}},"required":["database","host","username","password"]}},"required":["dataSource","connection"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dataSource":{"type":"object","properties":{"accessMode":{"type":"string","enum":["read_only","read_write","schema_write"]},"checkedAt":{"type":"string"},"connection":{"anyOf":[{"type":"object","properties":{"ca":{"default":null,"description":"PEM CA certificate(s) the server's chain must lead to; when set, only these are trusted","anyOf":[{"type":"string","maxLength":262144,"pattern":"^-----BEGIN CERTIFICATE-----[A-Za-z0-9+/=\\s]+-----END CERTIFICATE-----(?:\\s+-----BEGIN CERTIFICATE-----[A-Za-z0-9+/=\\s]+-----END CERTIFICATE-----)*$"},{"type":"null"}]},"database":{"type":"string","minLength":1,"maxLength":63},"host":{"type":"string","minLength":1,"maxLength":253},"port":{"default":5432,"type":"integer","minimum":1,"maximum":65535},"sslMode":{"default":"verify-full","type":"string","enum":["verify-full","disable"]},"username":{"type":"string","minLength":1,"maxLength":63}},"required":["ca","database","host","port","sslMode","username"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"health":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"ok"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"since":{"type":"string"},"state":{"type":"string","const":"syncing"}},"required":["since","state"],"additionalProperties":false},{"type":"object","properties":{"at":{"type":"string"},"message":{"type":"string"},"state":{"type":"string","const":"sync_failed"}},"required":["at","message","state"],"additionalProperties":false},{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string","enum":["auth","tls","unreachable","timeout","blocked_host","database_not_found","permission","unknown"]},"message":{"type":"string"},"state":{"type":"string","const":"connection_failed"}},"required":["at","kind","message","state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"credentials_unreadable"}},"required":["state"],"additionalProperties":false}]},"id":{"type":"string"},"introspectedAt":{"type":["string","null"]},"name":{"type":"string"},"objectCount":{"type":"number"},"sample":{"anyOf":[{"type":"object","properties":{"builtAt":{"type":"string"}},"required":["builtAt"],"additionalProperties":false},{"type":"null"}]},"schemas":{"type":"array","items":{"type":"string"}},"secretsSet":{"type":"boolean"}},"required":["accessMode","checkedAt","connection","createdAt","health","id","introspectedAt","name","objectCount","sample","schemas","secretsSet"],"additionalProperties":false}},"required":["dataSource"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":true,"ownerOnly":false,"scope":"admin"}}},"/jobs/cancel":{"post":{"operationId":"jobs.cancel","summary":"Cancel a job","description":"Stops a running job: it can't change anything from now on, and is stopping until its next step. What it changed stays (undo it from the activity log). Stopping or ended, it is answered as is. Whoever started it, or an owner or admin.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"job":{"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)$","description":"The job's id"}},"required":["job"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"oneOf":[{"type":"object","properties":{"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"costCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string","enum":["fill","import"]},"objectId":{"type":["string","null"]},"progress":{"type":"object","properties":{"done":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["done","total"],"additionalProperties":false},"startedBy":{"type":["string","null"]},"title":{"type":"string"},"canCancel":{"type":"boolean"},"status":{"type":"string","const":"running"}},"required":["budgetCents","costCents","createdAt","id","kind","objectId","progress","startedBy","title","canCancel","status"],"additionalProperties":false},{"type":"object","properties":{"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"costCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string","enum":["fill","import"]},"objectId":{"type":["string","null"]},"progress":{"type":"object","properties":{"done":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["done","total"],"additionalProperties":false},"startedBy":{"type":["string","null"]},"title":{"type":"string"},"status":{"type":"string","const":"stopping"}},"required":["budgetCents","costCents","createdAt","id","kind","objectId","progress","startedBy","title","status"],"additionalProperties":false},{"type":"object","properties":{"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"costCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string","enum":["fill","import"]},"objectId":{"type":["string","null"]},"progress":{"type":"object","properties":{"done":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["done","total"],"additionalProperties":false},"startedBy":{"type":["string","null"]},"title":{"type":"string"},"endedAt":{"type":"string"},"status":{"type":"string","enum":["done","cancelled","outOfBudget","failed"]}},"required":["budgetCents","costCents","createdAt","id","kind","objectId","progress","startedBy","title","endedAt","status"],"additionalProperties":false}]}},"required":["job"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"write"}}},"/jobs/get":{"post":{"operationId":"jobs.get","summary":"Get a job","description":"One job: what it does, whether it is running, stopping, done, cancelled, out of budget or failed, its progress (records changed of those it set out to) and its spend. With waitSeconds it answers once the job ends, or when the wait is up.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"job":{"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)$","description":"The job's id"},"waitSeconds":{"default":0,"description":"Wait up to this many seconds (at most 30) for the job to end before answering; 0 answers at once","type":"integer","minimum":0,"maximum":30}},"required":["job"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"oneOf":[{"type":"object","properties":{"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"costCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string","enum":["fill","import"]},"objectId":{"type":["string","null"]},"progress":{"type":"object","properties":{"done":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["done","total"],"additionalProperties":false},"startedBy":{"type":["string","null"]},"title":{"type":"string"},"canCancel":{"type":"boolean"},"status":{"type":"string","const":"running"}},"required":["budgetCents","costCents","createdAt","id","kind","objectId","progress","startedBy","title","canCancel","status"],"additionalProperties":false},{"type":"object","properties":{"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"costCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string","enum":["fill","import"]},"objectId":{"type":["string","null"]},"progress":{"type":"object","properties":{"done":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["done","total"],"additionalProperties":false},"startedBy":{"type":["string","null"]},"title":{"type":"string"},"status":{"type":"string","const":"stopping"}},"required":["budgetCents","costCents","createdAt","id","kind","objectId","progress","startedBy","title","status"],"additionalProperties":false},{"type":"object","properties":{"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"costCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string","enum":["fill","import"]},"objectId":{"type":["string","null"]},"progress":{"type":"object","properties":{"done":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["done","total"],"additionalProperties":false},"startedBy":{"type":["string","null"]},"title":{"type":"string"},"endedAt":{"type":"string"},"status":{"type":"string","enum":["done","cancelled","outOfBudget","failed"]}},"required":["budgetCents","costCents","createdAt","id","kind","objectId","progress","startedBy","title","endedAt","status"],"additionalProperties":false}]}},"required":["job"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/jobs/list":{"post":{"operationId":"jobs.list","summary":"List jobs","description":"The workspace's jobs, newest first (the last 50): AI fills and imports from the web, with status and progress. Pass object for one object's jobs.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"object":{"description":"Only the jobs working on this object","type":"string","minLength":1,"maxLength":100}}}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"jobs":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"costCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string","enum":["fill","import"]},"objectId":{"type":["string","null"]},"progress":{"type":"object","properties":{"done":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["done","total"],"additionalProperties":false},"startedBy":{"type":["string","null"]},"title":{"type":"string"},"canCancel":{"type":"boolean"},"status":{"type":"string","const":"running"}},"required":["budgetCents","costCents","createdAt","id","kind","objectId","progress","startedBy","title","canCancel","status"],"additionalProperties":false},{"type":"object","properties":{"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"costCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string","enum":["fill","import"]},"objectId":{"type":["string","null"]},"progress":{"type":"object","properties":{"done":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["done","total"],"additionalProperties":false},"startedBy":{"type":["string","null"]},"title":{"type":"string"},"status":{"type":"string","const":"stopping"}},"required":["budgetCents","costCents","createdAt","id","kind","objectId","progress","startedBy","title","status"],"additionalProperties":false},{"type":"object","properties":{"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"costCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string","enum":["fill","import"]},"objectId":{"type":["string","null"]},"progress":{"type":"object","properties":{"done":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["done","total"],"additionalProperties":false},"startedBy":{"type":["string","null"]},"title":{"type":"string"},"endedAt":{"type":"string"},"status":{"type":"string","enum":["done","cancelled","outOfBudget","failed"]}},"required":["budgetCents","costCents","createdAt","id","kind","objectId","progress","startedBy","title","endedAt","status"],"additionalProperties":false}]}}},"required":["jobs"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/layouts/get":{"post":{"operationId":"layouts.get","summary":"Get a page layout","description":"How a page's sections are arranged for the person you act for. Each slot lists its sections in order (id, title, options with fields by slug, hidden and hiddenBy, optionsFrom: whose options apply); offered lists sections that can be added, optionsSchemas what each one's options take, diagnostics what a stored change no longer applies to.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"object":{"description":"The object whose record page it is (surface record only)","type":"string","minLength":1,"maxLength":100},"surface":{"type":"string","enum":["shell","home","record"],"description":"shell: the sidebar and the side panel; home: the home page; record: an object's record page (give object)"}},"required":["surface"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"layout":{"type":"object","properties":{"contributions":{"type":"array","items":{"type":"object","properties":{"default":{"type":"object","properties":{"order":{"type":"number"},"placed":{"type":"boolean"},"slot":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]}},"required":["order","placed","slot"],"additionalProperties":false},"description":{"type":["string","null"]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"optionsSchema":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},{"type":"null"}]},"plugin":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"origin":{"type":"string","const":"bundled"},"tier":{"type":"string","enum":["core","default"]}},"required":["id","name","origin","tier"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"origin":{"type":"string","const":"workspace"}},"required":["id","name","origin"],"additionalProperties":false}]},"rank":{"type":"number"},"state":{"type":"string","enum":["available","plugin_off","not_applicable"]},"title":{"type":"string"}},"required":["default","description","icon","id","optionsSchema","plugin","rank","state","title"],"additionalProperties":false}},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["UNKNOWN_SECTION","PLUGIN_OFF","NOT_APPLICABLE","WRONG_SLOT","OPTIONS_INVALID"]},"id":{"type":"string"},"layer":{"type":"string","enum":["everyone","me"]},"message":{"type":"string"}},"required":["code","id","layer","message"],"additionalProperties":false}},"layers":{"type":"object","propertyNames":{"type":"string","enum":["everyone","me"]},"additionalProperties":{"type":"object","properties":{"customized":{"type":"boolean"},"doc":{"type":"object","properties":{"items":{"type":"object","propertyNames":{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$","description":"A section id, <pluginId>/<id>"},"additionalProperties":{"type":"object","properties":{"hidden":{"type":"boolean"},"options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"slot":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]}},"additionalProperties":false}},"order":{"type":"object","propertyNames":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]},"additionalProperties":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$","description":"A section id, <pluginId>/<id>"}}}},"required":["items","order"],"additionalProperties":false}},"required":["customized","doc"],"additionalProperties":false},"required":["everyone","me"]},"object":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"labelPlural":{"type":"string"},"slug":{"type":"string"}},"required":["id","labelPlural","slug"],"additionalProperties":false},{"type":"null"}]},"offered":{"type":"array","items":{"type":"string"}},"slots":{"type":"array","items":{"type":"object","properties":{"occupant":{"type":["string","null"]},"sections":{"type":"array","items":{"type":"object","properties":{"hiddenBy":{"anyOf":[{"type":"string","enum":["default","everyone","me"]},{"type":"null"}]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"optionsFrom":{"type":"string","enum":["default","everyone","me"]},"pluginId":{"type":"string"},"setBy":{"type":"string","enum":["default","everyone","me"]},"shown":{"type":"boolean"},"state":{"type":"string","enum":["available","plugin_off","not_applicable"]},"title":{"type":"string"}},"required":["hiddenBy","icon","id","options","optionsFrom","pluginId","setBy","shown","state","title"],"additionalProperties":false}},"slot":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]}},"required":["occupant","sections","slot"],"additionalProperties":false}},"surface":{"type":"string","enum":["shell","home","record"]}},"required":["contributions","diagnostics","layers","object","offered","slots","surface"],"additionalProperties":false}},"required":["layout"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/layouts/saveForEveryone":{"post":{"operationId":"layouts.saveForEveryone","summary":"Save a page layout for everyone","description":"Changes a page layout for everyone, only when asked to: promote makes the person's own changes to it everyone's (all, or those of the sections named), and ops hide, show, move, configure or reset sections in everyone's layout.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"object":{"description":"The object whose record page it is (surface record only)","type":"string","minLength":1,"maxLength":100},"ops":{"description":"Applied to everyone's layout, in order, after what promote saves","minItems":1,"maxItems":50,"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$","description":"A section id, <pluginId>/<id>"},"op":{"type":"string","const":"hide"}},"required":["id","op"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$","description":"A section id, <pluginId>/<id>"},"op":{"type":"string","const":"show"},"after":{"description":"Place it right after this section","type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$"},"before":{"description":"Place it right before this section","type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$"},"slot":{"description":"Move it to this slot of the page (default: where it is)","type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]}},"required":["id","op"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$","description":"A section id, <pluginId>/<id>"},"op":{"type":"string","const":"move"},"after":{"description":"Place it right after this section","type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$"},"before":{"description":"Place it right before this section","type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$"},"slot":{"description":"Move it to this slot of the page (default: where it is)","type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]}},"required":["id","op"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$","description":"A section id, <pluginId>/<id>"},"op":{"type":"string","const":"configure"},"options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["id","op","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"description":"Undo only this section's changes in this layer; omit to undo them all","type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$"},"op":{"type":"string","const":"reset"}},"required":["op"],"additionalProperties":false}]}},"promote":{"description":"true: every change of yours to this page becomes everyone's; or the sections whose changes do. Yours then follow everyone's","anyOf":[{"type":"boolean","const":true},{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$","description":"A section id, <pluginId>/<id>"}}]},"surface":{"type":"string","enum":["shell","home","record"],"description":"shell: the sidebar and the side panel; home: the home page; record: an object's record page (give object)"}},"required":["surface"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"layout":{"type":"object","properties":{"contributions":{"type":"array","items":{"type":"object","properties":{"default":{"type":"object","properties":{"order":{"type":"number"},"placed":{"type":"boolean"},"slot":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]}},"required":["order","placed","slot"],"additionalProperties":false},"description":{"type":["string","null"]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"optionsSchema":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},{"type":"null"}]},"plugin":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"origin":{"type":"string","const":"bundled"},"tier":{"type":"string","enum":["core","default"]}},"required":["id","name","origin","tier"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"origin":{"type":"string","const":"workspace"}},"required":["id","name","origin"],"additionalProperties":false}]},"rank":{"type":"number"},"state":{"type":"string","enum":["available","plugin_off","not_applicable"]},"title":{"type":"string"}},"required":["default","description","icon","id","optionsSchema","plugin","rank","state","title"],"additionalProperties":false}},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["UNKNOWN_SECTION","PLUGIN_OFF","NOT_APPLICABLE","WRONG_SLOT","OPTIONS_INVALID"]},"id":{"type":"string"},"layer":{"type":"string","enum":["everyone","me"]},"message":{"type":"string"}},"required":["code","id","layer","message"],"additionalProperties":false}},"layers":{"type":"object","propertyNames":{"type":"string","enum":["everyone","me"]},"additionalProperties":{"type":"object","properties":{"customized":{"type":"boolean"},"doc":{"type":"object","properties":{"items":{"type":"object","propertyNames":{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$","description":"A section id, <pluginId>/<id>"},"additionalProperties":{"type":"object","properties":{"hidden":{"type":"boolean"},"options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"slot":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]}},"additionalProperties":false}},"order":{"type":"object","propertyNames":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]},"additionalProperties":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$","description":"A section id, <pluginId>/<id>"}}}},"required":["items","order"],"additionalProperties":false}},"required":["customized","doc"],"additionalProperties":false},"required":["everyone","me"]},"object":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"labelPlural":{"type":"string"},"slug":{"type":"string"}},"required":["id","labelPlural","slug"],"additionalProperties":false},{"type":"null"}]},"offered":{"type":"array","items":{"type":"string"}},"slots":{"type":"array","items":{"type":"object","properties":{"occupant":{"type":["string","null"]},"sections":{"type":"array","items":{"type":"object","properties":{"hiddenBy":{"anyOf":[{"type":"string","enum":["default","everyone","me"]},{"type":"null"}]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"optionsFrom":{"type":"string","enum":["default","everyone","me"]},"pluginId":{"type":"string"},"setBy":{"type":"string","enum":["default","everyone","me"]},"shown":{"type":"boolean"},"state":{"type":"string","enum":["available","plugin_off","not_applicable"]},"title":{"type":"string"}},"required":["hiddenBy","icon","id","options","optionsFrom","pluginId","setBy","shown","state","title"],"additionalProperties":false}},"slot":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]}},"required":["occupant","sections","slot"],"additionalProperties":false}},"surface":{"type":"string","enum":["shell","home","record"]}},"required":["contributions","diagnostics","layers","object","offered","slots","surface"],"additionalProperties":false}},"required":["activityIds","layout"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"admin"}}},"/layouts/update":{"post":{"operationId":"layouts.update","summary":"Change a page layout","description":"Changes a page layout for the person you act for only, the default for a change they ask for: ops hide, show, move, configure or reset sections, named by id as layouts_get lists them (a reset puts back everyone's layout). Options name fields by slug.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"object":{"description":"The object whose record page it is (surface record only)","type":"string","minLength":1,"maxLength":100},"ops":{"minItems":1,"maxItems":50,"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$","description":"A section id, <pluginId>/<id>"},"op":{"type":"string","const":"hide"}},"required":["id","op"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$","description":"A section id, <pluginId>/<id>"},"op":{"type":"string","const":"show"},"after":{"description":"Place it right after this section","type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$"},"before":{"description":"Place it right before this section","type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$"},"slot":{"description":"Move it to this slot of the page (default: where it is)","type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]}},"required":["id","op"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$","description":"A section id, <pluginId>/<id>"},"op":{"type":"string","const":"move"},"after":{"description":"Place it right after this section","type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$"},"before":{"description":"Place it right before this section","type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$"},"slot":{"description":"Move it to this slot of the page (default: where it is)","type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]}},"required":["id","op"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$","description":"A section id, <pluginId>/<id>"},"op":{"type":"string","const":"configure"},"options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["id","op","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"description":"Undo only this section's changes in this layer; omit to undo them all","type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$"},"op":{"type":"string","const":"reset"}},"required":["op"],"additionalProperties":false}]},"description":"Applied in order"},"surface":{"type":"string","enum":["shell","home","record"],"description":"shell: the sidebar and the side panel; home: the home page; record: an object's record page (give object)"}},"required":["ops","surface"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"layout":{"type":"object","properties":{"contributions":{"type":"array","items":{"type":"object","properties":{"default":{"type":"object","properties":{"order":{"type":"number"},"placed":{"type":"boolean"},"slot":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]}},"required":["order","placed","slot"],"additionalProperties":false},"description":{"type":["string","null"]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"optionsSchema":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},{"type":"null"}]},"plugin":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"origin":{"type":"string","const":"bundled"},"tier":{"type":"string","enum":["core","default"]}},"required":["id","name","origin","tier"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"origin":{"type":"string","const":"workspace"}},"required":["id","name","origin"],"additionalProperties":false}]},"rank":{"type":"number"},"state":{"type":"string","enum":["available","plugin_off","not_applicable"]},"title":{"type":"string"}},"required":["default","description","icon","id","optionsSchema","plugin","rank","state","title"],"additionalProperties":false}},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["UNKNOWN_SECTION","PLUGIN_OFF","NOT_APPLICABLE","WRONG_SLOT","OPTIONS_INVALID"]},"id":{"type":"string"},"layer":{"type":"string","enum":["everyone","me"]},"message":{"type":"string"}},"required":["code","id","layer","message"],"additionalProperties":false}},"layers":{"type":"object","propertyNames":{"type":"string","enum":["everyone","me"]},"additionalProperties":{"type":"object","properties":{"customized":{"type":"boolean"},"doc":{"type":"object","properties":{"items":{"type":"object","propertyNames":{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$","description":"A section id, <pluginId>/<id>"},"additionalProperties":{"type":"object","properties":{"hidden":{"type":"boolean"},"options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"slot":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]}},"additionalProperties":false}},"order":{"type":"object","propertyNames":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]},"additionalProperties":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$","description":"A section id, <pluginId>/<id>"}}}},"required":["items","order"],"additionalProperties":false}},"required":["customized","doc"],"additionalProperties":false},"required":["everyone","me"]},"object":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"labelPlural":{"type":"string"},"slug":{"type":"string"}},"required":["id","labelPlural","slug"],"additionalProperties":false},{"type":"null"}]},"offered":{"type":"array","items":{"type":"string"}},"slots":{"type":"array","items":{"type":"object","properties":{"occupant":{"type":["string","null"]},"sections":{"type":"array","items":{"type":"object","properties":{"hiddenBy":{"anyOf":[{"type":"string","enum":["default","everyone","me"]},{"type":"null"}]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"optionsFrom":{"type":"string","enum":["default","everyone","me"]},"pluginId":{"type":"string"},"setBy":{"type":"string","enum":["default","everyone","me"]},"shown":{"type":"boolean"},"state":{"type":"string","enum":["available","plugin_off","not_applicable"]},"title":{"type":"string"}},"required":["hiddenBy","icon","id","options","optionsFrom","pluginId","setBy","shown","state","title"],"additionalProperties":false}},"slot":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]}},"required":["occupant","sections","slot"],"additionalProperties":false}},"surface":{"type":"string","enum":["shell","home","record"]}},"required":["contributions","diagnostics","layers","object","offered","slots","surface"],"additionalProperties":false}},"required":["activityIds","layout"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"write"}}},"/objects/get":{"post":{"operationId":"objects.get","summary":"Get an object","description":"One object with every field (hidden ones too, flagged), its key (primaryKey; null: records only listed until objects_set_key) and table, which record writes it takes and, when one is refused, why (writeRefusal), and its saved views with their config (columns, filter, sorts) by field slug, as views_update takes it back.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"}},"required":["object"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"attributes":{"type":"array","items":{"type":"object","properties":{"filterVariant":{"anyOf":[{"type":"string","enum":["text","number","date","boolean","select","multiSelect","none"]},{"type":"null"}]},"sortable":{"type":"boolean"},"writable":{"type":"object","properties":{"create":{"type":"boolean"},"update":{"type":"boolean"}},"required":["create","update"],"additionalProperties":false},"columnName":{"type":"string"},"config":{"type":"object","properties":{"ai":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"What AI writes into the field for each record"}},"required":["prompt"],"additionalProperties":false},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"max":{"type":"integer","minimum":1,"maximum":10},"options":{"type":"array","items":{"type":"object","properties":{"color":{"type":"string","enum":["gray","red","orange","amber","green","teal","blue","indigo","purple","pink"]},"label":{"type":"string"},"value":{"type":"string"}},"required":["color","label","value"],"additionalProperties":false}},"reference":{"type":"object","properties":{"columns":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}},"targetColumns":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}},"targetObjectId":{"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)$"}},"required":["columns","targetColumns","targetObjectId"],"additionalProperties":false}},"additionalProperties":false},"description":{"type":["string","null"]},"drift":{"type":"string","enum":["ok","missing"]},"hasDefault":{"type":"boolean"},"id":{"type":"string"},"isArray":{"type":"boolean"},"isHidden":{"type":"boolean"},"isNullable":{"type":"boolean"},"isPrimaryKey":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"label":{"type":"string"},"objectId":{"type":"string"},"position":{"type":"number"},"slug":{"type":"string"},"sourceType":{"type":"string"},"type":{"type":"string"}},"required":["filterVariant","sortable","writable","columnName","config","description","drift","hasDefault","id","isArray","isHidden","isNullable","isPrimaryKey","isReadOnly","label","objectId","position","slug","sourceType","type"],"additionalProperties":false}},"object":{"type":"object","properties":{"approxRows":{"type":["number","null"]},"dataSourceId":{"type":"string"},"description":{"type":["string","null"]},"icon":{"type":"string"},"id":{"type":"string"},"isHidden":{"type":"boolean"},"labelAttributeId":{"type":["string","null"]},"labelPlural":{"type":"string"},"labelSingular":{"type":"string"},"missing":{"type":"boolean"},"position":{"type":"number"},"primaryKey":{"anyOf":[{"type":"array","prefixItems":[{"type":"string"}],"items":{"type":"string"},"minItems":1},{"type":"null"}]},"slug":{"type":"string"},"sourceSchema":{"type":"string"},"sourceTable":{"type":"string"},"takesColumns":{"type":"boolean"},"writeAccess":{"type":"object","properties":{"delete":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["table_missing","relation_read_only","source_read_only","not_permitted","no_key"]},"allowed":{"type":"boolean","const":false}},"required":["message","reason","allowed"],"additionalProperties":false}]},"insert":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["table_missing","relation_read_only","source_read_only","not_permitted","no_key"]},"allowed":{"type":"boolean","const":false}},"required":["message","reason","allowed"],"additionalProperties":false}]},"update":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["table_missing","relation_read_only","source_read_only","not_permitted","no_key"]},"allowed":{"type":"boolean","const":false}},"required":["message","reason","allowed"],"additionalProperties":false}]}},"required":["delete","insert","update"],"additionalProperties":false}},"required":["approxRows","dataSourceId","description","icon","id","isHidden","labelAttributeId","labelPlural","labelSingular","missing","position","primaryKey","slug","sourceSchema","sourceTable","takesColumns","writeAccess"],"additionalProperties":false},"views":{"type":"array","items":{"type":"object","properties":{"config":{"type":"object","properties":{"columns":{"default":[],"maxItems":500,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field id"},"hidden":{"default":false,"type":"boolean"},"pinned":{"type":"string","enum":["left","right"]},"width":{"type":"integer","minimum":40,"maximum":1200}},"required":["attributeId","hidden"],"additionalProperties":false}},"filter":{"default":{"conditions":[],"join":"and"},"type":"object","properties":{"conditions":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field id"},"operator":{"type":"string","enum":["iLike","notILike","startsWith","endsWith","eq","ne","inArray","notInArray","lt","lte","gt","gte","isBetween","isRelativeToToday","isEmpty","isNotEmpty"]},"value":{"default":"","description":"A list for inArray/notInArray, [from, to] for isBetween (both included), none for isEmpty/isNotEmpty. Dates YYYY-MM-DD; isRelativeToToday takes \"<n> days|weeks|months\"","anyOf":[{},{"maxItems":100,"type":"array","items":{}}]}},"required":["attributeId","operator","value"],"additionalProperties":false}},"join":{"default":"and","type":"string","enum":["and","or"]}},"required":["conditions","join"],"additionalProperties":false},"rowHeight":{"default":"short","type":"string","enum":["short","medium","tall","extra-tall"]},"sorts":{"default":[],"maxItems":5,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field id"},"direction":{"default":"asc","type":"string","enum":["asc","desc"]}},"required":["attributeId","direction"],"additionalProperties":false}},"options":{"default":{},"type":"object","propertyNames":{"anyOf":[{"type":"string","maxLength":60,"pattern":"^[a-z][a-z0-9_-]*$"},{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$"}],"description":"table, or a plugin's view type such as kanban/board"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}}},"required":["columns","filter","rowHeight","sorts","options"],"additionalProperties":false},"id":{"type":"string"},"mine":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"objectId":{"type":"string"},"position":{"type":"number"},"type":{"type":"string"},"typeState":{"type":"string","enum":["available","plugin_off","unknown"]}},"required":["config","id","mine","name","objectId","position","type","typeState"],"additionalProperties":false}}},"required":["attributes","object","views"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/objects/list":{"post":{"operationId":"objects.list","summary":"List objects","description":"The objects in the workspace's order (objects_reorder): each one's slug, name and data source, whether it's hidden, whether its table is gone (missing) or keyless, and why its records can't be written (writeRefusal). syncing: a table sync runs; list again when it's gone. workspace_describe (object) and objects_get have their fields.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"objects":{"type":"array","items":{"type":"object","properties":{"approxRows":{"type":["number","null"]},"dataSourceId":{"type":"string"},"description":{"type":["string","null"]},"icon":{"type":"string"},"id":{"type":"string"},"isHidden":{"type":"boolean"},"labelAttributeId":{"type":["string","null"]},"labelPlural":{"type":"string"},"labelSingular":{"type":"string"},"missing":{"type":"boolean"},"position":{"type":"number"},"primaryKey":{"anyOf":[{"type":"array","prefixItems":[{"type":"string"}],"items":{"type":"string"},"minItems":1},{"type":"null"}]},"slug":{"type":"string"},"sourceSchema":{"type":"string"},"sourceTable":{"type":"string"},"takesColumns":{"type":"boolean"},"writeAccess":{"type":"object","properties":{"delete":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["table_missing","relation_read_only","source_read_only","not_permitted","no_key"]},"allowed":{"type":"boolean","const":false}},"required":["message","reason","allowed"],"additionalProperties":false}]},"insert":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["table_missing","relation_read_only","source_read_only","not_permitted","no_key"]},"allowed":{"type":"boolean","const":false}},"required":["message","reason","allowed"],"additionalProperties":false}]},"update":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["table_missing","relation_read_only","source_read_only","not_permitted","no_key"]},"allowed":{"type":"boolean","const":false}},"required":["message","reason","allowed"],"additionalProperties":false}]}},"required":["delete","insert","update"],"additionalProperties":false},"visibleFieldCount":{"type":"number"}},"required":["approxRows","dataSourceId","description","icon","id","isHidden","labelAttributeId","labelPlural","labelSingular","missing","position","primaryKey","slug","sourceSchema","sourceTable","takesColumns","writeAccess","visibleFieldCount"],"additionalProperties":false}},"syncing":{"type":"boolean"}},"required":["objects","syncing"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/objects/reorder":{"post":{"operationId":"objects.reorder","summary":"Reorder objects","description":"Sets the order of the workspace's objects, which the sidebar, the home page and objects_list follow. Name every object once, in the new order.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"objects":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"description":"Every object of the workspace, each once, in the new order"}},"required":["objects"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"ok":{"type":"boolean"}},"required":["activityIds","ok"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"write"}}},"/objects/setKey":{"post":{"operationId":"objects.setKey","summary":"Set an object's key","description":"Gives a table or view without a key one, so its records can be opened and changed: columns that are unique together and never empty in the live table, which is checked first. A key is set once: it can't be changed or removed after, so confirm the columns with the user first. Sending the key it already has changes nothing; another is refused.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"primaryKey":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","minLength":1},"description":"Key column names, in order"}},"required":["object","primaryKey"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"object","properties":{"approxRows":{"type":["number","null"]},"dataSourceId":{"type":"string"},"description":{"type":["string","null"]},"icon":{"type":"string"},"id":{"type":"string"},"isHidden":{"type":"boolean"},"labelAttributeId":{"type":["string","null"]},"labelPlural":{"type":"string"},"labelSingular":{"type":"string"},"missing":{"type":"boolean"},"position":{"type":"number"},"primaryKey":{"anyOf":[{"type":"array","prefixItems":[{"type":"string"}],"items":{"type":"string"},"minItems":1},{"type":"null"}]},"slug":{"type":"string"},"sourceSchema":{"type":"string"},"sourceTable":{"type":"string"},"takesColumns":{"type":"boolean"},"writeAccess":{"type":"object","properties":{"delete":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["table_missing","relation_read_only","source_read_only","not_permitted","no_key"]},"allowed":{"type":"boolean","const":false}},"required":["message","reason","allowed"],"additionalProperties":false}]},"insert":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["table_missing","relation_read_only","source_read_only","not_permitted","no_key"]},"allowed":{"type":"boolean","const":false}},"required":["message","reason","allowed"],"additionalProperties":false}]},"update":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["table_missing","relation_read_only","source_read_only","not_permitted","no_key"]},"allowed":{"type":"boolean","const":false}},"required":["message","reason","allowed"],"additionalProperties":false}]}},"required":["delete","insert","update"],"additionalProperties":false}},"required":["approxRows","dataSourceId","description","icon","id","isHidden","labelAttributeId","labelPlural","labelSingular","missing","position","primaryKey","slug","sourceSchema","sourceTable","takesColumns","writeAccess"],"additionalProperties":false}},"required":["object"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":true,"ownerOnly":false,"scope":"admin"}}},"/objects/tables":{"post":{"operationId":"objects.tables","summary":"List a data source's tables","description":"A data source's tables as SQL names them: each object's schema, table and the columns still in it, hidden ones included, and the schema an unqualified table name is read from.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"dataSource":{"type":"string","minLength":1,"maxLength":100,"description":"Data source id or name"}},"required":["dataSource"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"defaultSchema":{"type":"string"},"tables":{"type":"array","items":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"schema":{"type":"string"}},"required":["columns","name","schema"],"additionalProperties":false}}},"required":["defaultSchema","tables"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"people","irreversible":false},"security":[{"sessionCookie":[]}]}},"/objects/update":{"post":{"operationId":"objects.update","summary":"Update an object","description":"Changes an object's labels, icon, description or labelAttribute (the field that names its records). isHidden hides the table from the sidebar, home page and command menu for everyone; it stays readable and writable. objects_set_key gives a table without a key one.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap"]},"isHidden":{"description":"Hides the table from the sidebar, home page and command menu (it stays readable and writable)","type":"boolean"},"labelAttribute":{"description":"The field whose value names a record; null for none","anyOf":[{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},{"type":"null"}]},"labelPlural":{"type":"string","minLength":1,"maxLength":80},"labelSingular":{"type":"string","minLength":1,"maxLength":80},"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"}},"required":["object"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"object":{"type":"object","properties":{"approxRows":{"type":["number","null"]},"dataSourceId":{"type":"string"},"description":{"type":["string","null"]},"icon":{"type":"string"},"id":{"type":"string"},"isHidden":{"type":"boolean"},"labelAttributeId":{"type":["string","null"]},"labelPlural":{"type":"string"},"labelSingular":{"type":"string"},"missing":{"type":"boolean"},"position":{"type":"number"},"primaryKey":{"anyOf":[{"type":"array","prefixItems":[{"type":"string"}],"items":{"type":"string"},"minItems":1},{"type":"null"}]},"slug":{"type":"string"},"sourceSchema":{"type":"string"},"sourceTable":{"type":"string"},"takesColumns":{"type":"boolean"},"writeAccess":{"type":"object","properties":{"delete":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["table_missing","relation_read_only","source_read_only","not_permitted","no_key"]},"allowed":{"type":"boolean","const":false}},"required":["message","reason","allowed"],"additionalProperties":false}]},"insert":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["table_missing","relation_read_only","source_read_only","not_permitted","no_key"]},"allowed":{"type":"boolean","const":false}},"required":["message","reason","allowed"],"additionalProperties":false}]},"update":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["table_missing","relation_read_only","source_read_only","not_permitted","no_key"]},"allowed":{"type":"boolean","const":false}},"required":["message","reason","allowed"],"additionalProperties":false}]}},"required":["delete","insert","update"],"additionalProperties":false}},"required":["approxRows","dataSourceId","description","icon","id","isHidden","labelAttributeId","labelPlural","labelSingular","missing","position","primaryKey","slug","sourceSchema","sourceTable","takesColumns","writeAccess"],"additionalProperties":false}},"required":["activityIds","object"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"write"}}},"/plugins/create":{"post":{"operationId":"plugins.create","summary":"Build a plugin","description":"Builds a plugin whose panels add sections to pages: home.main, shell.sidebar, record.aside or record.tabs (record panels take when: { objects }). The manifest follows plugins_manifest_schema: read it first. It is the person's own (Just me, version mine) until an owner or admin saves it for everyone. Prefer a spec body: nodes of the app's catalog showing data its bindings read through read tools (records.list), a node showing one with { $data: key, path }, a record panel's input naming its record with { $context: \"recordId\" } or \"object\". A frame body (HTML with inline scripts calling its declared procedures through window.dataembed) is only for what the catalog can't draw. Give default.order to place a panel. A manifest that can't work is refused, naming each problem and where: fix them and call again.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"manifest":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"},"description":"The whole plugin, as plugins_manifest_schema gives its schema: identity, and panels with their bodies"}},"required":["manifest"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"plugin":{"type":"object","properties":{"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"name":{"type":"string"},"origin":{"type":"string","const":"workspace"},"panels":{"type":"array","items":{"type":"object","properties":{"default":{"type":"object","properties":{"order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["order"],"additionalProperties":false},"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"slot":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]},"title":{"type":"string"},"when":{"type":"object","properties":{"attributeTypes":{"type":"array","items":{"type":"string"}},"objects":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"body":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"spec"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"calls":{"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"frame"}},"required":["calls","kind"],"additionalProperties":false}]}},"required":["icon","id","slot","title","body"],"additionalProperties":false}},"updatedAt":{"type":"string"},"version":{"type":"string","enum":["everyone","mine","mine_over_everyone"],"description":"Which version the reader sees: everyone's; their own, which only they have; or their own over everyone's, which everyone else still sees"}},"required":["description","icon","id","name","origin","panels","updatedAt","version"],"additionalProperties":false}},"required":["activityIds","plugin"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"write"}}},"/plugins/delete":{"post":{"operationId":"plugins.delete","summary":"Delete a workspace plugin","description":"Deletes a workspace plugin for everyone, every member's own version of it included. Only when asked to delete it: plugins_reset drops the person's own version.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"pluginId":{"type":"string","pattern":"^ws-[a-z][a-z0-9-]{0,56}$"}},"required":["pluginId"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":true,"ownerOnly":false,"scope":"admin"}}},"/plugins/get":{"post":{"operationId":"plugins.get","summary":"Get a plugin","description":"One plugin. A bundled one (origin bundled): its tier (core: always on; default: on until an admin turns it off), its status (state enabled, disabled or needs_configuration: on but lacking setup, reason says why; byDefault: following its tier), settings (JSON Schema and values), actions, and contributions (view types, page sections, connection forms, sample databases) with their option schemas. A workspace plugin (origin workspace, id ws-…): its panels' bodies, which version the person sees (version: mine, only theirs; mine_over_everyone, theirs over everyone's; or everyone), and diagnostics: what of it doesn't work now.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"pluginId":{"anyOf":[{"type":"string","maxLength":60,"pattern":"^[a-z][a-z0-9-]*$"},{"type":"string","pattern":"^ws-[a-z][a-z0-9-]{0,56}$"}]}},"required":["pluginId"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"plugin":{"oneOf":[{"type":"object","properties":{"actions":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"pluginId":{"type":"string"},"requires":{"type":"array","items":{"type":"string","enum":["insert","update","delete"]}},"target":{"type":"string","enum":["workspace","object","records","attribute"]},"title":{"type":"string"}},"required":["description","icon","id","input","pluginId","requires","target","title"],"additionalProperties":false}},"category":{"type":"string","enum":["agents","ai","data","views"]},"contributions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"title":{"type":"string"},"attributeTypes":{"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"viewTypes"},"options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["description","icon","id","title","attributeTypes","kind","options"],"additionalProperties":false},{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"title":{"type":"string"},"attributeTypes":{"type":"array","items":{"type":"string"}},"default":{"anyOf":[{"type":"object","properties":{"order":{"type":"number"}},"required":["order"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","const":"panels"},"options":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},{"type":"null"}]},"slot":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]}},"required":["description","icon","id","title","attributeTypes","default","kind","options","slot"],"additionalProperties":false},{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","const":"connectionForms"}},"required":["description","icon","id","title","kind"],"additionalProperties":false},{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","const":"samples"},"tables":{"type":"array","items":{"type":"string"}}},"required":["description","icon","id","title","kind","tables"],"additionalProperties":false}]}},"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"name":{"type":"string"},"origin":{"type":"string","const":"bundled"},"settings":{"type":"object","properties":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["schema","values"],"additionalProperties":false},"status":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"disabled"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"byDefault":{"type":"boolean"},"state":{"type":"string","const":"enabled"}},"required":["byDefault","state"],"additionalProperties":false},{"type":"object","properties":{"byDefault":{"type":"boolean"},"reason":{"type":"string"},"state":{"type":"string","const":"needs_configuration"}},"required":["byDefault","reason","state"],"additionalProperties":false}]},"tier":{"type":"string","enum":["core","default"]}},"required":["actions","category","contributions","description","icon","id","name","origin","settings","status","tier"],"additionalProperties":false},{"type":"object","properties":{"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"name":{"type":"string"},"origin":{"type":"string","const":"workspace"},"panels":{"type":"array","items":{"type":"object","properties":{"default":{"type":"object","properties":{"order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["order"],"additionalProperties":false},"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"slot":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]},"title":{"type":"string"},"when":{"type":"object","properties":{"attributeTypes":{"type":"array","items":{"type":"string"}},"objects":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"body":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"spec"},"spec":{"$ref":"#/components/schemas/__schema0"}},"required":["kind","spec"],"additionalProperties":false},{"type":"object","properties":{"calls":{"type":"array","items":{"type":"string"}},"html":{"type":"string"},"kind":{"type":"string","const":"frame"}},"required":["calls","html","kind"],"additionalProperties":false}]}},"required":["icon","id","slot","title","body"],"additionalProperties":false}},"updatedAt":{"type":"string"},"version":{"type":"string","enum":["everyone","mine","mine_over_everyone"],"description":"Which version the reader sees: everyone's; their own, which only they have; or their own over everyone's, which everyone else still sees"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"string","description":"Where in the manifest: panels[0].body.spec.data.deals.procedure"}},"required":["message","path"],"additionalProperties":false}}},"required":["description","icon","id","name","origin","panels","updatedAt","version","diagnostics"],"additionalProperties":false}]}},"required":["plugin"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/plugins/list":{"post":{"operationId":"plugins.list","summary":"List plugins","description":"Every plugin: the bundled ones (origin bundled) with tier, status (enabled, disabled or needs_configuration; reason says why), settings, actions and contributions, as plugins_get gives them; then the workspace's own (origin workspace) the person sees, with their version and panels.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"plugins":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"actions":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"pluginId":{"type":"string"},"requires":{"type":"array","items":{"type":"string","enum":["insert","update","delete"]}},"target":{"type":"string","enum":["workspace","object","records","attribute"]},"title":{"type":"string"}},"required":["description","icon","id","input","pluginId","requires","target","title"],"additionalProperties":false}},"category":{"type":"string","enum":["agents","ai","data","views"]},"contributions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"title":{"type":"string"},"attributeTypes":{"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"viewTypes"},"options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["description","icon","id","title","attributeTypes","kind","options"],"additionalProperties":false},{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"title":{"type":"string"},"attributeTypes":{"type":"array","items":{"type":"string"}},"default":{"anyOf":[{"type":"object","properties":{"order":{"type":"number"}},"required":["order"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","const":"panels"},"options":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},{"type":"null"}]},"slot":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]}},"required":["description","icon","id","title","attributeTypes","default","kind","options","slot"],"additionalProperties":false},{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","const":"connectionForms"}},"required":["description","icon","id","title","kind"],"additionalProperties":false},{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","const":"samples"},"tables":{"type":"array","items":{"type":"string"}}},"required":["description","icon","id","title","kind","tables"],"additionalProperties":false}]}},"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"name":{"type":"string"},"origin":{"type":"string","const":"bundled"},"settings":{"type":"object","properties":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["schema","values"],"additionalProperties":false},"status":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"disabled"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"byDefault":{"type":"boolean"},"state":{"type":"string","const":"enabled"}},"required":["byDefault","state"],"additionalProperties":false},{"type":"object","properties":{"byDefault":{"type":"boolean"},"reason":{"type":"string"},"state":{"type":"string","const":"needs_configuration"}},"required":["byDefault","reason","state"],"additionalProperties":false}]},"tier":{"type":"string","enum":["core","default"]}},"required":["actions","category","contributions","description","icon","id","name","origin","settings","status","tier"],"additionalProperties":false},{"type":"object","properties":{"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"name":{"type":"string"},"origin":{"type":"string","const":"workspace"},"panels":{"type":"array","items":{"type":"object","properties":{"default":{"type":"object","properties":{"order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["order"],"additionalProperties":false},"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"slot":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]},"title":{"type":"string"},"when":{"type":"object","properties":{"attributeTypes":{"type":"array","items":{"type":"string"}},"objects":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"body":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"spec"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"calls":{"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"frame"}},"required":["calls","kind"],"additionalProperties":false}]}},"required":["icon","id","slot","title","body"],"additionalProperties":false}},"updatedAt":{"type":"string"},"version":{"type":"string","enum":["everyone","mine","mine_over_everyone"],"description":"Which version the reader sees: everyone's; their own, which only they have; or their own over everyone's, which everyone else still sees"}},"required":["description","icon","id","name","origin","panels","updatedAt","version"],"additionalProperties":false}]}}},"required":["plugins"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/plugins/listActions":{"post":{"operationId":"plugins.listActions","summary":"List plugin actions","description":"The plugin actions you can run with plugins_run_action: for an object (on it, its records or a field), or without one the workspace-wide ones. Each has its target kind and its input's JSON Schema. Only on, ready plugins' actions that can run there are listed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"object":{"description":"The actions for this object's records and fields; omit for workspace actions","type":"string","minLength":1,"maxLength":100}}}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"actions":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"pluginId":{"type":"string"},"requires":{"type":"array","items":{"type":"string","enum":["insert","update","delete"]}},"target":{"type":"string","enum":["workspace","object","records","attribute"]},"title":{"type":"string"}},"required":["description","icon","id","input","pluginId","requires","target","title"],"additionalProperties":false}}},"required":["actions"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/plugins/manifestSchema":{"post":{"operationId":"plugins.manifestSchema","summary":"Get the plugin manifest schema","description":"The JSON Schema of a workspace plugin's manifest, which plugins_create and plugins_update take: its identity, panels and their slots, and bodies, a spec's catalog of nodes with their props, bindings and actions included.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["schema"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/plugins/reset":{"post":{"operationId":"plugins.reset","summary":"Reset a workspace plugin","description":"Drops the person's own version of a workspace plugin: from mine_over_everyone, everyone's shows again (kind reverted, with it); from mine, only theirs, it is gone (kind removed). Refused on everyone's: none of it is theirs. Undo brings it back.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"pluginId":{"type":"string","pattern":"^ws-[a-z][a-z0-9-]{0,56}$"}},"required":["pluginId"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"removed"}},"required":["activityIds","kind"],"additionalProperties":false},{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"reverted"},"plugin":{"type":"object","properties":{"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"name":{"type":"string"},"origin":{"type":"string","const":"workspace"},"panels":{"type":"array","items":{"type":"object","properties":{"default":{"type":"object","properties":{"order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["order"],"additionalProperties":false},"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"slot":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]},"title":{"type":"string"},"when":{"type":"object","properties":{"attributeTypes":{"type":"array","items":{"type":"string"}},"objects":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"body":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"spec"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"calls":{"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"frame"}},"required":["calls","kind"],"additionalProperties":false}]}},"required":["icon","id","slot","title","body"],"additionalProperties":false}},"updatedAt":{"type":"string"},"version":{"type":"string","enum":["everyone","mine","mine_over_everyone"],"description":"Which version the reader sees: everyone's; their own, which only they have; or their own over everyone's, which everyone else still sees"}},"required":["description","icon","id","name","origin","panels","updatedAt","version"],"additionalProperties":false,"description":"Everyone's version, which the person sees again"}},"required":["activityIds","kind","plugin"],"additionalProperties":false}]}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"write"}}},"/plugins/runAction":{"post":{"operationId":"plugins.runAction","summary":"Run a plugin action","description":"Runs a plugin action on what its target kind (plugins_list_actions) names: workspace → no target; object → target.object; records → target.object and target.recordIds (at least one); attribute → target.object and target.attributeId. A target field its kind doesn't take is refused, not ignored, and a call the action can't work with is refused with what to fix. input follows the action's JSON Schema. It answers within 40 seconds with its result, or with the job it started for longer work (follow it with jobs_get). Actions may use paid AI or search services and may change records.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"actionId":{"type":"string","minLength":1,"maxLength":80},"input":{"default":{},"description":"The action's input, matching its JSON Schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"pluginId":{"type":"string","maxLength":60,"pattern":"^[a-z][a-z0-9-]*$"},"target":{"default":{},"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"recordIds":{"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":1000,"description":"Record id: its key's value (a JSON array for a composite key)"}}},"description":"Fields by the action's target kind; leave out those it doesn't take"}},"required":["actionId","pluginId"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"$ref":"#/components/schemas/__schema0"},"kind":{"type":"string","const":"result"},"message":{"type":["string","null"]}},"required":["data","kind","message"],"additionalProperties":false},{"type":"object","properties":{"job":{"oneOf":[{"type":"object","properties":{"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"costCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string","enum":["fill","import"]},"objectId":{"type":["string","null"]},"progress":{"type":"object","properties":{"done":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["done","total"],"additionalProperties":false},"startedBy":{"type":["string","null"]},"title":{"type":"string"},"canCancel":{"type":"boolean"},"status":{"type":"string","const":"running"}},"required":["budgetCents","costCents","createdAt","id","kind","objectId","progress","startedBy","title","canCancel","status"],"additionalProperties":false},{"type":"object","properties":{"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"costCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string","enum":["fill","import"]},"objectId":{"type":["string","null"]},"progress":{"type":"object","properties":{"done":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["done","total"],"additionalProperties":false},"startedBy":{"type":["string","null"]},"title":{"type":"string"},"status":{"type":"string","const":"stopping"}},"required":["budgetCents","costCents","createdAt","id","kind","objectId","progress","startedBy","title","status"],"additionalProperties":false},{"type":"object","properties":{"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"costCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string","enum":["fill","import"]},"objectId":{"type":["string","null"]},"progress":{"type":"object","properties":{"done":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["done","total"],"additionalProperties":false},"startedBy":{"type":["string","null"]},"title":{"type":"string"},"endedAt":{"type":"string"},"status":{"type":"string","enum":["done","cancelled","outOfBudget","failed"]}},"required":["budgetCents","costCents","createdAt","id","kind","objectId","progress","startedBy","title","endedAt","status"],"additionalProperties":false}]},"kind":{"type":"string","const":"job"},"message":{"type":["string","null"]}},"required":["job","kind","message"],"additionalProperties":false}]}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"write"}}},"/plugins/saveForEveryone":{"post":{"operationId":"plugins.saveForEveryone","summary":"Save a workspace plugin for everyone","description":"Makes the person's own version of a workspace plugin (mine or mine_over_everyone) everyone's: every member sees it, and theirs stops overriding it. Refused on everyone's. Only when asked to share it. A frame's declared calls then run as whoever opens it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"pluginId":{"type":"string","pattern":"^ws-[a-z][a-z0-9-]{0,56}$"}},"required":["pluginId"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"plugin":{"type":"object","properties":{"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"name":{"type":"string"},"origin":{"type":"string","const":"workspace"},"panels":{"type":"array","items":{"type":"object","properties":{"default":{"type":"object","properties":{"order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["order"],"additionalProperties":false},"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"slot":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]},"title":{"type":"string"},"when":{"type":"object","properties":{"attributeTypes":{"type":"array","items":{"type":"string"}},"objects":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"body":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"spec"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"calls":{"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"frame"}},"required":["calls","kind"],"additionalProperties":false}]}},"required":["icon","id","slot","title","body"],"additionalProperties":false}},"updatedAt":{"type":"string"},"version":{"type":"string","enum":["everyone","mine","mine_over_everyone"],"description":"Which version the reader sees: everyone's; their own, which only they have; or their own over everyone's, which everyone else still sees"}},"required":["description","icon","id","name","origin","panels","updatedAt","version"],"additionalProperties":false}},"required":["activityIds","plugin"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"admin"}}},"/plugins/setEnabled":{"post":{"operationId":"plugins.setEnabled","summary":"Enable or disable a plugin","description":"Turns a bundled plugin on or off for the workspace; answers its status. Off hides its actions, view types (their views show as tables), page sections and the notes it gives agents, starts none of its jobs or threads and refuses every call the running ones make until it's on again, deleting nothing. Core plugins (always on) refuse.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"enabled":{"type":"boolean"},"pluginId":{"type":"string","maxLength":60,"pattern":"^[a-z][a-z0-9-]*$"}},"required":["enabled","pluginId"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"plugin":{"type":"object","properties":{"actions":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"pluginId":{"type":"string"},"requires":{"type":"array","items":{"type":"string","enum":["insert","update","delete"]}},"target":{"type":"string","enum":["workspace","object","records","attribute"]},"title":{"type":"string"}},"required":["description","icon","id","input","pluginId","requires","target","title"],"additionalProperties":false}},"category":{"type":"string","enum":["agents","ai","data","views"]},"contributions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"title":{"type":"string"},"attributeTypes":{"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"viewTypes"},"options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["description","icon","id","title","attributeTypes","kind","options"],"additionalProperties":false},{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"title":{"type":"string"},"attributeTypes":{"type":"array","items":{"type":"string"}},"default":{"anyOf":[{"type":"object","properties":{"order":{"type":"number"}},"required":["order"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","const":"panels"},"options":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},{"type":"null"}]},"slot":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]}},"required":["description","icon","id","title","attributeTypes","default","kind","options","slot"],"additionalProperties":false},{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","const":"connectionForms"}},"required":["description","icon","id","title","kind"],"additionalProperties":false},{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","const":"samples"},"tables":{"type":"array","items":{"type":"string"}}},"required":["description","icon","id","title","kind","tables"],"additionalProperties":false}]}},"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"name":{"type":"string"},"origin":{"type":"string","const":"bundled"},"settings":{"type":"object","properties":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["schema","values"],"additionalProperties":false},"status":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"disabled"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"byDefault":{"type":"boolean"},"state":{"type":"string","const":"enabled"}},"required":["byDefault","state"],"additionalProperties":false},{"type":"object","properties":{"byDefault":{"type":"boolean"},"reason":{"type":"string"},"state":{"type":"string","const":"needs_configuration"}},"required":["byDefault","reason","state"],"additionalProperties":false}]},"tier":{"type":"string","enum":["core","default"]}},"required":["actions","category","contributions","description","icon","id","name","origin","settings","status","tier"],"additionalProperties":false}},"required":["plugin"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"admin"}}},"/plugins/update":{"post":{"operationId":"plugins.update","summary":"Change a workspace plugin","description":"Replaces a workspace plugin's whole manifest (plugins_get gives it) for the person only: over everyone's version, theirs shows instead (mine_over_everyone) until plugins_reset. Checked as plugins_create checks it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"manifest":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"},"description":"The whole plugin, as plugins_manifest_schema gives its schema: identity, and panels with their bodies"}},"required":["manifest"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"plugin":{"type":"object","properties":{"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"name":{"type":"string"},"origin":{"type":"string","const":"workspace"},"panels":{"type":"array","items":{"type":"object","properties":{"default":{"type":"object","properties":{"order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["order"],"additionalProperties":false},"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"slot":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]},"title":{"type":"string"},"when":{"type":"object","properties":{"attributeTypes":{"type":"array","items":{"type":"string"}},"objects":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"body":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"spec"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"calls":{"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"frame"}},"required":["calls","kind"],"additionalProperties":false}]}},"required":["icon","id","slot","title","body"],"additionalProperties":false}},"updatedAt":{"type":"string"},"version":{"type":"string","enum":["everyone","mine","mine_over_everyone"],"description":"Which version the reader sees: everyone's; their own, which only they have; or their own over everyone's, which everyone else still sees"}},"required":["description","icon","id","name","origin","panels","updatedAt","version"],"additionalProperties":false}},"required":["activityIds","plugin"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"write"}}},"/plugins/updateSettings":{"post":{"operationId":"plugins.updateSettings","summary":"Update plugin settings","description":"Updates a plugin's settings for this workspace: the keys given change, null resets one; each value must fit the setting's JSON Schema (plugins_get).","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"pluginId":{"type":"string","maxLength":60,"pattern":"^[a-z][a-z0-9-]*$"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"},"description":"Setting key → value; null resets a setting to its default"}},"required":["pluginId","settings"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"plugin":{"type":"object","properties":{"actions":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"pluginId":{"type":"string"},"requires":{"type":"array","items":{"type":"string","enum":["insert","update","delete"]}},"target":{"type":"string","enum":["workspace","object","records","attribute"]},"title":{"type":"string"}},"required":["description","icon","id","input","pluginId","requires","target","title"],"additionalProperties":false}},"category":{"type":"string","enum":["agents","ai","data","views"]},"contributions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"title":{"type":"string"},"attributeTypes":{"type":"array","items":{"type":"string"}},"kind":{"type":"string","const":"viewTypes"},"options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["description","icon","id","title","attributeTypes","kind","options"],"additionalProperties":false},{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"title":{"type":"string"},"attributeTypes":{"type":"array","items":{"type":"string"}},"default":{"anyOf":[{"type":"object","properties":{"order":{"type":"number"}},"required":["order"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","const":"panels"},"options":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},{"type":"null"}]},"slot":{"type":"string","enum":["shell.sidebar","shell.aside","home.main","record.aside","record.tabs"]}},"required":["description","icon","id","title","attributeTypes","default","kind","options","slot"],"additionalProperties":false},{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","const":"connectionForms"}},"required":["description","icon","id","title","kind"],"additionalProperties":false},{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","const":"samples"},"tables":{"type":"array","items":{"type":"string"}}},"required":["description","icon","id","title","kind","tables"],"additionalProperties":false}]}},"description":{"type":"string"},"icon":{"type":"string","enum":["box","briefcase","building","building-2","calendar","car","chart-line","circle-dollar-sign","clipboard-list","credit-card","database","eye","file-text","flag","folder","globe","graduation-cap","handshake","heart","inbox","landmark","layers","lightbulb","mail","map-pin","megaphone","package","rocket","shopping-cart","star","store","table","tag","target","ticket","truck","user","users","wrench","zap","activity","align-left","arrow-up-right","bot","braces","calendar-clock","circle-chevron-down","hash","house","layout-template","link","list","list-checks","list-restart","message-square-text","panel-left","phone","plug","search","settings","shapes","sparkles","square-check","square-kanban","square-terminal","type","wand-sparkles"]},"id":{"type":"string"},"name":{"type":"string"},"origin":{"type":"string","const":"bundled"},"settings":{"type":"object","properties":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["schema","values"],"additionalProperties":false},"status":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"disabled"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"byDefault":{"type":"boolean"},"state":{"type":"string","const":"enabled"}},"required":["byDefault","state"],"additionalProperties":false},{"type":"object","properties":{"byDefault":{"type":"boolean"},"reason":{"type":"string"},"state":{"type":"string","const":"needs_configuration"}},"required":["byDefault","reason","state"],"additionalProperties":false}]},"tier":{"type":"string","enum":["core","default"]}},"required":["actions","category","contributions","description","icon","id","name","origin","settings","status","tier"],"additionalProperties":false}},"required":["plugin"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"admin"}}},"/records/aggregate":{"post":{"operationId":"records.aggregate","summary":"Aggregate records","description":"Counts records, or sums, averages or finds the least or most of a field, per group: deals by stage is { groupBy: [{ attributeId: \"stage\" }], measures: [{ fn: \"count\" }, { fn: \"sum\", attributeId: \"amount\" }] }; a date groups by a bucket (month). filter, search and viewId work as in records_list. A group names its groupings by slug (a bucket as slug_month, its first day; a reference as { id, label }) and its measures count or fn_slug (sum_amount); truncated: more groups than limit.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"filter":{"type":"object","properties":{"conditions":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"operator":{"type":"string","enum":["iLike","notILike","startsWith","endsWith","eq","ne","inArray","notInArray","lt","lte","gt","gte","isBetween","isRelativeToToday","isEmpty","isNotEmpty"]},"value":{"description":"A list for inArray/notInArray, [from, to] for isBetween (both included), none for isEmpty/isNotEmpty. Dates YYYY-MM-DD; isRelativeToToday takes \"<n> days|weeks|months\"","anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]},{"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}},"required":["attributeId","operator"]}},"join":{"default":"and","type":"string","enum":["and","or"]}},"required":["conditions"]},"groupBy":{"default":[],"description":"Fields to group by; none measures every matching record as one group","maxItems":2,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"bucket":{"description":"For a date: group by its day, week, month, quarter or year","type":"string","enum":["day","week","month","quarter","year"]}},"required":["attributeId"]}},"limit":{"default":100,"type":"integer","minimum":1,"maximum":500},"measures":{"default":[{"fn":"count"}],"minItems":1,"maxItems":5,"type":"array","items":{"oneOf":[{"type":"object","properties":{"fn":{"type":"string","const":"count"}},"required":["fn"]},{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"A number (sum, avg, min, max) or a date (min, max)"},"fn":{"type":"string","enum":["sum","avg","min","max"]}},"required":["attributeId","fn"]}]}},"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"search":{"description":"Free text matched case-insensitively across the object's text fields","type":"string","maxLength":200},"sort":{"default":{"by":"group","direction":"asc"},"type":"object","properties":{"by":{"type":"string","enum":["group","measure"],"description":"The groups' values, or the first measure"},"direction":{"type":"string","enum":["asc","desc"]}},"required":["by","direction"]},"timeZone":{"description":"IANA time zone date filters are read in, e.g. \"Europe/Berlin\" (default UTC)","type":"string","maxLength":64},"viewId":{"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)$"}},"required":["object"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"array","items":{"type":["string","number","boolean","null"]}},"values":{"type":"array","items":{"type":["number","string","null"]}}},"required":["keys","values"],"additionalProperties":false}},"referenceLabels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"truncated":{"type":"boolean"}},"required":["groups","referenceLabels","truncated"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/records/create":{"post":{"operationId":"records.create","summary":"Create records","description":"Creates 1–100 records of one object, all or none (records_search turns a name into a reference's id). workspace_describe says which fields are required; look for an existing record before creating a likely duplicate.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"records":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"values":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"},"description":"By field slug: { \"name\": \"Acme\", \"employees\": 40 }; a select takes an option value, a reference the record's id, null clears one"}},"required":["values"]},"description":"The records to create, all or none"}},"required":["object","records"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["id","values"],"additionalProperties":false}}},"required":["activityIds","records"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"write"}}},"/records/delete":{"post":{"operationId":"records.delete","summary":"Delete records","description":"Deletes 1–500 records of one object, all or none: from its table, a connected database's included. It can't be undone: confirm with the user first.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"recordIds":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":1000,"description":"Record id: its key's value (a JSON array for a composite key)"}}},"required":["object","recordIds"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"deleted":{"type":"number"}},"required":["activityIds","deleted"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":true,"ownerOnly":false,"scope":"write"}}},"/records/get":{"post":{"operationId":"records.get","summary":"Get a record","description":"Reads one record with its values in full (records_list and write results shorten long text, and name what they shortened in truncated). attributeIds reads only those fields (and the label), for a record too large to read whole.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"recordId":{"type":"string","minLength":1,"maxLength":1000,"description":"Record id: its key's value (a JSON array for a composite key)"},"attributeIds":{"description":"Only these fields (default: all); the label field always comes back","maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"}}},"required":["object","recordId"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"record":{"type":"object","properties":{"id":{"type":"string"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["id","values"],"additionalProperties":false},"referenceLabels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}},"required":["record","referenceLabels"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/records/import":{"post":{"operationId":"records.import","summary":"Import records","description":"Imports 1–500 rows into an object's table, all or none (one call per batch of a larger file). A row matching a record by match is skipped, updated or failed per onConflict; one matching several fails. dryRun: true writes nothing and answers the counts and failing rows: run it first. Otherwise a failing row refuses the batch; a written one answers activityIds: activity_undo puts back what it updated, not what it added.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"dryRun":{"default":false,"description":"Write nothing: answer what the import would do, and which rows fail","type":"boolean"},"match":{"description":"How a row finds its record: the key's fields (the default), or one other","minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"}},"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"onConflict":{"default":"error","description":"A row that matches a record: skip it, update the record, or fail (the default)","type":"string","enum":["skip","update","error"]},"rows":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"},"description":"By field slug: { \"name\": \"Acme\", \"employees\": 40 }; a select takes an option value, a reference the record's id, null clears one"}}},"required":["object","rows"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"inserted":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":0,"maximum":9007199254740991},"updated":{"type":"integer","minimum":0,"maximum":9007199254740991},"dryRun":{"type":"boolean","const":true},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failures":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":["string","null"]},"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"message":{"type":"string"}},"required":["attributeId","index","message"],"additionalProperties":false}}},"required":["inserted","skipped","updated","dryRun","failed","failures"],"additionalProperties":false},{"type":"object","properties":{"inserted":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":0,"maximum":9007199254740991},"updated":{"type":"integer","minimum":0,"maximum":9007199254740991},"activityIds":{"type":"array","items":{"type":"string"}},"dryRun":{"type":"boolean","const":false}},"required":["inserted","skipped","updated","activityIds","dryRun"],"additionalProperties":false}]}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"write"}}},"/records/list":{"post":{"operationId":"records.list","summary":"List records","description":"An object's records a page at a time, filtered, sorted and searched. A condition names a field by slug with an operator from workspace_describe's filterOperators: { attributeId: \"industry\", operator: \"inArray\", value: [\"software\"] }; a select takes option values, a reference the ids of records it points at. viewId starts from a saved view; group lists one column of a board. Each record has its id, label, url and non-empty values by slug; the first page has the total, nextCursor the next page.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"attributeIds":{"description":"Only these fields (default: all); the label field always comes back","maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"}},"cursor":{"description":"nextCursor from the previous page, to continue the same query","type":"string","maxLength":4000},"filter":{"type":"object","properties":{"conditions":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"operator":{"type":"string","enum":["iLike","notILike","startsWith","endsWith","eq","ne","inArray","notInArray","lt","lte","gt","gte","isBetween","isRelativeToToday","isEmpty","isNotEmpty"]},"value":{"description":"A list for inArray/notInArray, [from, to] for isBetween (both included), none for isEmpty/isNotEmpty. Dates YYYY-MM-DD; isRelativeToToday takes \"<n> days|weeks|months\"","anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]},{"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}},"required":["attributeId","operator"]}},"join":{"default":"and","type":"string","enum":["and","or"]}},"required":["conditions"]},"group":{"description":"Only the records in one column of a board: their select field holds this option; applied on top of the filter","type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"A select field of the object"},"value":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"One of its option values; null for records holding none of them"}},"required":["attributeId","value"]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"search":{"description":"Free text matched case-insensitively across the object's text fields","type":"string","maxLength":200},"sorts":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"direction":{"default":"asc","type":"string","enum":["asc","desc"]}},"required":["attributeId"]}},"timeZone":{"description":"IANA time zone date filters are read in, e.g. \"Europe/Berlin\" (default UTC)","type":"string","maxLength":64},"viewId":{"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)$"}},"required":["object"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"referenceLabels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["id","values"],"additionalProperties":false}},"total":{"anyOf":[{"type":"object","properties":{"count":{"type":"number"},"kind":{"type":"string","enum":["exact","estimate","at_least"]}},"required":["count","kind"],"additionalProperties":false},{"type":"null"}]}},"required":["nextCursor","referenceLabels","rows","total"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/records/related":{"post":{"operationId":"records.related","summary":"Related records","description":"Records on other objects that point at this one (a company's people, its deals), grouped by the field that points, each group with its total.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"recordId":{"type":"string","minLength":1,"maxLength":1000,"description":"Record id: its key's value (a JSON array for a composite key)"}},"required":["object","recordId"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"related":{"type":"array","items":{"type":"object","properties":{"attribute":{"type":"object","properties":{"filterVariant":{"anyOf":[{"type":"string","enum":["text","number","date","boolean","select","multiSelect","none"]},{"type":"null"}]},"sortable":{"type":"boolean"},"writable":{"type":"object","properties":{"create":{"type":"boolean"},"update":{"type":"boolean"}},"required":["create","update"],"additionalProperties":false},"columnName":{"type":"string"},"config":{"type":"object","properties":{"ai":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"What AI writes into the field for each record"}},"required":["prompt"],"additionalProperties":false},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"max":{"type":"integer","minimum":1,"maximum":10},"options":{"type":"array","items":{"type":"object","properties":{"color":{"type":"string","enum":["gray","red","orange","amber","green","teal","blue","indigo","purple","pink"]},"label":{"type":"string"},"value":{"type":"string"}},"required":["color","label","value"],"additionalProperties":false}},"reference":{"type":"object","properties":{"columns":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}},"targetColumns":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}},"targetObjectId":{"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)$"}},"required":["columns","targetColumns","targetObjectId"],"additionalProperties":false}},"additionalProperties":false},"description":{"type":["string","null"]},"drift":{"type":"string","enum":["ok","missing"]},"hasDefault":{"type":"boolean"},"id":{"type":"string"},"isArray":{"type":"boolean"},"isHidden":{"type":"boolean"},"isNullable":{"type":"boolean"},"isPrimaryKey":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"label":{"type":"string"},"objectId":{"type":"string"},"position":{"type":"number"},"slug":{"type":"string"},"sourceType":{"type":"string"},"type":{"type":"string"}},"required":["filterVariant","sortable","writable","columnName","config","description","drift","hasDefault","id","isArray","isHidden","isNullable","isPrimaryKey","isReadOnly","label","objectId","position","slug","sourceType","type"],"additionalProperties":false},"attributes":{"type":"array","items":{"type":"object","properties":{"filterVariant":{"anyOf":[{"type":"string","enum":["text","number","date","boolean","select","multiSelect","none"]},{"type":"null"}]},"sortable":{"type":"boolean"},"writable":{"type":"object","properties":{"create":{"type":"boolean"},"update":{"type":"boolean"}},"required":["create","update"],"additionalProperties":false},"columnName":{"type":"string"},"config":{"type":"object","properties":{"ai":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"What AI writes into the field for each record"}},"required":["prompt"],"additionalProperties":false},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"max":{"type":"integer","minimum":1,"maximum":10},"options":{"type":"array","items":{"type":"object","properties":{"color":{"type":"string","enum":["gray","red","orange","amber","green","teal","blue","indigo","purple","pink"]},"label":{"type":"string"},"value":{"type":"string"}},"required":["color","label","value"],"additionalProperties":false}},"reference":{"type":"object","properties":{"columns":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}},"targetColumns":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}},"targetObjectId":{"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)$"}},"required":["columns","targetColumns","targetObjectId"],"additionalProperties":false}},"additionalProperties":false},"description":{"type":["string","null"]},"drift":{"type":"string","enum":["ok","missing"]},"hasDefault":{"type":"boolean"},"id":{"type":"string"},"isArray":{"type":"boolean"},"isHidden":{"type":"boolean"},"isNullable":{"type":"boolean"},"isPrimaryKey":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"label":{"type":"string"},"objectId":{"type":"string"},"position":{"type":"number"},"slug":{"type":"string"},"sourceType":{"type":"string"},"type":{"type":"string"}},"required":["filterVariant","sortable","writable","columnName","config","description","drift","hasDefault","id","isArray","isHidden","isNullable","isPrimaryKey","isReadOnly","label","objectId","position","slug","sourceType","type"],"additionalProperties":false}},"object":{"type":"object","properties":{"approxRows":{"type":["number","null"]},"dataSourceId":{"type":"string"},"description":{"type":["string","null"]},"icon":{"type":"string"},"id":{"type":"string"},"isHidden":{"type":"boolean"},"labelAttributeId":{"type":["string","null"]},"labelPlural":{"type":"string"},"labelSingular":{"type":"string"},"missing":{"type":"boolean"},"position":{"type":"number"},"primaryKey":{"anyOf":[{"type":"array","prefixItems":[{"type":"string"}],"items":{"type":"string"},"minItems":1},{"type":"null"}]},"slug":{"type":"string"},"sourceSchema":{"type":"string"},"sourceTable":{"type":"string"},"takesColumns":{"type":"boolean"},"writeAccess":{"type":"object","properties":{"delete":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["table_missing","relation_read_only","source_read_only","not_permitted","no_key"]},"allowed":{"type":"boolean","const":false}},"required":["message","reason","allowed"],"additionalProperties":false}]},"insert":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["table_missing","relation_read_only","source_read_only","not_permitted","no_key"]},"allowed":{"type":"boolean","const":false}},"required":["message","reason","allowed"],"additionalProperties":false}]},"update":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["table_missing","relation_read_only","source_read_only","not_permitted","no_key"]},"allowed":{"type":"boolean","const":false}},"required":["message","reason","allowed"],"additionalProperties":false}]}},"required":["delete","insert","update"],"additionalProperties":false}},"required":["approxRows","dataSourceId","description","icon","id","isHidden","labelAttributeId","labelPlural","labelSingular","missing","position","primaryKey","slug","sourceSchema","sourceTable","takesColumns","writeAccess"],"additionalProperties":false},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["id","values"],"additionalProperties":false}},"total":{"type":"object","properties":{"count":{"type":"number"},"kind":{"type":"string","enum":["exact","estimate","at_least"]}},"required":["count","kind"],"additionalProperties":false}},"required":["attribute","attributes","object","rows","total"],"additionalProperties":false}}},"required":["related"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/records/search":{"post":{"operationId":"records.search","summary":"Search records","description":"Finds records by label (the field naming them), best first: how to turn a name into a record id, e.g. for a reference. Without object, the first 8 objects not hidden, missing or keyless, limit each; results name their object, skipped those that failed. Other fields: records_list.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"limit":{"default":10,"type":"integer","minimum":1,"maximum":50},"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"query":{"default":"","type":"string","maxLength":200}}}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"object":{"type":"string"}},"required":["id","label","object"],"additionalProperties":false}},"skipped":{"type":"array","items":{"type":"string"}}},"required":["results"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/records/update":{"post":{"operationId":"records.update","summary":"Update a record","description":"Changes the values given on one record and keeps the rest. Never write back a value a list or a write result shortened (named in truncated): read it whole with records_get first. activity_undo with its activityIds puts the values back.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"provenance":{"description":"Evidence for values written, keyed like values: sources, model, reasoning","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"additionalProperties":{"type":"object","properties":{"evidence":{"type":"string","maxLength":4000},"model":{"type":"string","maxLength":200},"reasoning":{"type":"string","maxLength":4000},"sources":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["url"]}}}}},"recordId":{"type":"string","minLength":1,"maxLength":1000,"description":"Record id: its key's value (a JSON array for a composite key)"},"values":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"},"description":"By field slug: { \"name\": \"Acme\", \"employees\": 40 }; a select takes an option value, a reference the record's id, null clears one"}},"required":["object","recordId","values"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"record":{"type":"object","properties":{"id":{"type":"string"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["id","values"],"additionalProperties":false}},"required":["activityIds","record"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"write"}}},"/records/updateMany":{"post":{"operationId":"records.updateMany","summary":"Update records","description":"Applies 1–500 record updates of one object in one call, all or none (bulk edits, fixes across records): each changes the values it gives and keeps the rest. As with records_update, never write back a shortened value; activity_undo with its activityIds undoes them all.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"updates":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"provenance":{"description":"Evidence for values written, keyed like values: sources, model, reasoning","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"additionalProperties":{"type":"object","properties":{"evidence":{"type":"string","maxLength":4000},"model":{"type":"string","maxLength":200},"reasoning":{"type":"string","maxLength":4000},"sources":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":500},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["url"]}}}}},"recordId":{"type":"string","minLength":1,"maxLength":1000,"description":"Record id: its key's value (a JSON array for a composite key)"},"values":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"},"description":"By field slug: { \"name\": \"Acme\", \"employees\": 40 }; a select takes an option value, a reference the record's id, null clears one"}},"required":["recordId","values"]}}},"required":["object","updates"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}},"required":["id","values"],"additionalProperties":false}}},"required":["activityIds","records"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"write"}}},"/schema/change":{"post":{"operationId":"schema.change","summary":"Change a data source's schema","description":"Adds columns to an object's table, or creates a table, in its data source (whose access must allow schema changes), then reads the source again: each column becomes a field of its type, a new table an object with its default view. Nothing undoes it: show the user schema_preview's SQL first. A PRECONDITION_FAILED saying its SQL ran means it stands: don't repeat it; a sync adds its fields.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"columns":{"default":[],"description":"Nullable columns: at least one for an object; a new table has id and created_at too","maxItems":50,"type":"array","items":{"type":"object","properties":{"config":{"default":{},"description":"A select needs options (its CHECK list); a record_reference reference","type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"max":{"type":"integer","minimum":1,"maximum":10},"options":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"color":{"default":"gray","type":"string","enum":["gray","red","orange","amber","green","teal","blue","indigo","purple","pink"]},"label":{"type":"string","minLength":1,"maxLength":80},"value":{"type":"string","minLength":1,"maxLength":200}},"required":["label","value"]}},"reference":{"type":"object","properties":{"targetObject":{"type":"string","minLength":1,"maxLength":100,"description":"The object the reference points at"}},"required":["targetObject"]}}},"label":{"description":"Field name (default: from name)","type":"string","minLength":1,"maxLength":80},"name":{"type":"string","maxLength":63,"pattern":"^[a-z_][a-z0-9_]*$","description":"Column name"},"type":{"type":"string","enum":["text","long_text","number","currency","rating","checkbox","date","timestamp","select","multi_select","email","phone","url","record_reference","json"],"description":"Field type (not json)"}},"required":["name","type"]}},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"object"},"object":{"type":"string","minLength":1,"maxLength":100,"description":"The object whose table gets the columns"}},"required":["kind","object"]},{"type":"object","properties":{"dataSource":{"type":"string","minLength":1,"maxLength":100,"description":"Data source id or name"},"kind":{"type":"string","const":"newTable"},"label":{"description":"Object name (default: from table)","type":"string","minLength":1,"maxLength":80},"schema":{"default":"public","description":"One of the data source's schemas","type":"string","minLength":1,"maxLength":63},"table":{"type":"string","maxLength":63,"pattern":"^[a-z_][a-z0-9_]*$","description":"Table name"}},"required":["dataSource","kind","table"]}]}},"required":["target"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"attributes":{"type":"array","items":{"type":"object","properties":{"filterVariant":{"anyOf":[{"type":"string","enum":["text","number","date","boolean","select","multiSelect","none"]},{"type":"null"}]},"sortable":{"type":"boolean"},"writable":{"type":"object","properties":{"create":{"type":"boolean"},"update":{"type":"boolean"}},"required":["create","update"],"additionalProperties":false},"columnName":{"type":"string"},"config":{"type":"object","properties":{"ai":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"What AI writes into the field for each record"}},"required":["prompt"],"additionalProperties":false},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"max":{"type":"integer","minimum":1,"maximum":10},"options":{"type":"array","items":{"type":"object","properties":{"color":{"type":"string","enum":["gray","red","orange","amber","green","teal","blue","indigo","purple","pink"]},"label":{"type":"string"},"value":{"type":"string"}},"required":["color","label","value"],"additionalProperties":false}},"reference":{"type":"object","properties":{"columns":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}},"targetColumns":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string"}},"targetObjectId":{"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)$"}},"required":["columns","targetColumns","targetObjectId"],"additionalProperties":false}},"additionalProperties":false},"description":{"type":["string","null"]},"drift":{"type":"string","enum":["ok","missing"]},"hasDefault":{"type":"boolean"},"id":{"type":"string"},"isArray":{"type":"boolean"},"isHidden":{"type":"boolean"},"isNullable":{"type":"boolean"},"isPrimaryKey":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"label":{"type":"string"},"objectId":{"type":"string"},"position":{"type":"number"},"slug":{"type":"string"},"sourceType":{"type":"string"},"type":{"type":"string"}},"required":["filterVariant","sortable","writable","columnName","config","description","drift","hasDefault","id","isArray","isHidden","isNullable","isPrimaryKey","isReadOnly","label","objectId","position","slug","sourceType","type"],"additionalProperties":false}},"object":{"type":"object","properties":{"approxRows":{"type":["number","null"]},"dataSourceId":{"type":"string"},"description":{"type":["string","null"]},"icon":{"type":"string"},"id":{"type":"string"},"isHidden":{"type":"boolean"},"labelAttributeId":{"type":["string","null"]},"labelPlural":{"type":"string"},"labelSingular":{"type":"string"},"missing":{"type":"boolean"},"position":{"type":"number"},"primaryKey":{"anyOf":[{"type":"array","prefixItems":[{"type":"string"}],"items":{"type":"string"},"minItems":1},{"type":"null"}]},"slug":{"type":"string"},"sourceSchema":{"type":"string"},"sourceTable":{"type":"string"},"takesColumns":{"type":"boolean"},"writeAccess":{"type":"object","properties":{"delete":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["table_missing","relation_read_only","source_read_only","not_permitted","no_key"]},"allowed":{"type":"boolean","const":false}},"required":["message","reason","allowed"],"additionalProperties":false}]},"insert":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["table_missing","relation_read_only","source_read_only","not_permitted","no_key"]},"allowed":{"type":"boolean","const":false}},"required":["message","reason","allowed"],"additionalProperties":false}]},"update":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["table_missing","relation_read_only","source_read_only","not_permitted","no_key"]},"allowed":{"type":"boolean","const":false}},"required":["message","reason","allowed"],"additionalProperties":false}]}},"required":["delete","insert","update"],"additionalProperties":false}},"required":["approxRows","dataSourceId","description","icon","id","isHidden","labelAttributeId","labelPlural","labelSingular","missing","position","primaryKey","slug","sourceSchema","sourceTable","takesColumns","writeAccess"],"additionalProperties":false}},"required":["attributes","object"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":true,"ownerOnly":false,"scope":"admin"}}},"/schema/preview":{"post":{"operationId":"schema.preview","summary":"Preview a schema change","description":"The SQL schema_change would run for the same input, without running it; refusal says why it would be refused now (the data source doesn't allow schema changes), else null.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"columns":{"default":[],"description":"Nullable columns: at least one for an object; a new table has id and created_at too","maxItems":50,"type":"array","items":{"type":"object","properties":{"config":{"default":{},"description":"A select needs options (its CHECK list); a record_reference reference","type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"max":{"type":"integer","minimum":1,"maximum":10},"options":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"color":{"default":"gray","type":"string","enum":["gray","red","orange","amber","green","teal","blue","indigo","purple","pink"]},"label":{"type":"string","minLength":1,"maxLength":80},"value":{"type":"string","minLength":1,"maxLength":200}},"required":["label","value"]}},"reference":{"type":"object","properties":{"targetObject":{"type":"string","minLength":1,"maxLength":100,"description":"The object the reference points at"}},"required":["targetObject"]}}},"label":{"description":"Field name (default: from name)","type":"string","minLength":1,"maxLength":80},"name":{"type":"string","maxLength":63,"pattern":"^[a-z_][a-z0-9_]*$","description":"Column name"},"type":{"type":"string","enum":["text","long_text","number","currency","rating","checkbox","date","timestamp","select","multi_select","email","phone","url","record_reference","json"],"description":"Field type (not json)"}},"required":["name","type"]}},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"object"},"object":{"type":"string","minLength":1,"maxLength":100,"description":"The object whose table gets the columns"}},"required":["kind","object"]},{"type":"object","properties":{"dataSource":{"type":"string","minLength":1,"maxLength":100,"description":"Data source id or name"},"kind":{"type":"string","const":"newTable"},"label":{"description":"Object name (default: from table)","type":"string","minLength":1,"maxLength":80},"schema":{"default":"public","description":"One of the data source's schemas","type":"string","minLength":1,"maxLength":63},"table":{"type":"string","maxLength":63,"pattern":"^[a-z_][a-z0-9_]*$","description":"Table name"}},"required":["dataSource","kind","table"]}]}},"required":["target"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"refusal":{"type":["string","null"]},"statements":{"type":"array","items":{"type":"string"}}},"required":["refusal","statements"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/sql/query":{"post":{"operationId":"sql.query","summary":"Run a read-only SQL query","description":"Runs one statement that reads (SELECT, WITH, VALUES, TABLE, EXPLAIN, SHOW) against a data source, read-only, for at most 30 s: each object is a table of it. Answers each column's name and Postgres type and at most limit rows, values as Postgres writes them (timestamps in UTC); truncated: more rows matched, or values were cut. A refused query is SQL_ERROR: its message names the SQLSTATE, line and column.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"dataSource":{"type":"string","minLength":1,"maxLength":100,"description":"Data source id or name"},"limit":{"default":200,"description":"Rows to return at most (at most 1000)","type":"integer","minimum":1,"maximum":1000},"sql":{"type":"string","minLength":1,"maxLength":100000,"description":"One statement that reads: SELECT, WITH, VALUES, TABLE, EXPLAIN or SHOW"}},"required":["dataSource","sql"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}},"durationMs":{"type":"number"},"rows":{"type":"array","items":{"type":"array","items":{"type":["string","null"]}}},"truncated":{"type":"boolean"}},"required":["columns","durationMs","rows","truncated"],"additionalProperties":false}}}},"400":{"description":"The database refused the query","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/SqlError"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/views/create":{"post":{"operationId":"views.create","summary":"Create a view","description":"Saves a view of an object's records for everyone: its type (table, the default, or a plugin's such as kanban/board, a board grouped by a select field: options { groupBy: \"stage\" }), columns, filter, sorts and row height, naming fields by slug. One call makes a board of Deals by stage. workspace_describe lists the view types and their options. records_list takes its id as viewId.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"config":{"description":"Columns, filter, sorts and row height, fields by slug; missing parts start empty","type":"object","properties":{"columns":{"default":[],"maxItems":500,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"hidden":{"default":false,"type":"boolean"},"pinned":{"type":"string","enum":["left","right"]},"width":{"type":"integer","minimum":40,"maximum":1200}},"required":["attributeId"]}},"filter":{"type":"object","properties":{"conditions":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"operator":{"type":"string","enum":["iLike","notILike","startsWith","endsWith","eq","ne","inArray","notInArray","lt","lte","gt","gte","isBetween","isRelativeToToday","isEmpty","isNotEmpty"]},"value":{"description":"A list for inArray/notInArray, [from, to] for isBetween (both included), none for isEmpty/isNotEmpty. Dates YYYY-MM-DD; isRelativeToToday takes \"<n> days|weeks|months\"","anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]},{"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}},"required":["attributeId","operator"]}},"join":{"default":"and","type":"string","enum":["and","or"]}},"required":["conditions"]},"rowHeight":{"default":"short","type":"string","enum":["short","medium","tall","extra-tall"]},"sorts":{"default":[],"maxItems":5,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"direction":{"default":"asc","type":"string","enum":["asc","desc"]}},"required":["attributeId"]}}}},"name":{"type":"string","minLength":1,"maxLength":80},"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"options":{"description":"The view type's own options (workspace_describe lists each type's), e.g. a board's { groupBy: \"stage\" }","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"type":{"default":"table","description":"table, or a plugin's view type such as kanban/board (workspace_describe lists them)","anyOf":[{"type":"string","maxLength":60,"pattern":"^[a-z][a-z0-9_-]*$"},{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$"}]}},"required":["name","object"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"view":{"type":"object","properties":{"config":{"type":"object","properties":{"columns":{"default":[],"maxItems":500,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field id"},"hidden":{"default":false,"type":"boolean"},"pinned":{"type":"string","enum":["left","right"]},"width":{"type":"integer","minimum":40,"maximum":1200}},"required":["attributeId","hidden"],"additionalProperties":false}},"filter":{"default":{"conditions":[],"join":"and"},"type":"object","properties":{"conditions":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field id"},"operator":{"type":"string","enum":["iLike","notILike","startsWith","endsWith","eq","ne","inArray","notInArray","lt","lte","gt","gte","isBetween","isRelativeToToday","isEmpty","isNotEmpty"]},"value":{"default":"","description":"A list for inArray/notInArray, [from, to] for isBetween (both included), none for isEmpty/isNotEmpty. Dates YYYY-MM-DD; isRelativeToToday takes \"<n> days|weeks|months\"","anyOf":[{},{"maxItems":100,"type":"array","items":{}}]}},"required":["attributeId","operator","value"],"additionalProperties":false}},"join":{"default":"and","type":"string","enum":["and","or"]}},"required":["conditions","join"],"additionalProperties":false},"rowHeight":{"default":"short","type":"string","enum":["short","medium","tall","extra-tall"]},"sorts":{"default":[],"maxItems":5,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field id"},"direction":{"default":"asc","type":"string","enum":["asc","desc"]}},"required":["attributeId","direction"],"additionalProperties":false}},"options":{"default":{},"type":"object","propertyNames":{"anyOf":[{"type":"string","maxLength":60,"pattern":"^[a-z][a-z0-9_-]*$"},{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$"}],"description":"table, or a plugin's view type such as kanban/board"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}}},"required":["columns","filter","rowHeight","sorts","options"],"additionalProperties":false},"id":{"type":"string"},"mine":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"objectId":{"type":"string"},"position":{"type":"number"},"type":{"type":"string"},"typeState":{"type":"string","enum":["available","plugin_off","unknown"]}},"required":["config","id","mine","name","objectId","position","type","typeState"],"additionalProperties":false}},"required":["activityIds","view"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"admin"}}},"/views/delete":{"post":{"operationId":"views.delete","summary":"Delete a view","description":"Deletes a saved view of an object for everyone, named by its name (objects_get lists them). An object's last view can't be deleted.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"view":{"type":"string","minLength":1,"maxLength":100,"description":"The view's name (or its id, when two of the object's views share a name)"}},"required":["object","view"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"deleted":{"type":"boolean"}},"required":["activityIds","deleted"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"admin"}}},"/views/reorder":{"post":{"operationId":"views.reorder","summary":"Reorder views","description":"Sets the order of an object's views (the tabs above its records) for everyone, naming every view once.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"views":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":100,"description":"The view's name (or its id, when two of the object's views share a name)"},"description":"Every view of the object, each once, in the new order (objects_get lists them)"}},"required":["object","views"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"ok":{"type":"boolean"}},"required":["activityIds","ok"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"admin"}}},"/views/saveForEveryone":{"post":{"operationId":"views.saveForEveryone","summary":"Save a view for everyone","description":"Changes a view for everyone, only when asked to: promote makes the person's own changes everyone's (true: all, or the parts named), then reset puts parts of everyone's view back to the defaults, then config, options and type change it as views_update would, and name renames it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"view":{"type":"string","minLength":1,"maxLength":100,"description":"The view's name (or its id, when two of the object's views share a name)"},"config":{"description":"Only the shared parts to change; the rest is kept","type":"object","properties":{"columns":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"hidden":{"default":false,"type":"boolean"},"pinned":{"type":"string","enum":["left","right"]},"width":{"type":"integer","minimum":40,"maximum":1200}},"required":["attributeId"]}},"filter":{"type":"object","properties":{"conditions":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"operator":{"type":"string","enum":["iLike","notILike","startsWith","endsWith","eq","ne","inArray","notInArray","lt","lte","gt","gte","isBetween","isRelativeToToday","isEmpty","isNotEmpty"]},"value":{"description":"A list for inArray/notInArray, [from, to] for isBetween (both included), none for isEmpty/isNotEmpty. Dates YYYY-MM-DD; isRelativeToToday takes \"<n> days|weeks|months\"","anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]},{"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}},"required":["attributeId","operator"]}},"join":{"type":"string","enum":["and","or"]}}},"rowHeight":{"type":"string","enum":["short","medium","tall","extra-tall"]},"sorts":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"direction":{"default":"asc","type":"string","enum":["asc","desc"]}},"required":["attributeId"]}}}},"options":{"description":"Merged into the options of the view's type (the new type when `type` is given)","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"type":{"description":"Switches the view's type; each type keeps its options, so switching back restores them","anyOf":[{"type":"string","maxLength":60,"pattern":"^[a-z][a-z0-9_-]*$"},{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$"}]},"name":{"description":"A new name for the view","type":"string","minLength":1,"maxLength":80},"promote":{"description":"Your own changes to the view that become everyone's, by part (true: all of them); applied first","anyOf":[{"type":"boolean","const":true},{"minItems":1,"maxItems":600,"type":"array","items":{"type":"string","maxLength":200,"pattern":"^[a-z][A-Za-z]*(?::\\S+)?$","description":"type, columnOrder, column:<field>, filter, sorts, rowHeight or options:<viewType>"}}]},"reset":{"description":"Parts of everyone's view to put back to the defaults (true: all of them); applied before config, options and type","anyOf":[{"type":"boolean","const":true},{"minItems":1,"maxItems":600,"type":"array","items":{"type":"string","maxLength":200,"pattern":"^[a-z][A-Za-z]*(?::\\S+)?$","description":"type, columnOrder, column:<field>, filter, sorts, rowHeight or options:<viewType>"}}]}},"required":["object","view"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"view":{"type":"object","properties":{"config":{"type":"object","properties":{"columns":{"default":[],"maxItems":500,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field id"},"hidden":{"default":false,"type":"boolean"},"pinned":{"type":"string","enum":["left","right"]},"width":{"type":"integer","minimum":40,"maximum":1200}},"required":["attributeId","hidden"],"additionalProperties":false}},"filter":{"default":{"conditions":[],"join":"and"},"type":"object","properties":{"conditions":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field id"},"operator":{"type":"string","enum":["iLike","notILike","startsWith","endsWith","eq","ne","inArray","notInArray","lt","lte","gt","gte","isBetween","isRelativeToToday","isEmpty","isNotEmpty"]},"value":{"default":"","description":"A list for inArray/notInArray, [from, to] for isBetween (both included), none for isEmpty/isNotEmpty. Dates YYYY-MM-DD; isRelativeToToday takes \"<n> days|weeks|months\"","anyOf":[{},{"maxItems":100,"type":"array","items":{}}]}},"required":["attributeId","operator","value"],"additionalProperties":false}},"join":{"default":"and","type":"string","enum":["and","or"]}},"required":["conditions","join"],"additionalProperties":false},"rowHeight":{"default":"short","type":"string","enum":["short","medium","tall","extra-tall"]},"sorts":{"default":[],"maxItems":5,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field id"},"direction":{"default":"asc","type":"string","enum":["asc","desc"]}},"required":["attributeId","direction"],"additionalProperties":false}},"options":{"default":{},"type":"object","propertyNames":{"anyOf":[{"type":"string","maxLength":60,"pattern":"^[a-z][a-z0-9_-]*$"},{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$"}],"description":"table, or a plugin's view type such as kanban/board"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}}},"required":["columns","filter","rowHeight","sorts","options"],"additionalProperties":false},"id":{"type":"string"},"mine":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"objectId":{"type":"string"},"position":{"type":"number"},"type":{"type":"string"},"typeState":{"type":"string","enum":["available","plugin_off","unknown"]}},"required":["config","id","mine","name","objectId","position","type","typeState"],"additionalProperties":false}},"required":["activityIds","view"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"admin"}}},"/views/update":{"post":{"operationId":"views.update","summary":"Update a view","description":"Changes a view for the person you act for only, the default for a change they ask for: parts of its config (each given part replaces theirs), its type (each keeps its options, so switching back restores them) or its type's options (merged); reset puts parts back to everyone's. objects_get shows which parts are the person's own (mine).","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"object":{"type":"string","minLength":1,"maxLength":100,"description":"Object slug or id"},"view":{"type":"string","minLength":1,"maxLength":100,"description":"The view's name (or its id, when two of the object's views share a name)"},"config":{"description":"Only the shared parts to change; the rest is kept","type":"object","properties":{"columns":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"hidden":{"default":false,"type":"boolean"},"pinned":{"type":"string","enum":["left","right"]},"width":{"type":"integer","minimum":40,"maximum":1200}},"required":["attributeId"]}},"filter":{"type":"object","properties":{"conditions":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"operator":{"type":"string","enum":["iLike","notILike","startsWith","endsWith","eq","ne","inArray","notInArray","lt","lte","gt","gte","isBetween","isRelativeToToday","isEmpty","isNotEmpty"]},"value":{"description":"A list for inArray/notInArray, [from, to] for isBetween (both included), none for isEmpty/isNotEmpty. Dates YYYY-MM-DD; isRelativeToToday takes \"<n> days|weeks|months\"","anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]},{"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}]}},"required":["attributeId","operator"]}},"join":{"type":"string","enum":["and","or"]}}},"rowHeight":{"type":"string","enum":["short","medium","tall","extra-tall"]},"sorts":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field slug or id"},"direction":{"default":"asc","type":"string","enum":["asc","desc"]}},"required":["attributeId"]}}}},"options":{"description":"Merged into the options of the view's type (the new type when `type` is given)","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"type":{"description":"Switches the view's type; each type keeps its options, so switching back restores them","anyOf":[{"type":"string","maxLength":60,"pattern":"^[a-z][a-z0-9_-]*$"},{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$"}]},"reset":{"description":"Your changes to put back to everyone's, by part (true: all of them); applied before the rest","anyOf":[{"type":"boolean","const":true},{"minItems":1,"maxItems":600,"type":"array","items":{"type":"string","maxLength":200,"pattern":"^[a-z][A-Za-z]*(?::\\S+)?$","description":"type, columnOrder, column:<field>, filter, sorts, rowHeight or options:<viewType>"}}]}},"required":["object","view"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"activityIds":{"type":"array","items":{"type":"string"}},"view":{"type":"object","properties":{"config":{"type":"object","properties":{"columns":{"default":[],"maxItems":500,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field id"},"hidden":{"default":false,"type":"boolean"},"pinned":{"type":"string","enum":["left","right"]},"width":{"type":"integer","minimum":40,"maximum":1200}},"required":["attributeId","hidden"],"additionalProperties":false}},"filter":{"default":{"conditions":[],"join":"and"},"type":"object","properties":{"conditions":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field id"},"operator":{"type":"string","enum":["iLike","notILike","startsWith","endsWith","eq","ne","inArray","notInArray","lt","lte","gt","gte","isBetween","isRelativeToToday","isEmpty","isNotEmpty"]},"value":{"default":"","description":"A list for inArray/notInArray, [from, to] for isBetween (both included), none for isEmpty/isNotEmpty. Dates YYYY-MM-DD; isRelativeToToday takes \"<n> days|weeks|months\"","anyOf":[{},{"maxItems":100,"type":"array","items":{}}]}},"required":["attributeId","operator","value"],"additionalProperties":false}},"join":{"default":"and","type":"string","enum":["and","or"]}},"required":["conditions","join"],"additionalProperties":false},"rowHeight":{"default":"short","type":"string","enum":["short","medium","tall","extra-tall"]},"sorts":{"default":[],"maxItems":5,"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1,"maxLength":200,"description":"Field id"},"direction":{"default":"asc","type":"string","enum":["asc","desc"]}},"required":["attributeId","direction"],"additionalProperties":false}},"options":{"default":{},"type":"object","propertyNames":{"anyOf":[{"type":"string","maxLength":60,"pattern":"^[a-z][a-z0-9_-]*$"},{"type":"string","maxLength":121,"pattern":"^[a-z][a-z0-9-]*\\/[a-z][a-z0-9_-]*$"}],"description":"table, or a plugin's view type such as kanban/board"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}}},"required":["columns","filter","rowHeight","sorts","options"],"additionalProperties":false},"id":{"type":"string"},"mine":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"objectId":{"type":"string"},"position":{"type":"number"},"type":{"type":"string"},"typeState":{"type":"string","enum":["available","plugin_off","unknown"]}},"required":["config","id","mine","name","objectId","position","type","typeState"],"additionalProperties":false}},"required":["activityIds","view"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"write"}}},"/waitlist/approve":{"post":{"operationId":"waitlist.approve","summary":"Let someone in","description":"Lets an address in: whoever signs up with it gets an account. It needn't be on the waitlist yet. The answer's outcome is approved (this call let it in; emailDelivery says whether the sign-up email went) or already_approved (it was let in before; nothing is sent again).","requestBody":{"required":true,"content":{"application/json":{"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,}$","description":"An email address (compared case-insensitively)"}},"required":["email"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"entry":{"type":"object","properties":{"createdAt":{"type":"string"},"email":{"type":"string"},"signedUp":{"type":"boolean"},"approvedAt":{"type":"string"},"status":{"type":"string","const":"approved"}},"required":["createdAt","email","signedUp","approvedAt","status"],"additionalProperties":false},"outcome":{"oneOf":[{"type":"object","properties":{"emailDelivery":{"type":"string","enum":["sent","logged","off","failed"],"description":"What became of the email: sent (the provider accepted it), logged (a development server wrote it to its log), off (this deployment sends no email), failed (the provider refused it or couldn't be reached). The change it announced stands either way."},"kind":{"type":"string","const":"approved"}},"required":["emailDelivery","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"already_approved"}},"required":["kind"],"additionalProperties":false}]}},"required":["entry","outcome"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not an operator, or an operator whose address isn't verified yet","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"people","irreversible":true},"security":[{"sessionCookie":[]}]}},"/waitlist/join":{"post":{"operationId":"waitlist.join","summary":"Join the waitlist","description":"Puts an address on the waitlist; no credential needed. The answer is the same whether or not it was there already, or was let in.","requestBody":{"required":true,"content":{"application/json":{"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,}$","description":"An email address (compared case-insensitively)"}},"required":["email"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"joined":{"type":"boolean","const":true}},"required":["joined"],"additionalProperties":false}}}},"401":{"description":"A credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many calls from this address; wait, then try again","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"anyone","irreversible":false},"security":[]}},"/waitlist/list":{"post":{"operationId":"waitlist.list","summary":"List the waitlist","description":"Every address on the waitlist: those waiting, then those let in, each saying whether someone has signed up with it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"createdAt":{"type":"string"},"email":{"type":"string"},"signedUp":{"type":"boolean"},"status":{"type":"string","const":"pending"}},"required":["createdAt","email","signedUp","status"],"additionalProperties":false},{"type":"object","properties":{"createdAt":{"type":"string"},"email":{"type":"string"},"signedUp":{"type":"boolean"},"approvedAt":{"type":"string"},"status":{"type":"string","const":"approved"}},"required":["createdAt","email","signedUp","approvedAt","status"],"additionalProperties":false}]}}},"required":["entries"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not an operator, or an operator whose address isn't verified yet","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"people","irreversible":false},"security":[{"sessionCookie":[]}]}},"/workspace/acceptInvitation":{"post":{"operationId":"workspace.acceptInvitation","summary":"Accept an invitation","description":"Joins the workspace an invitation sent to the signed-in person's address is for, with the role it grants. The answer names the workspace, whose pages are at /<slug>.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200}},"required":["id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"slug":{"type":"string"}},"required":["id","name","role","slug"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"people","irreversible":true},"security":[{"sessionCookie":[]}]}},"/workspace/create":{"post":{"operationId":"workspace.create","summary":"Create a workspace","description":"Creates an empty workspace the signed-in person owns, with no data source yet. The answer names it, with its slug: its pages are at /<slug>.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"The workspace's name: one line of at most 60 characters with something visible in it (whitespace runs become one space)","type":"string","maxLength":200}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"slug":{"type":"string"}},"required":["id","name","role","slug"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"people","irreversible":true},"security":[{"sessionCookie":[]}]}},"/workspace/declineInvitation":{"post":{"operationId":"workspace.declineInvitation","summary":"Decline an invitation","description":"Turns down an invitation sent to the signed-in person's address: its link stops working.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200}},"required":["id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"declined":{"type":"boolean","const":true}},"required":["declined"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"people","irreversible":true},"security":[{"sessionCookie":[]}]}},"/workspace/delete":{"post":{"operationId":"workspace.delete","summary":"Delete the workspace","description":"Deletes the workspace for everyone, with its members, invitations, API keys, objects, views and settings, and drops its sample database; connected databases aren't touched. confirmName must be its name as workspace_get shows it, or nothing happens. The calling credential stops working with it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"confirmName":{"type":"string","minLength":1,"maxLength":200,"description":"The workspace's name exactly as workspace_get shows it, to confirm the deletion (nothing is deleted when it doesn't match)"}},"required":["confirmName"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":true,"ownerOnly":true,"scope":"admin"}}},"/workspace/describe":{"post":{"operationId":"workspace.describe","summary":"Describe the workspace","description":"Call this first. Every object with its fields (slug, type, filter, select options, the object a reference points at; hidden ones and ones whose column went missing flagged), whether it's keyless, its saved views and data source, and which record writes it takes (canCreate, canUpdate, canDelete; writeRefusal says why not: no_key → objects_set_key; source_read_only, not_permitted → an admin or the database's grants; table_missing, relation_read_only → none); the data sources; the plugin actions you can run; each filter's operators and what relative dates match; the view types views_create takes. Name objects and fields by these slugs. Long descriptions, AI prompts and option lists are shortened (named in truncated): pass object for one object in full. Not its name, members or activity (workspace_get, workspace_members, activity_list).","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"object":{"description":"Describe only this object, with every one of its fields","type":"string","minLength":1,"maxLength":100}}}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"actions":{"type":"array","items":{"type":"object","properties":{"actionId":{"type":"string"},"description":{"type":"string"},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"objects":{"type":"array","items":{"type":"string"}},"pluginId":{"type":"string"},"target":{"type":"string","enum":["workspace","object","records","attribute"]},"title":{"type":"string"}},"required":["actionId","description","input","pluginId","target","title"],"additionalProperties":false}},"dataSources":{"type":"array","items":{"type":"object","properties":{"accessMode":{"type":"string","enum":["read_only","read_write","schema_write"]},"health":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"ok"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"since":{"type":"string"},"state":{"type":"string","const":"syncing"}},"required":["since","state"],"additionalProperties":false},{"type":"object","properties":{"at":{"type":"string"},"message":{"type":"string"},"state":{"type":"string","const":"sync_failed"}},"required":["at","message","state"],"additionalProperties":false},{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string","enum":["auth","tls","unreachable","timeout","blocked_host","database_not_found","permission","unknown"]},"message":{"type":"string"},"state":{"type":"string","const":"connection_failed"}},"required":["at","kind","message","state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"credentials_unreadable"}},"required":["state"],"additionalProperties":false}]},"name":{"type":"string"},"objects":{"type":"array","items":{"type":"string"}},"sample":{"type":"boolean","const":true}},"required":["accessMode","health","name","objects"],"additionalProperties":false}},"dateFilters":{"type":"string"},"filterOperators":{"type":"object","propertyNames":{"type":"string","enum":["text","number","date","boolean","select","multiSelect","none","reference"]},"additionalProperties":{"readOnly":true,"type":"array","items":{"type":"string","enum":["iLike","notILike","startsWith","endsWith","eq","ne","inArray","notInArray","lt","lte","gt","gte","isBetween","isRelativeToToday","isEmpty","isNotEmpty"]}},"required":["text","number","date","boolean","select","multiSelect","none","reference"]},"moreObjects":{"type":"string"},"objects":{"type":"array","items":{"type":"object","properties":{"approxRecords":{"type":"number"},"attributes":{"type":"array","items":{"type":"object","properties":{"aiPrompt":{"type":"string"},"column":{"type":"string"},"createOnly":{"type":"boolean","const":true},"currency":{"type":"string"},"description":{"type":"string"},"filter":{"type":"string","enum":["text","number","date","boolean","select","multiSelect","none","reference"]},"hidden":{"type":"boolean","const":true},"label":{"type":"string"},"missing":{"type":"boolean","const":true},"multiple":{"type":"boolean","const":true},"options":{"type":"array","items":{"type":"string"}},"readOnly":{"type":"boolean","const":true},"references":{"type":"string"},"required":{"type":"boolean","const":true},"slug":{"type":"string"},"sortable":{"type":"boolean","const":false},"truncated":{"type":"array","items":{"type":"string","enum":["aiPrompt","description","options"]}},"type":{"type":"string"}},"required":["column","label","slug","type"],"additionalProperties":false}},"canCreate":{"type":"boolean"},"canDelete":{"type":"boolean"},"canUpdate":{"type":"boolean"},"dataSource":{"type":"string"},"description":{"type":"string"},"hidden":{"type":"boolean","const":true},"keyless":{"type":"boolean","const":true},"labelAttribute":{"type":["string","null"]},"missing":{"type":"boolean","const":true},"moreAttributes":{"type":"string"},"name":{"type":"string"},"singular":{"type":"string"},"slug":{"type":"string"},"table":{"type":"string"},"views":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"typeState":{"type":"string","enum":["plugin_off","unknown"]}},"required":["id","name","type"],"additionalProperties":false}},"writeRefusal":{"type":"string","enum":["table_missing","relation_read_only","source_read_only","not_permitted","no_key"]}},"required":["attributes","canCreate","canDelete","canUpdate","dataSource","labelAttribute","name","singular","slug","table","views"],"additionalProperties":false}},"viewTypes":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"options":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},"title":{"type":"string"},"type":{"type":"string"}},"required":["description","options","title","type"],"additionalProperties":false}}},"required":["dataSources","dateFilters","filterOperators","objects","viewTypes"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/workspace/get":{"post":{"operationId":"workspace.get","summary":"Get the workspace","description":"Returns the workspace: its name, your role and how many objects and data sources it has (not the schema: workspace_describe; not its activity: activity_list).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dataSourceCount":{"type":"number"},"objectCount":{"type":"number"},"optionalPluginsOn":{"type":"number"},"ownDataSourceCount":{"type":"number"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"slug":{"type":"string"}},"required":["id","name","role","slug"],"additionalProperties":false}},"required":["dataSourceCount","objectCount","optionalPluginsOn","ownDataSourceCount","workspace"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/workspace/invitation":{"post":{"operationId":"workspace.invitation","summary":"Get an invitation","description":"What an invitation link shows the signed-in person opening it: the workspace, the inviter, the role and whether it was sent to them. Works whichever workspace they are in.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200}},"required":["id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"alreadyMember":{"type":"boolean"},"expiresAt":{"type":"string"},"forYou":{"type":"boolean"},"id":{"type":"string"},"invitedEmailHint":{"type":"string"},"inviterEmail":{"type":["string","null"]},"inviterName":{"type":"string"},"role":{"type":"string","enum":["admin","member"]},"status":{"type":"string","enum":["open","expired","accepted","declined","revoked"]},"workspaceName":{"type":"string"},"workspaceSlug":{"type":["string","null"]}},"required":["alreadyMember","expiresAt","forYou","id","invitedEmailHint","inviterEmail","inviterName","role","status","workspaceName","workspaceSlug"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"people","irreversible":false},"security":[{"sessionCookie":[]}]}},"/workspace/invitations":{"post":{"operationId":"workspace.invitations","summary":"List pending invitations","description":"Invitations to the workspace waiting for an answer: open, with its link (whoever opens it joins with its role), or expired, with none (workspace_invite gives that address a new one).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"invitations":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"createdAt":{"type":"string"},"email":{"type":"string"},"expiresAt":{"type":"string"},"id":{"type":"string"},"inviterName":{"type":"string"},"role":{"type":"string","enum":["admin","member"]},"url":{"type":"string"},"status":{"type":"string","const":"open"}},"required":["createdAt","email","expiresAt","id","inviterName","role","url","status"],"additionalProperties":false},{"type":"object","properties":{"createdAt":{"type":"string"},"email":{"type":"string"},"expiresAt":{"type":"string"},"id":{"type":"string"},"inviterName":{"type":"string"},"role":{"type":"string","enum":["admin","member"]},"status":{"type":"string","const":"expired"}},"required":["createdAt","email","expiresAt","id","inviterName","role","status"],"additionalProperties":false}]}}},"required":["invitations"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"admin"}}},"/workspace/invite":{"post":{"operationId":"workspace.invite","summary":"Invite someone","description":"Invites an address to the workspace as an admin or a member with a link valid 7 days, emailed if the deployment sends email. An open invitation to it is renewed with the role given (an expired one gets a new link); a member's address is refused. The answer has the link and emailDelivery: sent, logged (a dev server's log), off or failed; unless sent, give the link to whoever asked.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"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,}$","description":"The address to invite"},"role":{"type":"string","enum":["admin","member"],"description":"The role they join with: admin or member (never owner)"}},"required":["email","role"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"emailDelivery":{"type":"string","enum":["sent","logged","off","failed"],"description":"What became of the email: sent (the provider accepted it), logged (a development server wrote it to its log), off (this deployment sends no email), failed (the provider refused it or couldn't be reached). The change it announced stands either way."},"invitation":{"type":"object","properties":{"createdAt":{"type":"string"},"email":{"type":"string"},"expiresAt":{"type":"string"},"id":{"type":"string"},"inviterName":{"type":"string"},"role":{"type":"string","enum":["admin","member"]},"url":{"type":"string"}},"required":["createdAt","email","expiresAt","id","inviterName","role","url"],"additionalProperties":false}},"required":["emailDelivery","invitation"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":true,"ownerOnly":false,"scope":"admin"}}},"/workspace/leave":{"post":{"operationId":"workspace.leave","summary":"Leave the workspace","description":"Ends the membership of the person the call acts for, and revokes every API key they made and app they connected in the workspace, this call's credential included: it gets this answer, and its next call is refused. The workspace's only owner can't leave.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"left":{"type":"boolean","const":true}},"required":["left"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":true,"ownerOnly":false,"scope":"write"}}},"/workspace/list":{"post":{"operationId":"workspace.list","summary":"List my workspaces","description":"The workspaces the signed-in person belongs to, with their role in each.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"slug":{"type":"string"}},"required":["id","name","role","slug"],"additionalProperties":false}}},"required":["workspaces"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"people","irreversible":false},"security":[{"sessionCookie":[]}]}},"/workspace/members":{"post":{"operationId":"workspace.members","summary":"List members","description":"The workspace's members, with what the person the call acts for may do to each (changeRole with the roles they may give, remove) and to themselves (leave), or why not.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"leave":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"allowed":{"type":"boolean","const":false},"reason":{"type":"string"}},"required":["allowed","reason"],"additionalProperties":false}]},"members":{"type":"array","items":{"type":"object","properties":{"changeRole":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true},"roles":{"type":"array","items":{"type":"string","enum":["owner","admin","member"]}}},"required":["allowed","roles"],"additionalProperties":false},{"type":"object","properties":{"allowed":{"type":"boolean","const":false},"reason":{"type":"string"}},"required":["allowed","reason"],"additionalProperties":false}]},"email":{"type":"string"},"id":{"type":"string"},"isYou":{"type":"boolean"},"joinedAt":{"type":"string"},"name":{"type":"string"},"remove":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"allowed":{"type":"boolean","const":false},"reason":{"type":"string"}},"required":["allowed","reason"],"additionalProperties":false}]},"role":{"type":"string","enum":["owner","admin","member"]},"userId":{"type":"string"}},"required":["changeRole","email","id","isYou","joinedAt","name","remove","role","userId"],"additionalProperties":false}},"viewerRole":{"type":"string","enum":["owner","admin","member"]}},"required":["leave","members","viewerRole"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":false,"ownerOnly":false,"scope":"read"}}},"/workspace/removeMember":{"post":{"operationId":"workspace.removeMember","summary":"Remove a member","description":"Removes a member, by email: they lose access at once, the API keys they made and the apps they connected stop working, and their pending invitations to the workspace are revoked. workspace_members says whom you may remove; nobody removes themselves (workspace_leave).","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"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,}$","description":"An email address (compared case-insensitively)"}},"required":["email"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean","const":true}},"required":["removed"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":true,"ownerOnly":false,"scope":"admin"}}},"/workspace/rename":{"post":{"operationId":"workspace.rename","summary":"Rename the workspace","description":"Renames the workspace (one line of at most 60 characters).","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"type":"object","properties":{"name":{"description":"The workspace's name: one line of at most 60 characters with something visible in it (whitespace runs become one space)","type":"string","maxLength":200}},"required":["name"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"slug":{"type":"string"}},"required":["id","name","role","slug"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":true,"ownerOnly":false,"scope":"admin"}}},"/workspace/revokeInvitation":{"post":{"operationId":"workspace.revokeInvitation","summary":"Revoke an invitation","description":"Revokes an address's open or expired invitation: its link stops working. NOT_FOUND when there is none.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"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,}$","description":"An email address (compared case-insensitively)"}},"required":["email"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"type":"boolean","const":true}},"required":["revoked"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":true,"ownerOnly":false,"scope":"admin"}}},"/workspace/updateMemberRole":{"post":{"operationId":"workspace.updateMemberRole","summary":"Change a member's role","description":"Gives a member, by email, another role: one workspace_members lists in their changeRole.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"workspace":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*-[a-z0-9]{6}$","description":"The workspace the call acts in, by its slug (acme-k3x9q0): the first segment of its pages' URLs. An API key names its own."}},"required":["workspace"]},{"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,}$","description":"The member's address"},"role":{"type":"string","enum":["owner","admin","member"],"description":"Their new role"}},"required":["email","role"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"member":{"type":"object","properties":{"changeRole":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true},"roles":{"type":"array","items":{"type":"string","enum":["owner","admin","member"]}}},"required":["allowed","roles"],"additionalProperties":false},{"type":"object","properties":{"allowed":{"type":"boolean","const":false},"reason":{"type":"string"}},"required":["allowed","reason"],"additionalProperties":false}]},"email":{"type":"string"},"id":{"type":"string"},"isYou":{"type":"boolean"},"joinedAt":{"type":"string"},"name":{"type":"string"},"remove":{"oneOf":[{"type":"object","properties":{"allowed":{"type":"boolean","const":true}},"required":["allowed"],"additionalProperties":false},{"type":"object","properties":{"allowed":{"type":"boolean","const":false},"reason":{"type":"string"}},"required":["allowed","reason"],"additionalProperties":false}]},"role":{"type":"string","enum":["owner","admin","member"]},"userId":{"type":"string"}},"required":["changeRole","email","id","isYou","joinedAt","name","remove","role","userId"],"additionalProperties":false}},"required":["member"],"additionalProperties":false}}}},"401":{"description":"No signed-in session, or a credential that was refused","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"Not a member of the workspace, or not allowed to do this in it","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"Something the input names doesn't exist in the workspace","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"x-dataembed-access":{"callers":"agents","irreversible":true,"ownerOnly":false,"scope":"admin"}}}}}