{ "openapi": "3.1.0", "info": { "title": "Example App API", "version": "0.1.0" }, "servers": [ { "url": "/", "description": "This deployment." } ], "paths": { "/api/v1/account.analytics.export": { "post": { "operationId": "account.analytics.export", "tags": [ "account" ], "summary": "effect procedure on the user scope", "description": "Kind: effect. Scope: user. Permission: none.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ticket": { "type": "string", "minLength": 1, "maxLength": 512 } }, "required": [ "ticket" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "exportedAt": { "type": "string" }, "document": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "required": [ "exportedAt", "document" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/account.analytics.request": { "post": { "operationId": "account.analytics.request", "tags": [ "account" ], "summary": "effect procedure on the user scope", "description": "Kind: effect. Scope: user. Permission: none.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "kind": { "type": "string", "enum": [ "erase", "export" ] } }, "required": [ "kind" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ticket": { "type": "string" }, "kind": { "type": "string", "enum": [ "erase", "export" ] }, "status": { "type": "string", "enum": [ "pending", "running", "completed", "failed", "expired" ] }, "created": { "type": "boolean" }, "stores": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "completed", "not_keyed", "failed" ] }, "deleted": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "anonymized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "exported": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "status", "deleted", "anonymized", "exported" ], "additionalProperties": false } }, "requestedAt": { "type": "string" }, "finishedAt": { "type": [ "string", "null" ] }, "expiresAt": { "type": [ "string", "null" ] } }, "required": [ "ticket", "kind", "status", "created", "stores", "requestedAt", "finishedAt", "expiresAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/account.analytics.status": { "post": { "operationId": "account.analytics.status", "tags": [ "account" ], "summary": "effect procedure on the user scope", "description": "Kind: effect. Scope: user. Permission: none.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ticket": { "type": "string", "minLength": 1, "maxLength": 512 } }, "required": [ "ticket" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ticket": { "type": "string" }, "kind": { "type": "string", "enum": [ "erase", "export" ] }, "status": { "type": "string", "enum": [ "pending", "running", "completed", "failed", "expired" ] }, "created": { "type": "boolean" }, "stores": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "completed", "not_keyed", "failed" ] }, "deleted": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "anonymized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "exported": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "status", "deleted", "anonymized", "exported" ], "additionalProperties": false } }, "requestedAt": { "type": "string" }, "finishedAt": { "type": [ "string", "null" ] }, "expiresAt": { "type": [ "string", "null" ] } }, "required": [ "ticket", "kind", "status", "created", "stores", "requestedAt", "finishedAt", "expiresAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/account.data.export": { "post": { "operationId": "account.data.export", "tags": [ "account" ], "summary": "effect procedure on the user scope", "description": "Kind: effect. Scope: user. Permission: none.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "format": { "type": "string", "const": "conusai.account-export.v1" }, "exportedAt": { "type": "string" }, "subject": { "type": "string" }, "complete": { "type": "boolean" }, "failed": { "type": "array", "items": { "type": "string" } }, "sections": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "oneOf": [ { "type": "object", "properties": { "status": { "type": "string", "const": "ok" }, "data": { "anyOf": [ { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, { "type": "null" } ] } }, "required": [ "status", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "const": "failed" }, "code": { "type": "string" }, "retryable": { "type": "boolean" } }, "required": [ "status", "code", "retryable" ], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "const": "not_exported" } }, "required": [ "status" ], "additionalProperties": false } ] } } }, "required": [ "format", "exportedAt", "subject", "complete", "failed", "sections" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/account.deletion.request": { "post": { "operationId": "account.deletion.request", "tags": [ "account" ], "summary": "effect procedure on the user scope", "description": "Kind: effect. Scope: user. Permission: none.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "confirm": { "type": "string", "minLength": 1, "maxLength": 320 } }, "required": [ "confirm" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "state": { "type": "string", "enum": [ "erasing", "completed" ] }, "erased": { "type": "array", "items": { "type": "string" } }, "pending": { "type": "array", "items": { "type": "string" } }, "abandoned": { "type": "array", "items": { "type": "string" } }, "requestedAt": { "type": "string" }, "completedAt": { "type": [ "string", "null" ] } }, "required": [ "state", "erased", "pending", "abandoned", "requestedAt", "completedAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/account.deletion.status": { "post": { "operationId": "account.deletion.status", "tags": [ "account" ], "summary": "read procedure on the user scope", "description": "Kind: read. Scope: user. Permission: none.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "deletion": { "anyOf": [ { "type": "object", "properties": { "state": { "type": "string", "enum": [ "erasing", "completed" ] }, "erased": { "type": "array", "items": { "type": "string" } }, "pending": { "type": "array", "items": { "type": "string" } }, "abandoned": { "type": "array", "items": { "type": "string" } }, "requestedAt": { "type": "string" }, "completedAt": { "type": [ "string", "null" ] } }, "required": [ "state", "erased", "pending", "abandoned", "requestedAt", "completedAt" ], "additionalProperties": false }, { "type": "null" } ] }, "interactive": { "type": "boolean" }, "recentSignIn": { "type": "boolean" }, "signedInAt": { "type": [ "string", "null" ] }, "recentSignInSeconds": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "lastOwnerOf": { "type": "array", "items": { "type": "object", "properties": { "slug": { "type": "string" }, "name": { "type": "string" } }, "required": [ "slug", "name" ], "additionalProperties": false } }, "onlyMemberOf": { "type": "array", "items": { "type": "object", "properties": { "slug": { "type": "string" }, "name": { "type": "string" } }, "required": [ "slug", "name" ], "additionalProperties": false } }, "modules": { "type": "array", "items": { "type": "string" } } }, "required": [ "deletion", "interactive", "recentSignIn", "signedInAt", "recentSignInSeconds", "lastOwnerOf", "onlyMemberOf", "modules" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/agent.approval.list": { "post": { "operationId": "agent.approval.list", "tags": [ "agent" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: agent.approval.review.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" } }, "required": [ "org", "workspace", "project" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "approvals": { "type": "array", "items": { "type": "object", "properties": { "runId": { "type": "string" }, "stepKey": { "type": "string" }, "goal": { "type": "string" }, "tool": { "type": "string" }, "arguments": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "reviewUrl": { "type": [ "string", "null" ] }, "createdAt": { "type": "string" } }, "required": [ "runId", "stepKey", "goal", "tool", "arguments", "reviewUrl", "createdAt" ], "additionalProperties": false } } }, "required": [ "approvals" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/agent.approval.review": { "post": { "operationId": "agent.approval.review", "tags": [ "agent" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: agent.approval.review. Audit event: agent.approval.reviewed.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "runId": { "type": "string" }, "stepKey": { "type": "string" }, "decision": { "type": "string", "enum": [ "approve", "reject" ] }, "reason": { "type": "string", "maxLength": 500 } }, "required": [ "org", "workspace", "project", "runId", "stepKey", "decision" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "runId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "awaiting_approval", "completed", "failed", "cancelled", "uncertain" ] } }, "required": [ "runId", "status" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/agent.run.cancel": { "post": { "operationId": "agent.run.cancel", "tags": [ "agent" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: agent.run.cancel. Audit event: agent.run.cancelled.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "runId": { "type": "string" } }, "required": [ "org", "workspace", "project", "runId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "runId": { "type": "string" }, "cancelled": { "type": "boolean" } }, "required": [ "runId", "cancelled" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/agent.run.list": { "post": { "operationId": "agent.run.list", "tags": [ "agent" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: agent.run.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } }, "required": [ "org", "workspace", "project" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "runs": { "type": "array", "items": { "type": "object", "properties": { "runId": { "type": "string" }, "goal": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "awaiting_approval", "completed", "failed", "cancelled", "uncertain" ] }, "failureCode": { "anyOf": [ { "type": "string", "enum": [ "tool_error", "budget_exhausted", "plan_refused", "approval_unavailable", "internal" ] }, { "type": "null" } ] }, "failureDetail": { "type": [ "string", "null" ] }, "plan": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "label": { "type": "string" }, "tool": { "type": "string" }, "args": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "status": { "type": "string", "enum": [ "pending", "committed", "failed", "cancelled", "uncertain" ] }, "attempts": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "error": { "type": [ "string", "null" ] } }, "required": [ "key", "label", "tool", "args", "status", "attempts", "error" ], "additionalProperties": false } }, "usageCostMicrocents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "usageSteps": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "percent": { "type": "number" }, "cancelRequested": { "type": "boolean" }, "actorId": { "type": "string" }, "createdAt": { "type": "string" }, "startedAt": { "type": [ "string", "null" ] }, "finishedAt": { "type": [ "string", "null" ] } }, "required": [ "runId", "goal", "status", "failureCode", "failureDetail", "plan", "usageCostMicrocents", "usageSteps", "percent", "cancelRequested", "actorId", "createdAt", "startedAt", "finishedAt" ], "additionalProperties": false } }, "cursor": { "type": "string" }, "hasMore": { "type": "boolean" } }, "required": [ "runs", "hasMore" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/agent.run.start": { "post": { "operationId": "agent.run.start", "tags": [ "agent" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: agent.run.start.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "goal": { "type": "string", "minLength": 1, "maxLength": 2000 }, "plan": { "minItems": 1, "maxItems": 25, "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[a-z][a-z0-9-]*$" }, "label": { "type": "string", "minLength": 1, "maxLength": 200 }, "tool": { "type": "string", "minLength": 1, "maxLength": 200 }, "args": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "required": [ "key", "label", "tool", "args" ], "additionalProperties": false } }, "budget": { "type": "object", "properties": { "maxCostMicrocents": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "maxSteps": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "maxDurationSeconds": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "additionalProperties": false } }, "required": [ "org", "workspace", "project", "goal", "plan" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "runId": { "type": "string" }, "goal": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "awaiting_approval", "completed", "failed", "cancelled", "uncertain" ] }, "failureCode": { "anyOf": [ { "type": "string", "enum": [ "tool_error", "budget_exhausted", "plan_refused", "approval_unavailable", "internal" ] }, { "type": "null" } ] }, "failureDetail": { "type": [ "string", "null" ] }, "plan": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "label": { "type": "string" }, "tool": { "type": "string" }, "args": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "status": { "type": "string", "enum": [ "pending", "committed", "failed", "cancelled", "uncertain" ] }, "attempts": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "error": { "type": [ "string", "null" ] } }, "required": [ "key", "label", "tool", "args", "status", "attempts", "error" ], "additionalProperties": false } }, "usageCostMicrocents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "usageSteps": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "percent": { "type": "number" }, "cancelRequested": { "type": "boolean" }, "actorId": { "type": "string" }, "createdAt": { "type": "string" }, "startedAt": { "type": [ "string", "null" ] }, "finishedAt": { "type": [ "string", "null" ] } }, "required": [ "runId", "goal", "status", "failureCode", "failureDetail", "plan", "usageCostMicrocents", "usageSteps", "percent", "cancelRequested", "actorId", "createdAt", "startedAt", "finishedAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/agent.run.status": { "post": { "operationId": "agent.run.status", "tags": [ "agent" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: agent.run.read. Exposed as an MCP tool.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "runId": { "type": "string" } }, "required": [ "org", "workspace", "project", "runId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "runId": { "type": "string" }, "goal": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "awaiting_approval", "completed", "failed", "cancelled", "uncertain" ] }, "failureCode": { "anyOf": [ { "type": "string", "enum": [ "tool_error", "budget_exhausted", "plan_refused", "approval_unavailable", "internal" ] }, { "type": "null" } ] }, "failureDetail": { "type": [ "string", "null" ] }, "plan": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "label": { "type": "string" }, "tool": { "type": "string" }, "args": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "status": { "type": "string", "enum": [ "pending", "committed", "failed", "cancelled", "uncertain" ] }, "attempts": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "error": { "type": [ "string", "null" ] } }, "required": [ "key", "label", "tool", "args", "status", "attempts", "error" ], "additionalProperties": false } }, "usageCostMicrocents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "usageSteps": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "percent": { "type": "number" }, "cancelRequested": { "type": "boolean" }, "actorId": { "type": "string" }, "createdAt": { "type": "string" }, "startedAt": { "type": [ "string", "null" ] }, "finishedAt": { "type": [ "string", "null" ] } }, "required": [ "runId", "goal", "status", "failureCode", "failureDetail", "plan", "usageCostMicrocents", "usageSteps", "percent", "cancelRequested", "actorId", "createdAt", "startedAt", "finishedAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/auth.apiKey.create": { "post": { "operationId": "auth.apiKey.create", "tags": [ "auth" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: auth.api-key.manage. Audit event: auth.api_key_created.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "name": { "type": "string", "minLength": 1, "maxLength": 120 }, "expiresAt": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" } }, "required": [ "org", "name" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "key": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "prefix": { "type": "string" }, "userId": { "type": "string" }, "createdAt": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, "expiresAt": { "anyOf": [ { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, { "type": "null" } ] }, "revokedAt": { "anyOf": [ { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, { "type": "null" } ] } }, "required": [ "id", "name", "prefix", "userId", "createdAt", "expiresAt", "revokedAt" ], "additionalProperties": false }, "secret": { "type": "string" } }, "required": [ "key", "secret" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/auth.apiKey.list": { "post": { "operationId": "auth.apiKey.list", "tags": [ "auth" ], "summary": "read procedure on the org scope", "description": "Kind: read. Scope: org. Permission: auth.api-key.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "keys": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "prefix": { "type": "string" }, "userId": { "type": "string" }, "createdAt": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, "expiresAt": { "anyOf": [ { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, { "type": "null" } ] }, "revokedAt": { "anyOf": [ { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, { "type": "null" } ] } }, "required": [ "id", "name", "prefix", "userId", "createdAt", "expiresAt", "revokedAt" ], "additionalProperties": false } } }, "required": [ "keys" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/auth.apiKey.revoke": { "post": { "operationId": "auth.apiKey.revoke", "tags": [ "auth" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: auth.api-key.manage. Audit event: auth.api_key_revoked.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "id": { "type": "string" } }, "required": [ "org", "id" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "key": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "prefix": { "type": "string" }, "userId": { "type": "string" }, "createdAt": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, "expiresAt": { "anyOf": [ { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, { "type": "null" } ] }, "revokedAt": { "anyOf": [ { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, { "type": "null" } ] } }, "required": [ "id", "name", "prefix", "userId", "createdAt", "expiresAt", "revokedAt" ], "additionalProperties": false } }, "required": [ "key" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/auth.session.current": { "post": { "operationId": "auth.session.current", "tags": [ "auth" ], "summary": "read procedure on the user scope", "description": "Kind: read. Scope: user. Permission: none.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "userId": { "type": "string" }, "email": { "type": "string" }, "displayName": { "type": "string" }, "locale": { "type": "string" } }, "required": [ "userId", "email", "displayName", "locale" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/branding.brand.get": { "post": { "operationId": "branding.brand.get", "tags": [ "branding" ], "summary": "read procedure on the org scope", "description": "Kind: read. Scope: org. Permission: branding.brand.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "displayName": { "type": [ "string", "null" ] }, "primary": { "type": [ "string", "null" ] }, "accent": { "type": [ "string", "null" ] }, "logoLight": { "type": [ "string", "null" ] }, "logoDark": { "type": [ "string", "null" ] } }, "required": [ "displayName", "primary", "accent", "logoLight", "logoDark" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/branding.brand.set": { "post": { "operationId": "branding.brand.set", "tags": [ "branding" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: branding.brand.write. Audit event: branding.brand_changed.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "displayName": { "anyOf": [ { "type": "string", "maxLength": 60 }, { "type": "null" } ] }, "primary": { "anyOf": [ { "type": "string", "maxLength": 32 }, { "type": "null" } ] }, "accent": { "anyOf": [ { "type": "string", "maxLength": 32 }, { "type": "null" } ] } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "displayName": { "type": [ "string", "null" ] }, "primary": { "type": [ "string", "null" ] }, "accent": { "type": [ "string", "null" ] }, "logoLight": { "type": [ "string", "null" ] }, "logoDark": { "type": [ "string", "null" ] } }, "required": [ "displayName", "primary", "accent", "logoLight", "logoDark" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/branding.logo.clear": { "post": { "operationId": "branding.logo.clear", "tags": [ "branding" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: branding.brand.write. Audit event: branding.brand_changed.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "variant": { "type": "string", "enum": [ "light", "dark" ] } }, "required": [ "org", "variant" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "displayName": { "type": [ "string", "null" ] }, "primary": { "type": [ "string", "null" ] }, "accent": { "type": [ "string", "null" ] }, "logoLight": { "type": [ "string", "null" ] }, "logoDark": { "type": [ "string", "null" ] } }, "required": [ "displayName", "primary", "accent", "logoLight", "logoDark" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/branding.logo.get": { "post": { "operationId": "branding.logo.get", "tags": [ "branding" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: branding.brand.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "variant": { "type": "string", "enum": [ "light", "dark" ] }, "size": { "type": "string", "enum": [ "1x", "2x" ] } }, "required": [ "org", "variant" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "contentType": { "type": "string" }, "body": { "type": "string" } }, "required": [ "contentType", "body" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/branding.logo.set": { "post": { "operationId": "branding.logo.set", "tags": [ "branding" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: branding.brand.write. Audit event: branding.brand_changed.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "variant": { "type": "string", "enum": [ "light", "dark" ] }, "contentType": { "type": "string", "maxLength": 64 }, "body": { "type": "string", "maxLength": 2796207 } }, "required": [ "org", "variant", "contentType", "body" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "displayName": { "type": [ "string", "null" ] }, "primary": { "type": [ "string", "null" ] }, "accent": { "type": [ "string", "null" ] }, "logoLight": { "type": [ "string", "null" ] }, "logoDark": { "type": [ "string", "null" ] } }, "required": [ "displayName", "primary", "accent", "logoLight", "logoDark" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/documents.document.get": { "post": { "operationId": "documents.document.get", "tags": [ "documents" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: documents.document.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "fileId": { "type": "string" } }, "required": [ "org", "workspace", "project", "fileId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "document": { "type": "object", "properties": { "fileId": { "type": "string" }, "filename": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "processing", "extracted", "failed" ] }, "failureCode": { "anyOf": [ { "type": "string", "enum": [ "file_missing", "file_changed", "ocr_failed", "extraction_refused", "extraction_truncated", "extraction_invalid" ] }, { "type": "null" } ] }, "pageCount": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] }, "skippedPages": { "type": "array", "items": { "type": "object", "properties": { "page": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "pageClass": { "type": "string", "enum": [ "text", "table", "drawing", "scan", "empty" ] } }, "required": [ "page", "pageClass" ], "additionalProperties": false } }, "pending": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "approved": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "uploadedAt": { "type": "string" } }, "required": [ "fileId", "filename", "status", "failureCode", "pageCount", "skippedPages", "pending", "approved", "uploadedAt" ], "additionalProperties": false }, "lines": { "type": "array", "items": { "type": "object", "properties": { "lineId": { "type": "string" }, "expectedVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected" ] }, "label": { "type": "string" }, "value": { "type": "string" }, "page": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "quote": { "type": "string" }, "box": { "anyOf": [ { "type": "object", "properties": { "x": { "type": "number" }, "y": { "type": "number" }, "width": { "type": "number" }, "height": { "type": "number" } }, "required": [ "x", "y", "width", "height" ], "additionalProperties": false }, { "type": "null" } ] }, "confidence": { "type": "number" }, "verification": { "type": "string", "enum": [ "verified", "needs_review" ] }, "note": { "anyOf": [ { "type": "string", "enum": [ "scanned_quote" ] }, { "type": "null" } ] }, "blockId": { "type": [ "string", "null" ] }, "edited": { "type": "boolean" }, "model": { "type": "string" }, "promptVersion": { "type": "string" }, "decidedAt": { "type": [ "string", "null" ] } }, "required": [ "lineId", "expectedVersion", "status", "label", "value", "page", "quote", "box", "confidence", "verification", "note", "blockId", "edited", "model", "promptVersion", "decidedAt" ], "additionalProperties": false } } }, "required": [ "document", "lines" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/documents.document.list": { "post": { "operationId": "documents.document.list", "tags": [ "documents" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: documents.document.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" } }, "required": [ "org", "workspace", "project" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "documents": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string" }, "filename": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "processing", "extracted", "failed" ] }, "failureCode": { "anyOf": [ { "type": "string", "enum": [ "file_missing", "file_changed", "ocr_failed", "extraction_refused", "extraction_truncated", "extraction_invalid" ] }, { "type": "null" } ] }, "pageCount": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] }, "skippedPages": { "type": "array", "items": { "type": "object", "properties": { "page": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "pageClass": { "type": "string", "enum": [ "text", "table", "drawing", "scan", "empty" ] } }, "required": [ "page", "pageClass" ], "additionalProperties": false } }, "pending": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "approved": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "uploadedAt": { "type": "string" } }, "required": [ "fileId", "filename", "status", "failureCode", "pageCount", "skippedPages", "pending", "approved", "uploadedAt" ], "additionalProperties": false } } }, "required": [ "documents" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/documents.export.create": { "post": { "operationId": "documents.export.create", "tags": [ "documents" ], "summary": "effect procedure on the project scope", "description": "Kind: effect. Scope: project. Permission: documents.export.create. Audit event: documents.export_created.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "fileId": { "type": "string" } }, "required": [ "org", "workspace", "project", "fileId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "filename": { "type": "string" }, "contentType": { "type": "string" }, "body": { "type": "string" }, "lineCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "filename", "contentType", "body", "lineCount" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/documents.line.edit": { "post": { "operationId": "documents.line.edit", "tags": [ "documents" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: documents.line.edit. Audit event: documents.line_edited.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "lineId": { "type": "string" }, "label": { "type": "string", "minLength": 1, "maxLength": 200 }, "value": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": [ "org", "workspace", "project", "lineId", "label", "value" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "lineId": { "type": "string" }, "expectedVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected" ] }, "label": { "type": "string" }, "value": { "type": "string" }, "page": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "quote": { "type": "string" }, "box": { "anyOf": [ { "type": "object", "properties": { "x": { "type": "number" }, "y": { "type": "number" }, "width": { "type": "number" }, "height": { "type": "number" } }, "required": [ "x", "y", "width", "height" ], "additionalProperties": false }, { "type": "null" } ] }, "confidence": { "type": "number" }, "verification": { "type": "string", "enum": [ "verified", "needs_review" ] }, "note": { "anyOf": [ { "type": "string", "enum": [ "scanned_quote" ] }, { "type": "null" } ] }, "blockId": { "type": [ "string", "null" ] }, "edited": { "type": "boolean" }, "model": { "type": "string" }, "promptVersion": { "type": "string" }, "decidedAt": { "type": [ "string", "null" ] } }, "required": [ "lineId", "expectedVersion", "status", "label", "value", "page", "quote", "box", "confidence", "verification", "note", "blockId", "edited", "model", "promptVersion", "decidedAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/files.file.beginUpload": { "post": { "operationId": "files.file.beginUpload", "tags": [ "files" ], "summary": "effect procedure on the project scope", "description": "Kind: effect. Scope: project. Permission: files.file.write.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "filename": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[^/\\\\\\u0000-\\u001f\\u007f]+$" }, "contentType": { "type": "string", "minLength": 3, "maxLength": 127, "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$" }, "size": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "org", "workspace", "project", "filename", "contentType", "size" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "fileId": { "type": "string" }, "parts": { "minItems": 1, "type": "array", "items": { "type": "object", "properties": { "number": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "size": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "number", "size" ], "additionalProperties": false } }, "expiresAt": { "type": "string" } }, "required": [ "fileId", "parts", "expiresAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/files.file.completeUpload": { "post": { "operationId": "files.file.completeUpload", "tags": [ "files" ], "summary": "effect procedure on the project scope", "description": "Kind: effect. Scope: project. Permission: files.file.write.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "fileId": { "type": "string" }, "parts": { "minItems": 1, "maxItems": 10000, "type": "array", "items": { "type": "object", "properties": { "number": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "etag": { "type": "string", "minLength": 1, "maxLength": 200 } }, "required": [ "number", "etag" ] } } }, "required": [ "org", "workspace", "project", "fileId", "parts" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "fileId": { "type": "string" }, "filename": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[^/\\\\\\u0000-\\u001f\\u007f]+$" }, "contentType": { "type": "string", "minLength": 3, "maxLength": 127, "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$" }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "uploadedBy": { "type": "string" }, "createdAt": { "type": "string" }, "storedAt": { "type": "string" } }, "required": [ "fileId", "filename", "contentType", "size", "sha256", "uploadedBy", "createdAt", "storedAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/files.file.delete": { "post": { "operationId": "files.file.delete", "tags": [ "files" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: files.file.delete.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "fileId": { "type": "string" } }, "required": [ "org", "workspace", "project", "fileId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/files.file.download": { "get": { "operationId": "files.file.download", "tags": [ "files" ], "summary": "effect procedure on the project scope", "description": "Kind: effect. Scope: project. Permission: files.file.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "org", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "workspace", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "project", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "fileId", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The file bytes, streamed with the stored filename.", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/files.file.get": { "post": { "operationId": "files.file.get", "tags": [ "files" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: files.file.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "fileId": { "type": "string" } }, "required": [ "org", "workspace", "project", "fileId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "fileId": { "type": "string" }, "filename": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[^/\\\\\\u0000-\\u001f\\u007f]+$" }, "contentType": { "type": "string", "minLength": 3, "maxLength": 127, "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$" }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "uploadedBy": { "type": "string" }, "createdAt": { "type": "string" }, "storedAt": { "type": "string" } }, "required": [ "fileId", "filename", "contentType", "size", "sha256", "uploadedBy", "createdAt", "storedAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/files.file.list": { "post": { "operationId": "files.file.list", "tags": [ "files" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: files.file.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 200 } }, "required": [ "org", "workspace", "project" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string" }, "filename": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[^/\\\\\\u0000-\\u001f\\u007f]+$" }, "contentType": { "type": "string", "minLength": 3, "maxLength": 127, "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$" }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "uploadedBy": { "type": "string" }, "createdAt": { "type": "string" }, "storedAt": { "type": "string" } }, "required": [ "fileId", "filename", "contentType", "size", "sha256", "uploadedBy", "createdAt", "storedAt" ], "additionalProperties": false } }, "cursor": { "type": "string" }, "hasMore": { "type": "boolean" } }, "required": [ "files", "hasMore" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/files.file.putPart": { "put": { "operationId": "files.file.putPart", "tags": [ "files" ], "summary": "effect procedure on the project scope", "description": "Kind: effect. Scope: project. Permission: files.file.write.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." }, { "name": "org", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "workspace", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "project", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "fileId", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "part", "in": "query", "required": true, "schema": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } } ], "requestBody": { "required": true, "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } }, "description": "The bytes, sent as they are. Their length must be the one the upload declared." }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "part": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "etag": { "type": "string" } }, "required": [ "part", "etag" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/guides.builder.open": { "post": { "operationId": "guides.builder.open", "tags": [ "guides" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: guides.runtime.use.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "code": { "type": "string", "minLength": 1, "maxLength": 200 } }, "required": [ "org", "code" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "anyOf": [ { "type": "object", "properties": { "console_origin": { "type": "string" }, "guide": { "type": "object", "properties": { "id": { "type": "string" }, "key": { "type": "string" }, "kind": { "type": "string" } }, "required": [ "id", "key", "kind" ], "additionalProperties": false }, "preview": { "anyOf": [ {}, { "type": "null" } ] }, "expires_at": { "type": "string" } }, "required": [ "console_origin", "guide", "preview", "expires_at" ], "additionalProperties": false }, { "type": "null" } ] } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/guides.runtime.bootstrap": { "post": { "operationId": "guides.runtime.bootstrap", "tags": [ "guides" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: guides.runtime.use.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "path": { "type": "string", "minLength": 1, "maxLength": 1000, "format": "starts_with", "pattern": "^\\/.*" }, "locale": { "type": "string", "minLength": 2, "maxLength": 35 } }, "required": [ "org", "path" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "oneOf": [ { "type": "object", "properties": { "mode": { "type": "string", "const": "platform" }, "etag": { "type": "string" }, "guides": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "kind": { "type": "string" }, "version": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "content": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "progress": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "required": [ "key", "kind", "version", "content", "progress" ], "additionalProperties": {} } }, "throttle": { "type": "object", "properties": { "cooldown_seconds": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "one_at_a_time": { "type": "boolean" } }, "required": [ "cooldown_seconds", "one_at_a_time" ], "additionalProperties": false } }, "required": [ "mode", "etag", "guides" ], "additionalProperties": false }, { "type": "object", "properties": { "mode": { "type": "string", "const": "offline" }, "guides": { "type": "array", "items": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } } }, "required": [ "mode", "guides" ], "additionalProperties": false } ] } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/guides.runtime.deleteFile": { "post": { "operationId": "guides.runtime.deleteFile", "tags": [ "guides" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: guides.runtime.use.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "fileId": { "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" } }, "required": [ "org", "fileId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/guides.runtime.record": { "post": { "operationId": "guides.runtime.record", "tags": [ "guides" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: guides.runtime.use.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 200 }, "events": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "schema_version": { "type": "number", "const": 1 }, "event_id": { "type": "string", "minLength": 1, "maxLength": 100 }, "type": { "type": "string", "minLength": 1, "maxLength": 100 } }, "required": [ "schema_version", "event_id", "type" ], "additionalProperties": {} } } }, "required": [ "org", "idempotencyKey", "events" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "outcomes": { "type": "array", "items": { "type": "object", "properties": { "event_id": { "type": "string" }, "status": { "type": "string", "enum": [ "applied", "duplicate" ] }, "guide_key": { "type": [ "string", "null" ] }, "progress_revision": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] }, "progress_epoch": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] } }, "required": [ "event_id", "status", "guide_key", "progress_revision", "progress_epoch" ], "additionalProperties": false } } }, "required": [ "outcomes" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/guides.runtime.uploadFile": { "put": { "operationId": "guides.runtime.uploadFile", "tags": [ "guides" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: guides.runtime.use.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." }, { "name": "org", "in": "query", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, { "name": "guideKey", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 200 } }, { "name": "guideVersion", "in": "query", "required": true, "schema": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } }, { "name": "questionId", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 40 } }, { "name": "name", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 255 } }, { "name": "contentType", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 255 } }, { "name": "size", "in": "query", "required": true, "schema": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } } ], "requestBody": { "required": true, "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } }, "description": "The bytes, sent as they are. Their length must be the one the upload declared." }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "file_id": { "type": "string" }, "name": { "type": "string" }, "content_type": { "type": "string" }, "size_bytes": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "file_id", "name", "content_type", "size_bytes" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/knowledge.collection.create": { "post": { "operationId": "knowledge.collection.create", "tags": [ "knowledge" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: knowledge.collection.manage. Audit event: knowledge.collection.created.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "name": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-z][a-z0-9-]*$" } }, "required": [ "org", "workspace", "project", "name" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-z][a-z0-9-]*$" }, "documentCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "indexedCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "createdBy": { "type": "string" } }, "required": [ "name", "documentCount", "indexedCount", "createdBy" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/knowledge.collection.list": { "post": { "operationId": "knowledge.collection.list", "tags": [ "knowledge" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: knowledge.knowledge.search.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" } }, "required": [ "org", "workspace", "project" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "collections": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-z][a-z0-9-]*$" }, "documentCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "indexedCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "createdBy": { "type": "string" } }, "required": [ "name", "documentCount", "indexedCount", "createdBy" ], "additionalProperties": false } } }, "required": [ "collections" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/knowledge.document.index": { "post": { "operationId": "knowledge.document.index", "tags": [ "knowledge" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: knowledge.knowledge.manage.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "collectionName": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-z][a-z0-9-]*$" }, "fileId": { "type": "string" } }, "required": [ "org", "workspace", "project", "collectionName", "fileId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "documentId": { "type": "string" }, "collectionName": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-z][a-z0-9-]*$" }, "fileId": { "type": "string" }, "filename": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "indexing", "indexed", "failed", "cancelled" ] }, "error": { "type": [ "string", "null" ] }, "indexedAt": { "type": [ "string", "null" ] }, "requestedBy": { "type": "string" } }, "required": [ "documentId", "collectionName", "fileId", "filename", "status", "error", "indexedAt", "requestedBy" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/knowledge.document.list": { "post": { "operationId": "knowledge.document.list", "tags": [ "knowledge" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: knowledge.knowledge.search.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "collectionName": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-z][a-z0-9-]*$" } }, "required": [ "org", "workspace", "project", "collectionName" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "documents": { "type": "array", "items": { "type": "object", "properties": { "documentId": { "type": "string" }, "collectionName": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-z][a-z0-9-]*$" }, "fileId": { "type": "string" }, "filename": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "indexing", "indexed", "failed", "cancelled" ] }, "error": { "type": [ "string", "null" ] }, "indexedAt": { "type": [ "string", "null" ] }, "requestedBy": { "type": "string" } }, "required": [ "documentId", "collectionName", "fileId", "filename", "status", "error", "indexedAt", "requestedBy" ], "additionalProperties": false } } }, "required": [ "documents" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/knowledge.document.remove": { "post": { "operationId": "knowledge.document.remove", "tags": [ "knowledge" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: knowledge.knowledge.manage.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "collectionName": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-z][a-z0-9-]*$" }, "fileId": { "type": "string" } }, "required": [ "org", "workspace", "project", "collectionName", "fileId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "documentId": { "type": "string" }, "collectionName": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-z][a-z0-9-]*$" }, "fileId": { "type": "string" }, "filename": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "indexing", "indexed", "failed", "cancelled" ] }, "error": { "type": [ "string", "null" ] }, "indexedAt": { "type": [ "string", "null" ] }, "requestedBy": { "type": "string" } }, "required": [ "documentId", "collectionName", "fileId", "filename", "status", "error", "indexedAt", "requestedBy" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/knowledge.search": { "post": { "operationId": "knowledge.search", "tags": [ "knowledge" ], "summary": "effect procedure on the project scope", "description": "Kind: effect. Scope: project. Permission: knowledge.knowledge.search. Exposed as an MCP tool.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "collectionName": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-z][a-z0-9-]*$" }, "query": { "type": "string", "minLength": 1, "maxLength": 500 }, "limit": { "type": "integer", "minimum": 1, "maximum": 25 } }, "required": [ "org", "workspace", "project", "collectionName", "query" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "results": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string" }, "filename": { "type": "string" }, "collectionName": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-z][a-z0-9-]*$" }, "snippet": { "type": "string" }, "score": { "type": "number" }, "chunk": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } }, "required": [ "fileId", "filename", "collectionName", "snippet", "score", "chunk" ], "additionalProperties": false } } }, "required": [ "results" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/knowledge.settings.disableDocumentAi": { "post": { "operationId": "knowledge.settings.disableDocumentAi", "tags": [ "knowledge" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: knowledge.settings.manage. Audit event: knowledge.settings.document_ai_disabled.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "enabled": { "type": "boolean" } }, "required": [ "enabled" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/knowledge.settings.enableDocumentAi": { "post": { "operationId": "knowledge.settings.enableDocumentAi", "tags": [ "knowledge" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: knowledge.settings.manage. Audit event: knowledge.settings.document_ai_enabled.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "enabled": { "type": "boolean" }, "backend": { "type": "string", "enum": [ "vectors", "platform" ] } }, "required": [ "enabled", "backend" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/knowledge.settings.get": { "post": { "operationId": "knowledge.settings.get", "tags": [ "knowledge" ], "summary": "read procedure on the org scope", "description": "Kind: read. Scope: org. Permission: knowledge.settings.manage.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "enabled": { "type": "boolean" }, "backend": { "anyOf": [ { "type": "string", "enum": [ "vectors", "platform" ] }, { "type": "null" } ] }, "source": { "anyOf": [ { "type": "string", "enum": [ "operator", "managed" ] }, { "type": "null" } ] }, "url": { "type": [ "string", "null" ] } }, "required": [ "enabled", "backend", "source", "url" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/knowledge.status": { "post": { "operationId": "knowledge.status", "tags": [ "knowledge" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: knowledge.knowledge.search.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" } }, "required": [ "org", "workspace", "project" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "enabled": { "type": "boolean" }, "service": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "registered", "indexing", "ready", "degraded", "disabled", "unavailable" ] }, "reasons": { "type": "array", "items": { "type": "string" } } }, "required": [ "state", "reasons" ], "additionalProperties": false }, "documents": { "type": "object", "properties": { "queued": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "indexing": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "indexed": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "failed": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "cancelled": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "queued", "indexing", "indexed", "failed", "cancelled" ], "additionalProperties": false } }, "required": [ "enabled", "service", "documents" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/notes.attachment.add": { "post": { "operationId": "notes.attachment.add", "tags": [ "notes" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: notes.attachment.write.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "noteId": { "type": "string" }, "fileId": { "type": "string" } }, "required": [ "org", "workspace", "project", "noteId", "fileId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "attachmentId": { "type": "string" }, "fileId": { "type": "string" }, "filename": { "type": "string" }, "contentType": { "type": "string" }, "size": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "attachedAt": { "type": "string" } }, "required": [ "attachmentId", "fileId", "filename", "contentType", "size", "attachedAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/notes.attachment.remove": { "post": { "operationId": "notes.attachment.remove", "tags": [ "notes" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: notes.attachment.write.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "noteId": { "type": "string" }, "attachmentId": { "type": "string" } }, "required": [ "org", "workspace", "project", "noteId", "attachmentId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/notes.note.create": { "post": { "operationId": "notes.note.create", "tags": [ "notes" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: notes.note.write.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "title": { "type": "string", "minLength": 1, "maxLength": 200 }, "body": { "type": "string", "maxLength": 20000 } }, "required": [ "org", "workspace", "project", "title", "body" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "noteId": { "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "version": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "attachmentCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "noteId", "title", "body", "version", "createdBy", "createdAt", "updatedAt", "attachmentCount" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/notes.note.delete": { "post": { "operationId": "notes.note.delete", "tags": [ "notes" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: notes.note.delete.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "noteId": { "type": "string" } }, "required": [ "org", "workspace", "project", "noteId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/notes.note.get": { "post": { "operationId": "notes.note.get", "tags": [ "notes" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: notes.note.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "noteId": { "type": "string" } }, "required": [ "org", "workspace", "project", "noteId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "note": { "type": "object", "properties": { "noteId": { "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "version": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "attachmentCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "noteId", "title", "body", "version", "createdBy", "createdAt", "updatedAt", "attachmentCount" ], "additionalProperties": false }, "attachments": { "type": "array", "items": { "type": "object", "properties": { "attachmentId": { "type": "string" }, "fileId": { "type": "string" }, "filename": { "type": "string" }, "contentType": { "type": "string" }, "size": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "attachedAt": { "type": "string" } }, "required": [ "attachmentId", "fileId", "filename", "contentType", "size", "attachedAt" ], "additionalProperties": false } }, "attachmentsEnabled": { "type": "boolean" } }, "required": [ "note", "attachments", "attachmentsEnabled" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/notes.note.list": { "post": { "operationId": "notes.note.list", "tags": [ "notes" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: notes.note.read. Exposed as an MCP tool.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 200 } }, "required": [ "org", "workspace", "project" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "notes": { "type": "array", "items": { "type": "object", "properties": { "noteId": { "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "version": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "attachmentCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "noteId", "title", "body", "version", "createdBy", "createdAt", "updatedAt", "attachmentCount" ], "additionalProperties": false } }, "cursor": { "type": "string" }, "hasMore": { "type": "boolean" } }, "required": [ "notes", "hasMore" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/notes.note.update": { "post": { "operationId": "notes.note.update", "tags": [ "notes" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: notes.note.write.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "noteId": { "type": "string" }, "title": { "type": "string", "minLength": 1, "maxLength": 200 }, "body": { "type": "string", "maxLength": 20000 }, "expectedVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } }, "required": [ "org", "workspace", "project", "noteId", "title", "body", "expectedVersion" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "noteId": { "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "version": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "attachmentCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "noteId", "title", "body", "version", "createdBy", "createdAt", "updatedAt", "attachmentCount" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/proposals.proposal.approve": { "post": { "operationId": "proposals.proposal.approve", "tags": [ "proposals" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: proposals.proposal.approve.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "proposalId": { "type": "string", "minLength": 1, "maxLength": 64 }, "expectedVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "changeHash": { "type": "string", "minLength": 1 } }, "required": [ "org", "workspace", "project", "proposalId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "proposalId": { "type": "string" }, "version": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected" ] }, "targetKey": { "type": "string", "maxLength": 128, "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$" }, "targetRecordId": { "type": [ "string", "null" ] }, "writtenRecordId": { "type": [ "string", "null" ] }, "change": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "evidence": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "minLength": 1, "maxLength": 64 }, "page": { "type": "integer", "minimum": 1, "maximum": 100000 }, "blockId": { "type": "string", "minLength": 1, "maxLength": 64 }, "box": { "type": "object", "properties": { "x": { "type": "number", "minimum": 0, "maximum": 1 }, "y": { "type": "number", "minimum": 0, "maximum": 1 }, "width": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }, "height": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 } }, "required": [ "x", "y", "width", "height" ], "additionalProperties": false }, "quote": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": [ "fileId" ], "additionalProperties": false } }, "model": { "type": "string" }, "promptVersion": { "type": "string" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "editedBy": { "type": [ "string", "null" ] }, "editedAt": { "type": [ "string", "null" ] }, "decidedBy": { "type": [ "string", "null" ] }, "decidedAt": { "type": [ "string", "null" ] }, "reason": { "type": [ "string", "null" ] } }, "required": [ "proposalId", "version", "status", "targetKey", "targetRecordId", "writtenRecordId", "change", "evidence", "model", "promptVersion", "createdBy", "createdAt", "editedBy", "editedAt", "decidedBy", "decidedAt", "reason" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/proposals.proposal.approveMany": { "post": { "operationId": "proposals.proposal.approveMany", "tags": [ "proposals" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: proposals.proposal.approve.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "proposalIds": { "minItems": 1, "maxItems": 500, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 64 } }, "expectations": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "object", "properties": { "expectedVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "changeHash": { "type": "string", "minLength": 1 } } } } }, "required": [ "org", "workspace", "project", "proposalIds", "expectations" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "proposals": { "type": "array", "items": { "type": "object", "properties": { "proposalId": { "type": "string" }, "version": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected" ] }, "targetKey": { "type": "string", "maxLength": 128, "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$" }, "targetRecordId": { "type": [ "string", "null" ] }, "writtenRecordId": { "type": [ "string", "null" ] }, "change": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "evidence": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "minLength": 1, "maxLength": 64 }, "page": { "type": "integer", "minimum": 1, "maximum": 100000 }, "blockId": { "type": "string", "minLength": 1, "maxLength": 64 }, "box": { "type": "object", "properties": { "x": { "type": "number", "minimum": 0, "maximum": 1 }, "y": { "type": "number", "minimum": 0, "maximum": 1 }, "width": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }, "height": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 } }, "required": [ "x", "y", "width", "height" ], "additionalProperties": false }, "quote": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": [ "fileId" ], "additionalProperties": false } }, "model": { "type": "string" }, "promptVersion": { "type": "string" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "editedBy": { "type": [ "string", "null" ] }, "editedAt": { "type": [ "string", "null" ] }, "decidedBy": { "type": [ "string", "null" ] }, "decidedAt": { "type": [ "string", "null" ] }, "reason": { "type": [ "string", "null" ] } }, "required": [ "proposalId", "version", "status", "targetKey", "targetRecordId", "writtenRecordId", "change", "evidence", "model", "promptVersion", "createdBy", "createdAt", "editedBy", "editedAt", "decidedBy", "decidedAt", "reason" ], "additionalProperties": false } } }, "required": [ "proposals" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/proposals.proposal.create": { "post": { "operationId": "proposals.proposal.create", "tags": [ "proposals" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: proposals.proposal.create. Takes an Idempotency-Key header.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "Idempotency-Key", "in": "header", "required": true, "schema": { "type": "string", "minLength": 8, "maxLength": 200 }, "description": "The first answer for this key is replayed, so a retry is a retry and not a second write." }, { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "targetKey": { "type": "string", "maxLength": 128, "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$" }, "targetRecordId": { "type": "string", "minLength": 1, "maxLength": 64 }, "change": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "evidence": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "minLength": 1, "maxLength": 64 }, "page": { "type": "integer", "minimum": 1, "maximum": 100000 }, "blockId": { "type": "string", "minLength": 1, "maxLength": 64 }, "box": { "type": "object", "properties": { "x": { "type": "number", "minimum": 0, "maximum": 1 }, "y": { "type": "number", "minimum": 0, "maximum": 1 }, "width": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }, "height": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 } }, "required": [ "x", "y", "width", "height" ], "additionalProperties": false }, "quote": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": [ "fileId" ], "additionalProperties": false } }, "model": { "type": "string", "minLength": 1, "maxLength": 128 }, "promptVersion": { "type": "string", "minLength": 1, "maxLength": 64 } }, "required": [ "org", "workspace", "project", "targetKey", "change", "evidence", "model", "promptVersion" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "proposalId": { "type": "string" }, "version": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected" ] }, "targetKey": { "type": "string", "maxLength": 128, "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$" }, "targetRecordId": { "type": [ "string", "null" ] }, "writtenRecordId": { "type": [ "string", "null" ] }, "change": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "evidence": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "minLength": 1, "maxLength": 64 }, "page": { "type": "integer", "minimum": 1, "maximum": 100000 }, "blockId": { "type": "string", "minLength": 1, "maxLength": 64 }, "box": { "type": "object", "properties": { "x": { "type": "number", "minimum": 0, "maximum": 1 }, "y": { "type": "number", "minimum": 0, "maximum": 1 }, "width": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }, "height": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 } }, "required": [ "x", "y", "width", "height" ], "additionalProperties": false }, "quote": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": [ "fileId" ], "additionalProperties": false } }, "model": { "type": "string" }, "promptVersion": { "type": "string" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "editedBy": { "type": [ "string", "null" ] }, "editedAt": { "type": [ "string", "null" ] }, "decidedBy": { "type": [ "string", "null" ] }, "decidedAt": { "type": [ "string", "null" ] }, "reason": { "type": [ "string", "null" ] } }, "required": [ "proposalId", "version", "status", "targetKey", "targetRecordId", "writtenRecordId", "change", "evidence", "model", "promptVersion", "createdBy", "createdAt", "editedBy", "editedAt", "decidedBy", "decidedAt", "reason" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/proposals.proposal.edit": { "post": { "operationId": "proposals.proposal.edit", "tags": [ "proposals" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: proposals.proposal.edit.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "proposalId": { "type": "string", "minLength": 1, "maxLength": 64 }, "change": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "required": [ "org", "workspace", "project", "proposalId", "change" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "proposalId": { "type": "string" }, "version": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected" ] }, "targetKey": { "type": "string", "maxLength": 128, "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$" }, "targetRecordId": { "type": [ "string", "null" ] }, "writtenRecordId": { "type": [ "string", "null" ] }, "change": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "evidence": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "minLength": 1, "maxLength": 64 }, "page": { "type": "integer", "minimum": 1, "maximum": 100000 }, "blockId": { "type": "string", "minLength": 1, "maxLength": 64 }, "box": { "type": "object", "properties": { "x": { "type": "number", "minimum": 0, "maximum": 1 }, "y": { "type": "number", "minimum": 0, "maximum": 1 }, "width": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }, "height": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 } }, "required": [ "x", "y", "width", "height" ], "additionalProperties": false }, "quote": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": [ "fileId" ], "additionalProperties": false } }, "model": { "type": "string" }, "promptVersion": { "type": "string" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "editedBy": { "type": [ "string", "null" ] }, "editedAt": { "type": [ "string", "null" ] }, "decidedBy": { "type": [ "string", "null" ] }, "decidedAt": { "type": [ "string", "null" ] }, "reason": { "type": [ "string", "null" ] } }, "required": [ "proposalId", "version", "status", "targetKey", "targetRecordId", "writtenRecordId", "change", "evidence", "model", "promptVersion", "createdBy", "createdAt", "editedBy", "editedAt", "decidedBy", "decidedAt", "reason" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/proposals.proposal.get": { "post": { "operationId": "proposals.proposal.get", "tags": [ "proposals" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: proposals.proposal.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "proposalId": { "type": "string", "minLength": 1, "maxLength": 64 } }, "required": [ "org", "workspace", "project", "proposalId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "proposalId": { "type": "string" }, "version": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected" ] }, "targetKey": { "type": "string", "maxLength": 128, "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$" }, "targetRecordId": { "type": [ "string", "null" ] }, "writtenRecordId": { "type": [ "string", "null" ] }, "change": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "evidence": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "minLength": 1, "maxLength": 64 }, "page": { "type": "integer", "minimum": 1, "maximum": 100000 }, "blockId": { "type": "string", "minLength": 1, "maxLength": 64 }, "box": { "type": "object", "properties": { "x": { "type": "number", "minimum": 0, "maximum": 1 }, "y": { "type": "number", "minimum": 0, "maximum": 1 }, "width": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }, "height": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 } }, "required": [ "x", "y", "width", "height" ], "additionalProperties": false }, "quote": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": [ "fileId" ], "additionalProperties": false } }, "model": { "type": "string" }, "promptVersion": { "type": "string" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "editedBy": { "type": [ "string", "null" ] }, "editedAt": { "type": [ "string", "null" ] }, "decidedBy": { "type": [ "string", "null" ] }, "decidedAt": { "type": [ "string", "null" ] }, "reason": { "type": [ "string", "null" ] } }, "required": [ "proposalId", "version", "status", "targetKey", "targetRecordId", "writtenRecordId", "change", "evidence", "model", "promptVersion", "createdBy", "createdAt", "editedBy", "editedAt", "decidedBy", "decidedAt", "reason" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/proposals.proposal.list": { "post": { "operationId": "proposals.proposal.list", "tags": [ "proposals" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: proposals.proposal.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected" ] }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 200 } }, "required": [ "org", "workspace", "project" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "proposals": { "type": "array", "items": { "type": "object", "properties": { "proposalId": { "type": "string" }, "version": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected" ] }, "targetKey": { "type": "string", "maxLength": 128, "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$" }, "targetRecordId": { "type": [ "string", "null" ] }, "writtenRecordId": { "type": [ "string", "null" ] }, "change": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "evidence": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "minLength": 1, "maxLength": 64 }, "page": { "type": "integer", "minimum": 1, "maximum": 100000 }, "blockId": { "type": "string", "minLength": 1, "maxLength": 64 }, "box": { "type": "object", "properties": { "x": { "type": "number", "minimum": 0, "maximum": 1 }, "y": { "type": "number", "minimum": 0, "maximum": 1 }, "width": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }, "height": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 } }, "required": [ "x", "y", "width", "height" ], "additionalProperties": false }, "quote": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": [ "fileId" ], "additionalProperties": false } }, "model": { "type": "string" }, "promptVersion": { "type": "string" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "editedBy": { "type": [ "string", "null" ] }, "editedAt": { "type": [ "string", "null" ] }, "decidedBy": { "type": [ "string", "null" ] }, "decidedAt": { "type": [ "string", "null" ] }, "reason": { "type": [ "string", "null" ] } }, "required": [ "proposalId", "version", "status", "targetKey", "targetRecordId", "writtenRecordId", "change", "evidence", "model", "promptVersion", "createdBy", "createdAt", "editedBy", "editedAt", "decidedBy", "decidedAt", "reason" ], "additionalProperties": false } }, "cursor": { "type": "string" }, "hasMore": { "type": "boolean" } }, "required": [ "proposals", "hasMore" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/proposals.proposal.reject": { "post": { "operationId": "proposals.proposal.reject", "tags": [ "proposals" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: proposals.proposal.reject.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "proposalId": { "type": "string", "minLength": 1, "maxLength": 64 }, "reason": { "type": "string", "minLength": 1, "maxLength": 1000 } }, "required": [ "org", "workspace", "project", "proposalId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "proposalId": { "type": "string" }, "version": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected" ] }, "targetKey": { "type": "string", "maxLength": 128, "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$" }, "targetRecordId": { "type": [ "string", "null" ] }, "writtenRecordId": { "type": [ "string", "null" ] }, "change": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "evidence": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "minLength": 1, "maxLength": 64 }, "page": { "type": "integer", "minimum": 1, "maximum": 100000 }, "blockId": { "type": "string", "minLength": 1, "maxLength": 64 }, "box": { "type": "object", "properties": { "x": { "type": "number", "minimum": 0, "maximum": 1 }, "y": { "type": "number", "minimum": 0, "maximum": 1 }, "width": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }, "height": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 } }, "required": [ "x", "y", "width", "height" ], "additionalProperties": false }, "quote": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": [ "fileId" ], "additionalProperties": false } }, "model": { "type": "string" }, "promptVersion": { "type": "string" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "editedBy": { "type": [ "string", "null" ] }, "editedAt": { "type": [ "string", "null" ] }, "decidedBy": { "type": [ "string", "null" ] }, "decidedAt": { "type": [ "string", "null" ] }, "reason": { "type": [ "string", "null" ] } }, "required": [ "proposalId", "version", "status", "targetKey", "targetRecordId", "writtenRecordId", "change", "evidence", "model", "promptVersion", "createdBy", "createdAt", "editedBy", "editedAt", "decidedBy", "decidedAt", "reason" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/support.widget.config": { "post": { "operationId": "support.widget.config", "tags": [ "support" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: support.chat.use.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "oneOf": [ { "type": "object", "properties": { "mode": { "type": "string", "const": "platform" }, "channel": { "type": "string", "minLength": 1 } }, "required": [ "mode", "channel" ], "additionalProperties": false }, { "type": "object", "properties": { "mode": { "type": "string", "const": "unavailable" }, "reason": { "type": "string", "enum": [ "offline", "unconfigured" ] } }, "required": [ "mode", "reason" ], "additionalProperties": false } ] } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/support.widgetSession.mint": { "post": { "operationId": "support.widgetSession.mint", "tags": [ "support" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: support.chat.use.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "token": { "type": "string", "format": "starts_with", "pattern": "^sws_.*" }, "expires_at": { "type": "string" } }, "required": [ "token", "expires_at" ], "additionalProperties": {} } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.invitation.accept": { "post": { "operationId": "tenancy.invitation.accept", "tags": [ "tenancy" ], "summary": "write procedure on the user scope", "description": "Kind: write. Scope: user. Permission: none. Audit event: tenancy.member_joined.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "token": { "type": "string", "minLength": 16, "maxLength": 128 } }, "required": [ "org", "token" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "orgId": { "type": "string" }, "role": { "type": "string", "enum": [ "viewer", "member", "admin", "owner" ] } }, "required": [ "orgId", "role" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.invitation.list": { "post": { "operationId": "tenancy.invitation.list", "tags": [ "tenancy" ], "summary": "read procedure on the org scope", "description": "Kind: read. Scope: org. Permission: tenancy.invitation.list.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "invitations": { "type": "array", "items": { "type": "object", "properties": { "invitationId": { "type": "string" }, "email": { "type": "string" }, "role": { "type": "string", "enum": [ "viewer", "member", "admin", "owner" ] }, "workspaceId": { "type": [ "string", "null" ] }, "workspaceRole": { "anyOf": [ { "type": "string", "enum": [ "viewer", "editor", "admin" ] }, { "type": "null" } ] }, "expiresAt": { "type": "string" }, "expiry": { "type": "string" }, "invitedBy": { "type": "string" }, "inviter": { "type": "object", "properties": { "userId": { "type": "string" }, "email": { "type": "string" }, "displayName": { "type": "string" } }, "required": [ "userId", "email", "displayName" ], "additionalProperties": false } }, "required": [ "invitationId", "email", "role", "expiresAt", "expiry", "invitedBy", "inviter" ], "additionalProperties": false } } }, "required": [ "invitations" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.me.get": { "post": { "operationId": "tenancy.me.get", "tags": [ "tenancy" ], "summary": "read procedure on the user scope", "description": "Kind: read. Scope: user. Permission: none.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "userId": { "type": "string" }, "email": { "type": "string" }, "displayName": { "type": "string" }, "locale": { "type": "string" }, "organizations": { "type": "array", "items": { "type": "object", "properties": { "slug": { "type": "string" }, "name": { "type": "string" }, "role": { "type": "string", "enum": [ "viewer", "member", "admin", "owner" ] } }, "required": [ "slug", "name", "role" ], "additionalProperties": false } } }, "required": [ "userId", "email", "displayName", "locale", "organizations" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.me.update": { "post": { "operationId": "tenancy.me.update", "tags": [ "tenancy" ], "summary": "write procedure on the user scope", "description": "Kind: write. Scope: user. Permission: none.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "locale": { "type": "string", "minLength": 2, "maxLength": 35, "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$" } }, "required": [ "locale" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "locale": { "type": "string" } }, "required": [ "locale" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.member.change-role": { "post": { "operationId": "tenancy.member.change-role", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.member.manage. Audit event: tenancy.member_role_changed.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "userId": { "type": "string" }, "role": { "type": "string", "enum": [ "viewer", "member", "admin", "owner" ] } }, "required": [ "org", "userId", "role" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "userId": { "type": "string" }, "role": { "type": "string", "enum": [ "viewer", "member", "admin", "owner" ] } }, "required": [ "userId", "role" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.member.invite": { "post": { "operationId": "tenancy.member.invite", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.member.invite. Audit event: tenancy.member_invited.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "email": { "type": "string", "minLength": 3, "maxLength": 320 }, "role": { "type": "string", "enum": [ "viewer", "member", "admin", "owner" ] }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspaceRole": { "type": "string", "enum": [ "viewer", "editor", "admin" ] } }, "required": [ "org", "email", "role" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "invitationId": { "type": "string" }, "token": { "type": "string" }, "expiresAt": { "type": "string" } }, "required": [ "invitationId", "token", "expiresAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.member.leave": { "post": { "operationId": "tenancy.member.leave", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.member.leave. Audit event: tenancy.member_removed.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.member.list": { "post": { "operationId": "tenancy.member.list", "tags": [ "tenancy" ], "summary": "read procedure on the org scope", "description": "Kind: read. Scope: org. Permission: tenancy.member.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "members": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "email": { "type": "string" }, "displayName": { "type": "string" }, "role": { "type": "string", "enum": [ "viewer", "member", "admin", "owner" ] } }, "required": [ "userId", "email", "displayName", "role" ], "additionalProperties": false } } }, "required": [ "members" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.member.remove": { "post": { "operationId": "tenancy.member.remove", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.member.manage. Audit event: tenancy.member_removed.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "userId": { "type": "string" } }, "required": [ "org", "userId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.org.create": { "post": { "operationId": "tenancy.org.create", "tags": [ "tenancy" ], "summary": "write procedure on the user scope", "description": "Kind: write. Scope: user. Permission: none. Audit event: tenancy.organization_created.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "slug": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "name": { "type": "string", "minLength": 1, "maxLength": 120 } }, "required": [ "slug", "name" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "orgId": { "type": "string" }, "slug": { "type": "string" }, "workspaceSlug": { "type": "string" } }, "required": [ "orgId", "slug", "workspaceSlug" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.org.get": { "post": { "operationId": "tenancy.org.get", "tags": [ "tenancy" ], "summary": "read procedure on the org scope", "description": "Kind: read. Scope: org. Permission: tenancy.org.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "orgId": { "type": "string" }, "slug": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string" }, "branding": { "anyOf": [ {}, { "type": "null" } ] }, "settings": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "orgId", "slug", "name", "status", "branding", "settings", "version" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.org.update": { "post": { "operationId": "tenancy.org.update", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.org.update. Audit event: tenancy.organization_updated.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "name": { "type": "string", "minLength": 1, "maxLength": 120 }, "settings": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "expectedVersion": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "slug": { "type": "string" } }, "required": [ "org", "expectedVersion" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "orgId": { "type": "string" }, "slug": { "type": "string" }, "name": { "type": "string" }, "settings": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "orgId", "slug", "name", "settings", "version" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.project.create": { "post": { "operationId": "tenancy.project.create", "tags": [ "tenancy" ], "summary": "write procedure on the workspace scope", "description": "Kind: write. Scope: workspace. Permission: tenancy.project.manage. Audit event: tenancy.project_created.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "slug": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "name": { "type": "string", "minLength": 1, "maxLength": 120 }, "moduleKey": { "type": "string", "minLength": 1, "maxLength": 64 } }, "required": [ "org", "workspace", "slug", "name", "moduleKey" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "projectId": { "type": "string" }, "slug": { "type": "string" } }, "required": [ "projectId", "slug" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.project.get": { "post": { "operationId": "tenancy.project.get", "tags": [ "tenancy" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: tenancy.project.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org", "workspace", "project" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "projectId": { "type": "string" }, "slug": { "type": "string" }, "name": { "type": "string" }, "moduleKey": { "type": "string" }, "archived": { "type": "boolean" } }, "required": [ "projectId", "slug", "name", "moduleKey", "archived" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.project.list": { "post": { "operationId": "tenancy.project.list", "tags": [ "tenancy" ], "summary": "read procedure on the workspace scope", "description": "Kind: read. Scope: workspace. Permission: tenancy.project.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org", "workspace" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "projects": { "type": "array", "items": { "type": "object", "properties": { "slug": { "type": "string" }, "name": { "type": "string" }, "moduleKey": { "type": "string" }, "archived": { "type": "boolean" } }, "required": [ "slug", "name", "moduleKey", "archived" ], "additionalProperties": false } } }, "required": [ "projects" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.workspace.create": { "post": { "operationId": "tenancy.workspace.create", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.workspace.manage. Audit event: tenancy.workspace_created.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "slug": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "name": { "type": "string", "minLength": 1, "maxLength": 120 }, "visibility": { "type": "string", "enum": [ "org", "restricted" ] } }, "required": [ "org", "slug", "name", "visibility" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "workspaceId": { "type": "string" }, "slug": { "type": "string" } }, "required": [ "workspaceId", "slug" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.workspace.list": { "post": { "operationId": "tenancy.workspace.list", "tags": [ "tenancy" ], "summary": "read procedure on the org scope", "description": "Kind: read. Scope: org. Permission: tenancy.workspace.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "workspaces": { "type": "array", "items": { "type": "object", "properties": { "slug": { "type": "string" }, "name": { "type": "string" }, "isDefault": { "type": "boolean" }, "visibility": { "type": "string", "enum": [ "org", "restricted" ] } }, "required": [ "slug", "name", "isDefault", "visibility" ], "additionalProperties": false } } }, "required": [ "workspaces" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.workspace.set-member": { "post": { "operationId": "tenancy.workspace.set-member", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.workspace.manage. Audit event: tenancy.workspace_member_set.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "userId": { "type": "string" }, "role": { "type": "string", "enum": [ "viewer", "editor", "admin" ] } }, "required": [ "org", "workspace", "userId", "role" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } } }, "components": { "schemas": { "Problem": { "type": "object", "required": [ "type", "title", "status", "code" ], "properties": { "type": { "type": "string", "description": "An app-relative URI reference, /problems/." }, "title": { "type": "string" }, "status": { "type": "integer" }, "code": { "type": "string" }, "detail": { "type": "string" }, "errors": { "type": "array", "items": { "type": "object", "required": [ "path", "message" ], "properties": { "path": { "type": "string" }, "message": { "type": "string" } } } }, "retryAfter": { "type": "integer", "description": "Seconds, for 429 and 503." } } } }, "securitySchemes": { "session": { "type": "apiKey", "in": "cookie", "name": "conusai_session", "description": "The sealed session cookie a browser holds." }, "bearer": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "An OIDC access token for this app's audience." }, "apiKey": { "type": "http", "scheme": "bearer", "description": "An organization API key, cak__." } } } }