OpenAPI reference
The HTTP contract for every CompanyOS operation. Generated from the published OpenAPI document.
Generated from docs/contracts/action-platform-openapi.json (OpenAPI 3.1.0). Authenticate withAuthorization: Bearer …, using a Member session or a grant secret. See Developers.
List operations
GET /api/v1/operations: the operations available to the caller, with their schemas.
Run an operation
POST /api/v1/operations/{operationId} with a JSON body. Responses: 200, 400, 401, 403, 404, 502, 503. Errors use the AI-Actionable Error envelope.
Operations
knowledge.list_visible_files
Request body
{
"type": "object",
"properties": {
"scope": {
"type": "string",
"enum": [
"company",
"personal",
"all"
],
"description": "Defaults to all."
}
},
"additionalProperties": false
}Response
{
"type": "object",
"required": [
"result"
],
"additionalProperties": false,
"properties": {
"result": {
"type": "object",
"properties": {
"groups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"enum": [
"Company Files",
"Personal Files"
]
},
"files": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": [
"key",
"path"
],
"additionalProperties": false
}
}
},
"required": [
"label",
"files"
],
"additionalProperties": false
}
}
},
"required": [
"groups"
],
"additionalProperties": false
}
}
}m365.list_authorized_senders
Request body
{
"type": "object",
"properties": {},
"additionalProperties": false
}Response
{
"type": "object",
"required": [
"result"
],
"additionalProperties": false,
"properties": {
"result": {
"type": "object",
"additionalProperties": false,
"required": [
"senders"
],
"properties": {
"senders": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"sender_id",
"type",
"display_name",
"email",
"available",
"recommended_use",
"interactive_eligible",
"scheduled_eligible"
],
"properties": {
"sender_id": {
"type": "string",
"description": "Stable sender identifier. Use only values returned by discovery."
},
"type": {
"type": "string",
"enum": [
"member_mailbox",
"shared_mailbox"
]
},
"display_name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
},
"available": {
"type": "boolean"
},
"recommended_use": {
"type": "string"
},
"interactive_eligible": {
"type": "boolean"
},
"scheduled_eligible": {
"type": "boolean"
}
}
}
}
}
}
}
}m365.list_send_history
Request body
{
"type": "object",
"properties": {},
"additionalProperties": false
}Response
{
"type": "object",
"required": [
"result"
],
"additionalProperties": false,
"properties": {
"result": {
"type": "object",
"additionalProperties": false,
"required": [
"entries"
],
"properties": {
"entries": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"operation_id",
"actor_user_id",
"workspace_id",
"logged_at",
"status",
"view"
],
"properties": {
"operation_id": {
"type": "string",
"const": "m365.send_email"
},
"actor_user_id": {
"type": "string"
},
"workspace_id": {
"type": "string"
},
"logged_at": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"ok",
"denied",
"failed"
]
},
"operation_approval_id": {
"type": "string"
},
"routine_grant_id": {
"type": "string"
},
"automation_grant_id": {
"type": "string"
},
"view": {
"type": "object",
"additionalProperties": true
}
}
}
}
}
}
}
}m365.send_email
Request body
{
"type": "object",
"properties": {
"sender_id": {
"type": "string",
"description": "Stable sender_id from m365.list_authorized_senders. Optional for interactive calls (defaults to the Member mailbox); required for scheduled calls."
},
"connection_id": {
"type": "string",
"description": "Deprecated client hint. Interactive draft calls always verify the Member's live Microsoft 365 connection server-side; a client-supplied value never authorizes alone."
},
"to": {
"type": "array",
"minItems": 1,
"maxItems": 20,
"items": {
"type": "string",
"format": "email"
}
},
"cc": {
"type": "array",
"maxItems": 20,
"items": {
"type": "string",
"format": "email"
}
},
"subject": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"body": {
"type": "string",
"minLength": 1,
"maxLength": 100000,
"description": "Plain-text email body."
},
"output_definition": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Required for scheduled calls: exact Procedure or output definition bound by the Routine Grant."
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Stable caller-generated key so retries return the original submission outcome without creating a second draft. When omitted, interactive calls use the request identifier and scheduled calls use x-routine-invocation-id."
},
"confirm_send": {
"type": "boolean",
"const": true,
"description": "Deprecated compatibility flag. Must be true when supplied; it is not required and never authorizes execution."
}
},
"required": [
"to",
"subject",
"body"
],
"additionalProperties": false
}Response
{
"type": "object",
"required": [
"result"
],
"additionalProperties": false,
"properties": {
"result": {
"type": "object",
"additionalProperties": false,
"required": [
"integration",
"action",
"status",
"sender_id",
"sender_type",
"recipientCount",
"idempotency_key"
],
"properties": {
"integration": {
"type": "string",
"const": "microsoft_365"
},
"action": {
"type": "string",
"enum": [
"create_draft",
"send_email"
]
},
"status": {
"type": "string",
"enum": [
"drafted",
"accepted",
"failed",
"unknown"
],
"description": "drafted means Graph returned a saved draft, never sent. accepted is historical only. unknown means creation is ambiguous; retry only with the same key."
},
"draft_id": {
"type": "string"
},
"draft_url": {
"type": "string"
},
"sender_id": {
"type": "string"
},
"sender_type": {
"type": "string",
"enum": [
"member_mailbox",
"shared_mailbox"
]
},
"recipientCount": {
"type": "integer",
"minimum": 1
},
"idempotency_key": {
"type": "string",
"description": "Idempotency key used for this submission (caller-supplied, request identifier, or scheduled invocation id)."
},
"graph_correlation": {
"type": "object",
"additionalProperties": false,
"description": "Safe Graph correlation retained for audit and support; never includes message bodies.",
"properties": {
"graph_request_id": {
"type": "string"
},
"graph_client_request_id": {
"type": "string"
},
"http_status": {
"type": "integer"
}
}
}
}
}
}
}procedures.create_draft
Request body
{
"type": "object",
"properties": {
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"markdown": {
"type": "string"
}
},
"required": [
"slug",
"title",
"description",
"markdown"
],
"additionalProperties": false
}Response
{
"type": "object",
"required": [
"result"
],
"additionalProperties": false,
"properties": {
"result": {
"type": "object",
"properties": {
"procedure": {
"type": "object",
"properties": {
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"state": {
"type": "string",
"enum": [
"draft"
]
},
"type": {
"type": "string",
"enum": [
"procedure"
]
},
"markdown": {
"type": "string"
},
"managedBy": {
"type": "string",
"enum": [
"owner"
]
}
},
"required": [
"slug",
"title",
"description",
"markdown",
"state",
"type",
"managedBy"
]
}
},
"required": [
"procedure"
],
"additionalProperties": false
}
}
}Download
The full document: openapi.json.