AIP
API リファレンス
AIP 公開 API の認証、Agent の会話、業務リソースのエンドポイントを確認します。
OpenAPI JSON
AIP Public API はワークベンチで作成したキーを使用します。単一 Agent の会話キーは保存済み設定で /agent/* を呼び出し、Profile API key は権限に応じて現在の業務 ID のリソースにアクセスします。まず API クイックスタートを読み、結果の処理は会話イベントと SSEを参照してください。
以下の定義は Backplane OpenAPI スナップショットに基づき、引数、本文、応答をリソース別に表示します。
131 件の公開 API を含むスナップショットです。引数、応答、認証は OpenAPI JSON から直接取得し、API 説明は原文のまま表示します。
OpenAPI JSON をダウンロード · 上流の OpenAPI JSON を表示
取得日: 2026-10-16 · 形式: Swagger / OpenAPI 2.0 · ベース URL: https://backend.hast.so/api/public/v1.
ダウンロードにはAIP 公開 API と参照モデルを含みます。Swagger 2.0 対応ツールへ取り込めます。上流仕様には他サービスの API も含まれます。
認証
AIP で作成した API キーを使用します。単一 Agent のキーは /agent/*、Profile key はリソースごとの権限が必要です。 Authorization: Bearer hast_pk_... を使用し、キーはサーバーで保管してください。
{
"description": "Personal API key as `Bearer hast_pk_*` for `/api/public/v1`.",
"in": "header",
"name": "Authorization",
"type": "apiKey"
}Agent の会話
POST /api/public/v1/agent/promptsSend a message to the key's bound Agent
Omit session_id to create a conversation; include it to continue. request_id makes retries idempotent. Only the saved Agent configuration is used. A 202 response is accepted, not completed; poll conversation events for the returned request_id.
リクエスト形式: application/json; 応答形式: application/json.
引数
request · body · 必須
{
"description": "Conversation message",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"prompt": {
"maxLength": 65536,
"type": "string"
},
"request_id": {
"maxLength": 128,
"type": "string"
},
"session_id": {
"maxLength": 128,
"type": "string"
}
},
"required": [
"prompt"
],
"type": "object"
}
}応答
202 Accepted
{
"properties": {
"after_event_id": {
"type": "integer"
},
"event_url": {
"type": "string"
},
"request_id": {
"type": "string"
},
"run_id": {
"type": "string"
},
"session_id": {
"type": "string"
}
},
"type": "object"
}GET /api/public/v1/agent/sessionsList the bound Agent's conversations
Includes historical conversations belonging to this Agent only. Session IDs can be used with the conversation events tool.
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
limit · query · 任意
{
"description": "Page size (1-100)",
"in": "query",
"name": "limit",
"type": "integer"
}cursor · query · 任意
{
"description": "Next cursor from the previous page",
"in": "query",
"name": "cursor",
"type": "string"
}応答
200 OK
{
"properties": {
"has_more": {
"type": "boolean"
},
"next_cursor": {
"type": "string"
},
"sessions": {
"items": {
"properties": {
"canceled_at": {
"type": "string"
},
"completed_at": {
"type": "string"
},
"created_at": {
"type": "string"
},
"event_cursor": {
"type": "integer"
},
"failed_at": {
"type": "string"
},
"mode": {
"type": "string"
},
"runtime_provider": {
"type": "string"
},
"session_id": {
"type": "string"
},
"status": {
"type": "string"
},
"task_origin": {
"type": "string"
},
"token_usage": {
"properties": {
"cache_read_tokens": {
"type": "integer"
},
"cache_write_tokens": {
"type": "integer"
},
"cost_status": {
"type": "string"
},
"estimated_cost_usd": {
"type": "number"
},
"input_tokens": {
"type": "integer"
},
"model": {
"type": "string"
},
"output_tokens": {
"type": "integer"
},
"pricing": {
"properties": {
"cache_read_usd_per_token": {
"type": "string"
},
"cache_write_usd_per_token": {
"type": "string"
},
"input_usd_per_token": {
"type": "string"
},
"output_usd_per_token": {
"type": "string"
}
},
"type": "object"
},
"reasoning_tokens": {
"type": "integer"
},
"reported_sessions": {
"type": "integer"
},
"total_tokens": {
"type": "integer"
},
"unpriced_tokens": {
"type": "integer"
},
"unreported_sessions": {
"type": "integer"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}GET /api/public/v1/agent/sessions/{session_id}/eventsRead the bound Agent's conversation messages and status
Returns user/assistant messages and run lifecycle events, without configuration or tool traces. Poll using next_after until the matching run_id completes, fails or is interrupted. An empty filtered page may still have has_more=true.
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
session_id · path · 必須
{
"description": "Conversation ID",
"in": "path",
"name": "session_id",
"required": true,
"type": "string"
}after · query · 任意
{
"description": "Last consumed sequence",
"in": "query",
"name": "after",
"type": "integer"
}limit · query · 任意
{
"description": "Page size (1-200)",
"in": "query",
"name": "limit",
"type": "integer"
}応答
200 OK
{
"properties": {
"events": {
"items": {
"discriminator": "type",
"properties": {
"created_at": {
"example": "2026-08-16T12:00:00Z",
"format": "date-time",
"type": "string"
},
"data": {
"allOf": [
{
"properties": {
"attempt": {
"minimum": 1,
"type": "integer"
},
"attempts": {
"minimum": 1,
"type": "integer"
},
"channel": {
"enum": [
"stdout",
"stderr",
"progress"
],
"type": "string"
},
"code": {
"type": "string"
},
"context_window": {
"minimum": 0,
"type": "integer"
},
"cost": {},
"delta": {
"type": "string"
},
"duration_ms": {
"minimum": 0,
"type": "integer"
},
"error": {
"type": "string"
},
"exit_code": {
"type": "integer"
},
"files": {
"items": {
"type": "string"
},
"type": "array"
},
"final_message_id": {
"type": "string"
},
"finish_reason": {
"type": "string"
},
"input": {},
"is_error": {
"type": "boolean"
},
"kind": {
"type": "string"
},
"last": {
"properties": {
"cache_read_tokens": {
"minimum": 0,
"type": "integer"
},
"cache_write_tokens": {
"minimum": 0,
"type": "integer"
},
"input_tokens": {
"minimum": 0,
"type": "integer"
},
"output_tokens": {
"minimum": 0,
"type": "integer"
},
"reasoning_tokens": {
"minimum": 0,
"type": "integer"
},
"total_tokens": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"cache_read_tokens",
"cache_write_tokens",
"input_tokens",
"output_tokens",
"reasoning_tokens",
"total_tokens"
],
"type": "object"
},
"message": {
"type": "string"
},
"message_id": {
"type": "string"
},
"model": {
"type": "string"
},
"model_config": {
"properties": {
"model": {
"type": "string"
},
"model_source": {
"enum": [
"hast",
"codex_account"
],
"type": "string"
},
"reasoning_effort": {
"type": "string"
}
},
"type": "object"
},
"model_source": {
"type": "string"
},
"modified_at": {
"format": "date-time",
"type": "string"
},
"name": {
"type": "string"
},
"operation": {
"enum": [
"update",
"delete"
],
"type": "string"
},
"options": {
"items": {},
"type": "array"
},
"output": {},
"parent_tool_call_id": {
"type": "string"
},
"path": {
"type": "string"
},
"plan_id": {
"type": "string"
},
"prompt": {
"type": "string"
},
"reason": {
"type": "string"
},
"reasoning_id": {
"type": "string"
},
"request_id": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"role": {
"enum": [
"user",
"assistant",
"system"
],
"type": "string"
},
"scope": {
"type": "string"
},
"size_bytes": {
"minimum": 0,
"type": "integer"
},
"status": {
"enum": [
"starting",
"ready",
"failed",
"released",
"succeeded",
"interrupted"
],
"type": "string"
},
"steps": {
"items": {
"properties": {
"status": {
"enum": [
"pending",
"in_progress",
"completed"
],
"example": "in_progress",
"type": "string"
},
"step": {
"type": "string"
}
},
"required": [
"status",
"step"
],
"type": "object"
},
"type": "array"
},
"text": {
"type": "string"
},
"tokens_after": {
"minimum": 0,
"type": "integer"
},
"tokens_before": {
"minimum": 0,
"type": "integer"
},
"tool_call_id": {
"type": "string"
},
"total": {
"properties": {
"cache_read_tokens": {
"minimum": 0,
"type": "integer"
},
"cache_write_tokens": {
"minimum": 0,
"type": "integer"
},
"input_tokens": {
"minimum": 0,
"type": "integer"
},
"output_tokens": {
"minimum": 0,
"type": "integer"
},
"reasoning_tokens": {
"minimum": 0,
"type": "integer"
},
"total_tokens": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"cache_read_tokens",
"cache_write_tokens",
"input_tokens",
"output_tokens",
"reasoning_tokens",
"total_tokens"
],
"type": "object"
},
"turn_type": {
"type": "string"
}
},
"type": "object"
}
],
"description": "Data is the HAST-owned payload union; Type selects its required shape as\ndefined in docs/reference/task-agent-event-v2.md."
},
"engine": {
"enum": [
"codex_cli",
"pi_agent_cli"
],
"example": "codex_cli",
"type": "string"
},
"event_id": {
"example": "evt_123",
"type": "string"
},
"replayable": {
"example": true,
"type": "boolean"
},
"run_id": {
"example": "run_123",
"type": "string"
},
"schema_version": {
"enum": [
2
],
"example": 2,
"type": "integer"
},
"sequence": {
"description": "Sequence is a positive durable order, or null for volatile events.",
"example": 42,
"minimum": 1,
"type": "integer",
"x-nullable": true
},
"session_id": {
"example": "session_123",
"type": "string"
},
"source": {
"enum": [
"runtime",
"backplane",
"workspace"
],
"example": "runtime",
"type": "string"
},
"task_id": {
"example": "task_123",
"type": "string"
},
"type": {
"enum": [
"runtime.status",
"run.queued",
"run.started",
"run.retrying",
"run.completed",
"run.failed",
"run.interrupted",
"message.started",
"message.delta",
"message.completed",
"reasoning.started",
"reasoning.delta",
"reasoning.completed",
"tool.started",
"tool.updated",
"tool.completed",
"plan.updated",
"plan.completed",
"usage.updated",
"file.changed",
"input.requested",
"context.compacted",
"warning",
"error"
],
"example": "message.completed",
"type": "string"
}
},
"required": [
"created_at",
"data",
"engine",
"event_id",
"replayable",
"schema_version",
"sequence",
"source",
"task_id",
"type"
],
"type": "object"
},
"type": "array"
},
"has_more": {
"example": true,
"type": "boolean"
},
"next_after": {
"example": 42,
"format": "int64",
"type": "integer",
"x-nullable": true
}
},
"type": "object"
}連携ガイド
GET /api/public/v1/guidesDiscover Agent-facing Hast AIP guides
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
仕様に引数の定義はありません。
応答
200 OK
{
"additionalProperties": true,
"type": "object"
}GET /api/public/v1/guides/{topic}Read a detailed Hast AIP guide for Agents
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
topic · path · 必須
{
"description": "Topic from GET /guides",
"in": "path",
"name": "topic",
"required": true,
"type": "string"
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}モデル
GET /api/public/v1/modelsList Task Agent Models
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
仕様に引数の定義はありません。
応答
200 OK
{
"additionalProperties": true,
"type": "object"
}Agent 設定
GET /api/public/v1/webhooksList public Task Agent Webhooks
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
仕様に引数の定義はありません。
応答
200 OK
{
"properties": {
"hooks": {
"items": {
"properties": {
"communication_knowledge_base_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"created_at": {
"type": "string"
},
"created_by": {
"properties": {
"account_id": {
"type": "string"
},
"api_key_id": {
"type": "string"
},
"api_key_name": {
"type": "string"
},
"email": {
"type": "string"
},
"profile_id": {
"type": "string"
}
},
"type": "object"
},
"crm_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"description": {
"type": "string"
},
"dynamic_tools": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"hook_id": {
"example": "hook_123",
"type": "string"
},
"knowledge_base_list": {
"items": {
"type": "string"
},
"type": "array"
},
"memory": {
"properties": {
"read_scope": {
"enum": [
"self",
"webhook",
"all"
],
"example": "self",
"type": "string"
},
"write_scope": {
"enum": [
"self",
"shared"
],
"example": "self",
"type": "string"
}
},
"type": "object"
},
"model": {
"type": "string"
},
"model_source": {
"type": "string"
},
"policies": {
"items": {
"type": "string"
},
"type": "array"
},
"reasoning_effort": {
"type": "string"
},
"runtime_tools": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"sandbox_mode": {
"type": "string"
},
"secret_bindings": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"secrets": {
"items": {
"properties": {
"name": {
"example": "CRM_TOKEN",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"selected_skills": {
"items": {
"properties": {
"enabled": {
"type": "boolean"
},
"skill_id": {
"example": "usr_123",
"type": "string"
},
"source": {
"example": "user",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"status": {
"type": "string"
},
"system_prompt": {
"type": "string"
},
"title": {
"type": "string"
},
"token_usage": {
"properties": {
"cache_read_tokens": {
"type": "integer"
},
"cache_write_tokens": {
"type": "integer"
},
"cost_status": {
"type": "string"
},
"estimated_cost_usd": {
"type": "number"
},
"input_tokens": {
"type": "integer"
},
"output_tokens": {
"type": "integer"
},
"reasoning_tokens": {
"type": "integer"
},
"reported_sessions": {
"type": "integer"
},
"total_tokens": {
"type": "integer"
},
"unpriced_tokens": {
"type": "integer"
},
"unreported_sessions": {
"type": "integer"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
},
"updated_at": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"pagination": {
"additionalProperties": {},
"type": "object"
},
"policy_options": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}POST /api/public/v1/webhooksCreate a public Task Agent Webhook
リクエスト形式: application/json; 応答形式: application/json.
引数
request · body · 必須
{
"description": "Webhook request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"communication_knowledge_base_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"crm_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"description": {
"type": "string"
},
"dynamic_tools": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"hook_id": {
"example": "hook_123",
"type": "string"
},
"http_request": {
"additionalProperties": {},
"type": "object"
},
"knowledge_base_list": {
"items": {
"type": "string"
},
"type": "array"
},
"memory": {
"properties": {
"read_scope": {
"enum": [
"self",
"webhook",
"all"
],
"example": "self",
"type": "string"
},
"write_scope": {
"enum": [
"self",
"shared"
],
"example": "self",
"type": "string"
}
},
"type": "object"
},
"model": {
"example": "hast/auto",
"type": "string"
},
"model_source": {
"type": "string"
},
"policies": {
"items": {
"type": "string"
},
"type": "array"
},
"reasoning_effort": {
"example": "medium",
"type": "string"
},
"runtime_tools": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"sandbox_mode": {
"example": "read_only",
"type": "string"
},
"secret_bindings": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"secrets": {
"items": {
"properties": {
"name": {
"example": "CRM_TOKEN",
"type": "string"
},
"value": {
"example": "write-only",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"selected_skills": {
"items": {
"properties": {
"enabled": {
"type": "boolean"
},
"skill_id": {
"example": "usr_123",
"type": "string"
},
"source": {
"example": "user",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"status": {
"example": "active",
"type": "string"
},
"system_prompt": {
"type": "string"
},
"title": {
"example": "Support Agent",
"type": "string"
}
},
"type": "object"
}
}応答
201 Created
{
"properties": {
"hook": {
"properties": {
"communication_knowledge_base_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"created_at": {
"type": "string"
},
"created_by": {
"properties": {
"account_id": {
"type": "string"
},
"api_key_id": {
"type": "string"
},
"api_key_name": {
"type": "string"
},
"email": {
"type": "string"
},
"profile_id": {
"type": "string"
}
},
"type": "object"
},
"crm_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"description": {
"type": "string"
},
"dynamic_tools": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"hook_id": {
"example": "hook_123",
"type": "string"
},
"knowledge_base_list": {
"items": {
"type": "string"
},
"type": "array"
},
"memory": {
"properties": {
"read_scope": {
"enum": [
"self",
"webhook",
"all"
],
"example": "self",
"type": "string"
},
"write_scope": {
"enum": [
"self",
"shared"
],
"example": "self",
"type": "string"
}
},
"type": "object"
},
"model": {
"type": "string"
},
"model_source": {
"type": "string"
},
"policies": {
"items": {
"type": "string"
},
"type": "array"
},
"reasoning_effort": {
"type": "string"
},
"runtime_tools": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"sandbox_mode": {
"type": "string"
},
"secret_bindings": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"secrets": {
"items": {
"properties": {
"name": {
"example": "CRM_TOKEN",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"selected_skills": {
"items": {
"properties": {
"enabled": {
"type": "boolean"
},
"skill_id": {
"example": "usr_123",
"type": "string"
},
"source": {
"example": "user",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"status": {
"type": "string"
},
"system_prompt": {
"type": "string"
},
"title": {
"type": "string"
},
"token_usage": {
"properties": {
"cache_read_tokens": {
"type": "integer"
},
"cache_write_tokens": {
"type": "integer"
},
"cost_status": {
"type": "string"
},
"estimated_cost_usd": {
"type": "number"
},
"input_tokens": {
"type": "integer"
},
"output_tokens": {
"type": "integer"
},
"reasoning_tokens": {
"type": "integer"
},
"reported_sessions": {
"type": "integer"
},
"total_tokens": {
"type": "integer"
},
"unpriced_tokens": {
"type": "integer"
},
"unreported_sessions": {
"type": "integer"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
},
"updated_at": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"policy_options": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}GET /api/public/v1/webhooks/{hook_id}Read a public Task Agent Webhook
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
hook_id · path · 必須
{
"description": "Webhook ID",
"in": "path",
"name": "hook_id",
"required": true,
"type": "string"
}応答
200 OK
{
"properties": {
"hook": {
"properties": {
"communication_knowledge_base_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"created_at": {
"type": "string"
},
"created_by": {
"properties": {
"account_id": {
"type": "string"
},
"api_key_id": {
"type": "string"
},
"api_key_name": {
"type": "string"
},
"email": {
"type": "string"
},
"profile_id": {
"type": "string"
}
},
"type": "object"
},
"crm_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"description": {
"type": "string"
},
"dynamic_tools": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"hook_id": {
"example": "hook_123",
"type": "string"
},
"knowledge_base_list": {
"items": {
"type": "string"
},
"type": "array"
},
"memory": {
"properties": {
"read_scope": {
"enum": [
"self",
"webhook",
"all"
],
"example": "self",
"type": "string"
},
"write_scope": {
"enum": [
"self",
"shared"
],
"example": "self",
"type": "string"
}
},
"type": "object"
},
"model": {
"type": "string"
},
"model_source": {
"type": "string"
},
"policies": {
"items": {
"type": "string"
},
"type": "array"
},
"reasoning_effort": {
"type": "string"
},
"runtime_tools": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"sandbox_mode": {
"type": "string"
},
"secret_bindings": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"secrets": {
"items": {
"properties": {
"name": {
"example": "CRM_TOKEN",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"selected_skills": {
"items": {
"properties": {
"enabled": {
"type": "boolean"
},
"skill_id": {
"example": "usr_123",
"type": "string"
},
"source": {
"example": "user",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"status": {
"type": "string"
},
"system_prompt": {
"type": "string"
},
"title": {
"type": "string"
},
"token_usage": {
"properties": {
"cache_read_tokens": {
"type": "integer"
},
"cache_write_tokens": {
"type": "integer"
},
"cost_status": {
"type": "string"
},
"estimated_cost_usd": {
"type": "number"
},
"input_tokens": {
"type": "integer"
},
"output_tokens": {
"type": "integer"
},
"reasoning_tokens": {
"type": "integer"
},
"reported_sessions": {
"type": "integer"
},
"total_tokens": {
"type": "integer"
},
"unpriced_tokens": {
"type": "integer"
},
"unreported_sessions": {
"type": "integer"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
},
"updated_at": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"policy_options": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}PUT /api/public/v1/webhooks/{hook_id}Update a public Task Agent Webhook
リクエスト形式: application/json; 応答形式: application/json.
引数
hook_id · path · 必須
{
"description": "Webhook ID",
"in": "path",
"name": "hook_id",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Webhook request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"communication_knowledge_base_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"crm_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"description": {
"type": "string"
},
"dynamic_tools": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"hook_id": {
"example": "hook_123",
"type": "string"
},
"http_request": {
"additionalProperties": {},
"type": "object"
},
"knowledge_base_list": {
"items": {
"type": "string"
},
"type": "array"
},
"memory": {
"properties": {
"read_scope": {
"enum": [
"self",
"webhook",
"all"
],
"example": "self",
"type": "string"
},
"write_scope": {
"enum": [
"self",
"shared"
],
"example": "self",
"type": "string"
}
},
"type": "object"
},
"model": {
"example": "hast/auto",
"type": "string"
},
"model_source": {
"type": "string"
},
"policies": {
"items": {
"type": "string"
},
"type": "array"
},
"reasoning_effort": {
"example": "medium",
"type": "string"
},
"runtime_tools": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"sandbox_mode": {
"example": "read_only",
"type": "string"
},
"secret_bindings": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"secrets": {
"items": {
"properties": {
"name": {
"example": "CRM_TOKEN",
"type": "string"
},
"value": {
"example": "write-only",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"selected_skills": {
"items": {
"properties": {
"enabled": {
"type": "boolean"
},
"skill_id": {
"example": "usr_123",
"type": "string"
},
"source": {
"example": "user",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"status": {
"example": "active",
"type": "string"
},
"system_prompt": {
"type": "string"
},
"title": {
"example": "Support Agent",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"hook": {
"properties": {
"communication_knowledge_base_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"created_at": {
"type": "string"
},
"created_by": {
"properties": {
"account_id": {
"type": "string"
},
"api_key_id": {
"type": "string"
},
"api_key_name": {
"type": "string"
},
"email": {
"type": "string"
},
"profile_id": {
"type": "string"
}
},
"type": "object"
},
"crm_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"description": {
"type": "string"
},
"dynamic_tools": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"hook_id": {
"example": "hook_123",
"type": "string"
},
"knowledge_base_list": {
"items": {
"type": "string"
},
"type": "array"
},
"memory": {
"properties": {
"read_scope": {
"enum": [
"self",
"webhook",
"all"
],
"example": "self",
"type": "string"
},
"write_scope": {
"enum": [
"self",
"shared"
],
"example": "self",
"type": "string"
}
},
"type": "object"
},
"model": {
"type": "string"
},
"model_source": {
"type": "string"
},
"policies": {
"items": {
"type": "string"
},
"type": "array"
},
"reasoning_effort": {
"type": "string"
},
"runtime_tools": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"sandbox_mode": {
"type": "string"
},
"secret_bindings": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"secrets": {
"items": {
"properties": {
"name": {
"example": "CRM_TOKEN",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"selected_skills": {
"items": {
"properties": {
"enabled": {
"type": "boolean"
},
"skill_id": {
"example": "usr_123",
"type": "string"
},
"source": {
"example": "user",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"status": {
"type": "string"
},
"system_prompt": {
"type": "string"
},
"title": {
"type": "string"
},
"token_usage": {
"properties": {
"cache_read_tokens": {
"type": "integer"
},
"cache_write_tokens": {
"type": "integer"
},
"cost_status": {
"type": "string"
},
"estimated_cost_usd": {
"type": "number"
},
"input_tokens": {
"type": "integer"
},
"output_tokens": {
"type": "integer"
},
"reasoning_tokens": {
"type": "integer"
},
"reported_sessions": {
"type": "integer"
},
"total_tokens": {
"type": "integer"
},
"unpriced_tokens": {
"type": "integer"
},
"unreported_sessions": {
"type": "integer"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
},
"updated_at": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"policy_options": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}PATCH /api/public/v1/webhooks/{hook_id}Update a public Task Agent Webhook
リクエスト形式: application/json; 応答形式: application/json.
引数
hook_id · path · 必須
{
"description": "Webhook ID",
"in": "path",
"name": "hook_id",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Webhook request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"communication_knowledge_base_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"crm_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"description": {
"type": "string"
},
"dynamic_tools": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"hook_id": {
"example": "hook_123",
"type": "string"
},
"http_request": {
"additionalProperties": {},
"type": "object"
},
"knowledge_base_list": {
"items": {
"type": "string"
},
"type": "array"
},
"memory": {
"properties": {
"read_scope": {
"enum": [
"self",
"webhook",
"all"
],
"example": "self",
"type": "string"
},
"write_scope": {
"enum": [
"self",
"shared"
],
"example": "self",
"type": "string"
}
},
"type": "object"
},
"model": {
"example": "hast/auto",
"type": "string"
},
"model_source": {
"type": "string"
},
"policies": {
"items": {
"type": "string"
},
"type": "array"
},
"reasoning_effort": {
"example": "medium",
"type": "string"
},
"runtime_tools": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"sandbox_mode": {
"example": "read_only",
"type": "string"
},
"secret_bindings": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"secrets": {
"items": {
"properties": {
"name": {
"example": "CRM_TOKEN",
"type": "string"
},
"value": {
"example": "write-only",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"selected_skills": {
"items": {
"properties": {
"enabled": {
"type": "boolean"
},
"skill_id": {
"example": "usr_123",
"type": "string"
},
"source": {
"example": "user",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"status": {
"example": "active",
"type": "string"
},
"system_prompt": {
"type": "string"
},
"title": {
"example": "Support Agent",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"hook": {
"properties": {
"communication_knowledge_base_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"created_at": {
"type": "string"
},
"created_by": {
"properties": {
"account_id": {
"type": "string"
},
"api_key_id": {
"type": "string"
},
"api_key_name": {
"type": "string"
},
"email": {
"type": "string"
},
"profile_id": {
"type": "string"
}
},
"type": "object"
},
"crm_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"description": {
"type": "string"
},
"dynamic_tools": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"hook_id": {
"example": "hook_123",
"type": "string"
},
"knowledge_base_list": {
"items": {
"type": "string"
},
"type": "array"
},
"memory": {
"properties": {
"read_scope": {
"enum": [
"self",
"webhook",
"all"
],
"example": "self",
"type": "string"
},
"write_scope": {
"enum": [
"self",
"shared"
],
"example": "self",
"type": "string"
}
},
"type": "object"
},
"model": {
"type": "string"
},
"model_source": {
"type": "string"
},
"policies": {
"items": {
"type": "string"
},
"type": "array"
},
"reasoning_effort": {
"type": "string"
},
"runtime_tools": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"sandbox_mode": {
"type": "string"
},
"secret_bindings": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"secrets": {
"items": {
"properties": {
"name": {
"example": "CRM_TOKEN",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"selected_skills": {
"items": {
"properties": {
"enabled": {
"type": "boolean"
},
"skill_id": {
"example": "usr_123",
"type": "string"
},
"source": {
"example": "user",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"status": {
"type": "string"
},
"system_prompt": {
"type": "string"
},
"title": {
"type": "string"
},
"token_usage": {
"properties": {
"cache_read_tokens": {
"type": "integer"
},
"cache_write_tokens": {
"type": "integer"
},
"cost_status": {
"type": "string"
},
"estimated_cost_usd": {
"type": "number"
},
"input_tokens": {
"type": "integer"
},
"output_tokens": {
"type": "integer"
},
"reasoning_tokens": {
"type": "integer"
},
"reported_sessions": {
"type": "integer"
},
"total_tokens": {
"type": "integer"
},
"unpriced_tokens": {
"type": "integer"
},
"unreported_sessions": {
"type": "integer"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
},
"updated_at": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"policy_options": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}DELETE /api/public/v1/webhooks/{hook_id}Delete a public Task Agent Webhook
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
hook_id · path · 必須
{
"description": "Webhook ID",
"in": "path",
"name": "hook_id",
"required": true,
"type": "string"
}応答
204 No Content
GET /api/public/v1/webhooks/{hook_id}/channelsRead Webhook channels and final reply configuration
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
hook_id · path · 必須
{
"description": "Webhook ID",
"in": "path",
"name": "hook_id",
"required": true,
"type": "string"
}応答
PUT /api/public/v1/webhooks/{hook_id}/channelsReplace Webhook channels and final reply configuration
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
hook_id · path · 必須
{
"description": "Webhook ID",
"in": "path",
"name": "hook_id",
"required": true,
"type": "string"
}body · body · 必須
{
"description": "Bindings and final reply policy",
"in": "body",
"name": "body",
"required": true,
"schema": {
"properties": {
"connection_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"memory_project_ids": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
}
}応答
GET /api/public/v1/webhooks/{hook_id}/emailRead an Agent email channel
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
hook_id · path · 必須
{
"description": "Agent ID",
"in": "path",
"name": "hook_id",
"required": true,
"type": "string"
}応答
200 OK
{
"properties": {
"connection": {
"properties": {
"binding_version": {
"type": "integer"
},
"bound_hook_id": {
"type": "string"
},
"bound_hook_status": {
"type": "string"
},
"bound_hook_title": {
"type": "string"
},
"created_at": {
"type": "string"
},
"email_address": {
"type": "string"
},
"email_hook_id": {
"type": "string"
},
"id": {
"type": "string"
},
"inbox_id": {
"type": "integer"
},
"name": {
"type": "string"
},
"platform": {
"type": "string"
},
"require_admission": {
"type": "boolean"
},
"retain_content": {
"type": "boolean"
},
"setup_required": {
"type": "boolean"
},
"status": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
},
"email": {
"properties": {
"address": {
"type": "string"
},
"connection_id": {
"type": "string"
},
"created_at": {
"type": "string"
},
"hook_id": {
"type": "string"
},
"rules": {
"properties": {
"automatic_reply": {
"type": "boolean"
},
"mode": {
"type": "string"
},
"rules": {
"items": {
"properties": {
"body_keywords": {
"items": {
"type": "string"
},
"type": "array"
},
"domains": {
"items": {
"type": "string"
},
"type": "array"
},
"id": {
"type": "string"
},
"senders": {
"items": {
"type": "string"
},
"type": "array"
},
"subject_keywords": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"rules_version": {
"type": "integer"
},
"source_id": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}POST /api/public/v1/webhooks/{hook_id}/emailPrepare an Agent email channel
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
hook_id · path · 必須
{
"description": "Agent ID",
"in": "path",
"name": "hook_id",
"required": true,
"type": "string"
}応答
200 OK
{
"properties": {
"connection": {
"properties": {
"binding_version": {
"type": "integer"
},
"bound_hook_id": {
"type": "string"
},
"bound_hook_status": {
"type": "string"
},
"bound_hook_title": {
"type": "string"
},
"created_at": {
"type": "string"
},
"email_address": {
"type": "string"
},
"email_hook_id": {
"type": "string"
},
"id": {
"type": "string"
},
"inbox_id": {
"type": "integer"
},
"name": {
"type": "string"
},
"platform": {
"type": "string"
},
"require_admission": {
"type": "boolean"
},
"retain_content": {
"type": "boolean"
},
"setup_required": {
"type": "boolean"
},
"status": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
},
"email": {
"properties": {
"address": {
"type": "string"
},
"connection_id": {
"type": "string"
},
"created_at": {
"type": "string"
},
"hook_id": {
"type": "string"
},
"rules": {
"properties": {
"automatic_reply": {
"type": "boolean"
},
"mode": {
"type": "string"
},
"rules": {
"items": {
"properties": {
"body_keywords": {
"items": {
"type": "string"
},
"type": "array"
},
"domains": {
"items": {
"type": "string"
},
"type": "array"
},
"id": {
"type": "string"
},
"senders": {
"items": {
"type": "string"
},
"type": "array"
},
"subject_keywords": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"rules_version": {
"type": "integer"
},
"source_id": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}PATCH /api/public/v1/webhooks/{hook_id}/emailUpdate Agent email triggers
リクエスト形式: application/json; 応答形式: application/json.
引数
hook_id · path · 必須
{
"description": "Agent ID",
"in": "path",
"name": "hook_id",
"required": true,
"type": "string"
}body · body · 必須
{
"description": "Rules and expected version",
"in": "body",
"name": "body",
"required": true,
"schema": {
"properties": {
"rules": {
"properties": {
"automatic_reply": {
"type": "boolean"
},
"mode": {
"type": "string"
},
"rules": {
"items": {
"properties": {
"body_keywords": {
"items": {
"type": "string"
},
"type": "array"
},
"domains": {
"items": {
"type": "string"
},
"type": "array"
},
"id": {
"type": "string"
},
"senders": {
"items": {
"type": "string"
},
"type": "array"
},
"subject_keywords": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"rules_version": {
"type": "integer"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"connection": {
"properties": {
"binding_version": {
"type": "integer"
},
"bound_hook_id": {
"type": "string"
},
"bound_hook_status": {
"type": "string"
},
"bound_hook_title": {
"type": "string"
},
"created_at": {
"type": "string"
},
"email_address": {
"type": "string"
},
"email_hook_id": {
"type": "string"
},
"id": {
"type": "string"
},
"inbox_id": {
"type": "integer"
},
"name": {
"type": "string"
},
"platform": {
"type": "string"
},
"require_admission": {
"type": "boolean"
},
"retain_content": {
"type": "boolean"
},
"setup_required": {
"type": "boolean"
},
"status": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
},
"email": {
"properties": {
"address": {
"type": "string"
},
"connection_id": {
"type": "string"
},
"created_at": {
"type": "string"
},
"hook_id": {
"type": "string"
},
"rules": {
"properties": {
"automatic_reply": {
"type": "boolean"
},
"mode": {
"type": "string"
},
"rules": {
"items": {
"properties": {
"body_keywords": {
"items": {
"type": "string"
},
"type": "array"
},
"domains": {
"items": {
"type": "string"
},
"type": "array"
},
"id": {
"type": "string"
},
"senders": {
"items": {
"type": "string"
},
"type": "array"
},
"subject_keywords": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"rules_version": {
"type": "integer"
},
"source_id": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}GET /api/public/v1/webhooks/{hook_id}/email/messagesList Agent email messages
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
hook_id · path · 必須
{
"description": "Agent ID",
"in": "path",
"name": "hook_id",
"required": true,
"type": "string"
}before · query · 任意
{
"description": "Message cursor",
"in": "query",
"name": "before",
"type": "integer"
}応答
GET /api/public/v1/webhooks/{hook_id}/email/messages/{message_id}Read an Agent email message
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
hook_id · path · 必須
{
"description": "Agent ID",
"in": "path",
"name": "hook_id",
"required": true,
"type": "string"
}message_id · path · 必須
{
"description": "Retained email ID",
"in": "path",
"name": "message_id",
"required": true,
"type": "integer"
}応答
POST /api/public/v1/webhooks/{hook_id}/email/previewPreview email trigger matching
リクエスト形式: application/json; 応答形式: application/json.
引数
hook_id · path · 必須
{
"description": "Agent ID",
"in": "path",
"name": "hook_id",
"required": true,
"type": "string"
}body · body · 必須
{
"description": "Retained message and proposed rules",
"in": "body",
"name": "body",
"required": true,
"schema": {
"properties": {
"message_id": {
"type": "integer"
},
"rules": {
"properties": {
"automatic_reply": {
"type": "boolean"
},
"mode": {
"type": "string"
},
"rules": {
"items": {
"properties": {
"body_keywords": {
"items": {
"type": "string"
},
"type": "array"
},
"domains": {
"items": {
"type": "string"
},
"type": "array"
},
"id": {
"type": "string"
},
"senders": {
"items": {
"type": "string"
},
"type": "array"
},
"subject_keywords": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"reason": {
"type": "string"
},
"rule_id": {
"type": "string"
},
"wake": {
"type": "boolean"
}
},
"type": "object"
}POST /api/public/v1/webhooks/{hook_id}/invokeRun or continue a saved AIP Agent
action=created starts a session; prompted continues or stops it. Poll the session events endpoint for completion. A 202 response means accepted, not completed.
リクエスト形式: application/json; 応答形式: application/json.
引数
hook_id · path · 必須
{
"description": "Owned Agent Hook ID",
"in": "path",
"name": "hook_id",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Agent invocation",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"action": {
"enum": [
"created",
"prompted"
],
"type": "string"
},
"payload": {
"properties": {
"after_event_id": {
"type": "integer"
},
"context": {},
"knowledge_base_list": {
"items": {
"type": "string"
},
"type": "array"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"model_config": {
"additionalProperties": {},
"type": "object"
},
"prompt": {
"type": "string"
},
"request_id": {
"type": "string"
},
"session_id": {
"type": "string"
},
"signal": {
"type": "string"
},
"system_prompt": {
"type": "string"
}
},
"type": "object"
}
},
"required": [
"action",
"payload"
],
"type": "object"
}
}応答
202 Accepted
{
"properties": {
"after_event_id": {
"type": "integer"
},
"event_url": {
"type": "string"
},
"request_id": {
"type": "string"
},
"run_id": {
"type": "string"
},
"session_id": {
"type": "string"
}
},
"type": "object"
}PATCH /api/public/v1/webhooks/{hook_id}/memoryUpdate only the owned webhook's Memory settings
リクエスト形式: application/json; 応答形式: application/json.
引数
hook_id · path · 必須
{
"description": "Webhook ID",
"in": "path",
"name": "hook_id",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Memory settings; shared writes require webhook or all reads",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"read_scope": {
"enum": [
"self",
"webhook",
"all"
],
"example": "self",
"type": "string"
},
"write_scope": {
"enum": [
"self",
"shared"
],
"example": "self",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"hook": {
"properties": {
"communication_knowledge_base_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"created_at": {
"type": "string"
},
"created_by": {
"properties": {
"account_id": {
"type": "string"
},
"api_key_id": {
"type": "string"
},
"api_key_name": {
"type": "string"
},
"email": {
"type": "string"
},
"profile_id": {
"type": "string"
}
},
"type": "object"
},
"crm_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"description": {
"type": "string"
},
"dynamic_tools": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"hook_id": {
"example": "hook_123",
"type": "string"
},
"knowledge_base_list": {
"items": {
"type": "string"
},
"type": "array"
},
"memory": {
"properties": {
"read_scope": {
"enum": [
"self",
"webhook",
"all"
],
"example": "self",
"type": "string"
},
"write_scope": {
"enum": [
"self",
"shared"
],
"example": "self",
"type": "string"
}
},
"type": "object"
},
"model": {
"type": "string"
},
"model_source": {
"type": "string"
},
"policies": {
"items": {
"type": "string"
},
"type": "array"
},
"reasoning_effort": {
"type": "string"
},
"runtime_tools": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"sandbox_mode": {
"type": "string"
},
"secret_bindings": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"secrets": {
"items": {
"properties": {
"name": {
"example": "CRM_TOKEN",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"selected_skills": {
"items": {
"properties": {
"enabled": {
"type": "boolean"
},
"skill_id": {
"example": "usr_123",
"type": "string"
},
"source": {
"example": "user",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"status": {
"type": "string"
},
"system_prompt": {
"type": "string"
},
"title": {
"type": "string"
},
"token_usage": {
"properties": {
"cache_read_tokens": {
"type": "integer"
},
"cache_write_tokens": {
"type": "integer"
},
"cost_status": {
"type": "string"
},
"estimated_cost_usd": {
"type": "number"
},
"input_tokens": {
"type": "integer"
},
"output_tokens": {
"type": "integer"
},
"reasoning_tokens": {
"type": "integer"
},
"reported_sessions": {
"type": "integer"
},
"total_tokens": {
"type": "integer"
},
"unpriced_tokens": {
"type": "integer"
},
"unreported_sessions": {
"type": "integer"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
},
"updated_at": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"policy_options": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}400 Bad Request
{
"properties": {
"code": {
"description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
"example": 0,
"type": "integer"
},
"message": {
"description": "Message is a human-readable status or error description.",
"example": "ok",
"type": "string"
}
},
"type": "object"
}404 Not Found
{
"properties": {
"code": {
"description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
"example": 0,
"type": "integer"
},
"message": {
"description": "Message is a human-readable status or error description.",
"example": "ok",
"type": "string"
}
},
"type": "object"
}GET /api/public/v1/webhooks/{hook_id}/sessions/{session_id}/eventsRead an AIP Agent session's events
Poll with the returned next_after cursor until run.completed, run.failed or run.interrupted. Match the requested request_id. Reads remain scoped to the key's Profile and selected Agent.
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
hook_id · path · 必須
{
"description": "Owned Agent Hook ID",
"in": "path",
"name": "hook_id",
"required": true,
"type": "string"
}session_id · path · 必須
{
"description": "Session ID returned by invoke",
"in": "path",
"name": "session_id",
"required": true,
"type": "string"
}after · query · 任意
{
"description": "Last consumed event sequence",
"in": "query",
"name": "after",
"type": "integer"
}limit · query · 任意
{
"description": "Page size (max 200)",
"in": "query",
"name": "limit",
"type": "integer"
}応答
200 OK
{
"properties": {
"events": {
"items": {
"discriminator": "type",
"properties": {
"created_at": {
"example": "2026-08-16T12:00:00Z",
"format": "date-time",
"type": "string"
},
"data": {
"allOf": [
{
"properties": {
"attempt": {
"minimum": 1,
"type": "integer"
},
"attempts": {
"minimum": 1,
"type": "integer"
},
"channel": {
"enum": [
"stdout",
"stderr",
"progress"
],
"type": "string"
},
"code": {
"type": "string"
},
"context_window": {
"minimum": 0,
"type": "integer"
},
"cost": {},
"delta": {
"type": "string"
},
"duration_ms": {
"minimum": 0,
"type": "integer"
},
"error": {
"type": "string"
},
"exit_code": {
"type": "integer"
},
"files": {
"items": {
"type": "string"
},
"type": "array"
},
"final_message_id": {
"type": "string"
},
"finish_reason": {
"type": "string"
},
"input": {},
"is_error": {
"type": "boolean"
},
"kind": {
"type": "string"
},
"last": {
"properties": {
"cache_read_tokens": {
"minimum": 0,
"type": "integer"
},
"cache_write_tokens": {
"minimum": 0,
"type": "integer"
},
"input_tokens": {
"minimum": 0,
"type": "integer"
},
"output_tokens": {
"minimum": 0,
"type": "integer"
},
"reasoning_tokens": {
"minimum": 0,
"type": "integer"
},
"total_tokens": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"cache_read_tokens",
"cache_write_tokens",
"input_tokens",
"output_tokens",
"reasoning_tokens",
"total_tokens"
],
"type": "object"
},
"message": {
"type": "string"
},
"message_id": {
"type": "string"
},
"model": {
"type": "string"
},
"model_config": {
"properties": {
"model": {
"type": "string"
},
"model_source": {
"enum": [
"hast",
"codex_account"
],
"type": "string"
},
"reasoning_effort": {
"type": "string"
}
},
"type": "object"
},
"model_source": {
"type": "string"
},
"modified_at": {
"format": "date-time",
"type": "string"
},
"name": {
"type": "string"
},
"operation": {
"enum": [
"update",
"delete"
],
"type": "string"
},
"options": {
"items": {},
"type": "array"
},
"output": {},
"parent_tool_call_id": {
"type": "string"
},
"path": {
"type": "string"
},
"plan_id": {
"type": "string"
},
"prompt": {
"type": "string"
},
"reason": {
"type": "string"
},
"reasoning_id": {
"type": "string"
},
"request_id": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"role": {
"enum": [
"user",
"assistant",
"system"
],
"type": "string"
},
"scope": {
"type": "string"
},
"size_bytes": {
"minimum": 0,
"type": "integer"
},
"status": {
"enum": [
"starting",
"ready",
"failed",
"released",
"succeeded",
"interrupted"
],
"type": "string"
},
"steps": {
"items": {
"properties": {
"status": {
"enum": [
"pending",
"in_progress",
"completed"
],
"example": "in_progress",
"type": "string"
},
"step": {
"type": "string"
}
},
"required": [
"status",
"step"
],
"type": "object"
},
"type": "array"
},
"text": {
"type": "string"
},
"tokens_after": {
"minimum": 0,
"type": "integer"
},
"tokens_before": {
"minimum": 0,
"type": "integer"
},
"tool_call_id": {
"type": "string"
},
"total": {
"properties": {
"cache_read_tokens": {
"minimum": 0,
"type": "integer"
},
"cache_write_tokens": {
"minimum": 0,
"type": "integer"
},
"input_tokens": {
"minimum": 0,
"type": "integer"
},
"output_tokens": {
"minimum": 0,
"type": "integer"
},
"reasoning_tokens": {
"minimum": 0,
"type": "integer"
},
"total_tokens": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"cache_read_tokens",
"cache_write_tokens",
"input_tokens",
"output_tokens",
"reasoning_tokens",
"total_tokens"
],
"type": "object"
},
"turn_type": {
"type": "string"
}
},
"type": "object"
}
],
"description": "Data is the HAST-owned payload union; Type selects its required shape as\ndefined in docs/reference/task-agent-event-v2.md."
},
"engine": {
"enum": [
"codex_cli",
"pi_agent_cli"
],
"example": "codex_cli",
"type": "string"
},
"event_id": {
"example": "evt_123",
"type": "string"
},
"replayable": {
"example": true,
"type": "boolean"
},
"run_id": {
"example": "run_123",
"type": "string"
},
"schema_version": {
"enum": [
2
],
"example": 2,
"type": "integer"
},
"sequence": {
"description": "Sequence is a positive durable order, or null for volatile events.",
"example": 42,
"minimum": 1,
"type": "integer",
"x-nullable": true
},
"session_id": {
"example": "session_123",
"type": "string"
},
"source": {
"enum": [
"runtime",
"backplane",
"workspace"
],
"example": "runtime",
"type": "string"
},
"task_id": {
"example": "task_123",
"type": "string"
},
"type": {
"enum": [
"runtime.status",
"run.queued",
"run.started",
"run.retrying",
"run.completed",
"run.failed",
"run.interrupted",
"message.started",
"message.delta",
"message.completed",
"reasoning.started",
"reasoning.delta",
"reasoning.completed",
"tool.started",
"tool.updated",
"tool.completed",
"plan.updated",
"plan.completed",
"usage.updated",
"file.changed",
"input.requested",
"context.compacted",
"warning",
"error"
],
"example": "message.completed",
"type": "string"
}
},
"required": [
"created_at",
"data",
"engine",
"event_id",
"replayable",
"schema_version",
"sequence",
"source",
"task_id",
"type"
],
"type": "object"
},
"type": "array"
},
"has_more": {
"example": true,
"type": "boolean"
},
"next_after": {
"example": 42,
"format": "int64",
"type": "integer",
"x-nullable": true
}
},
"type": "object"
}スケジュール
GET /api/public/v1/schedulesList Task Agent schedules
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
limit · query · 任意
{
"description": "Schedule page size",
"in": "query",
"name": "limit",
"type": "integer"
}応答
200 OK
{
"properties": {
"schedules": {
"items": {
"properties": {
"config": {
"additionalProperties": {},
"type": "object"
},
"cron_spec": {
"type": "string"
},
"id": {
"type": "string"
},
"last_run_at": {
"type": "string"
},
"last_task_id": {
"type": "string"
},
"mode": {
"type": "string"
},
"next_run_at": {
"type": "string"
},
"prompt": {
"type": "string"
},
"status": {
"type": "string"
},
"timezone": {
"type": "string"
},
"title": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}POST /api/public/v1/schedulesCreate Task Agent schedule
リクエスト形式: application/json; 応答形式: application/json.
引数
request · body · 必須
{
"description": "Schedule request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"config": {
"additionalProperties": {},
"type": "object"
},
"cron_spec": {
"example": "0 15 * * 1",
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"mode": {
"example": "direct_execute",
"type": "string"
},
"next_run_at": {
"example": "2026-09-15T01:00:00Z",
"type": "string"
},
"prompt": {
"example": "Summarize the workspace.",
"type": "string"
},
"status": {
"example": "active",
"type": "string"
},
"timezone": {
"example": "Asia/Shanghai",
"type": "string"
},
"title": {
"example": "Weekly workspace report",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"schedule": {
"properties": {
"config": {
"additionalProperties": {},
"type": "object"
},
"cron_spec": {
"type": "string"
},
"id": {
"type": "string"
},
"last_run_at": {
"type": "string"
},
"last_task_id": {
"type": "string"
},
"mode": {
"type": "string"
},
"next_run_at": {
"type": "string"
},
"prompt": {
"type": "string"
},
"status": {
"type": "string"
},
"timezone": {
"type": "string"
},
"title": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}GET /api/public/v1/schedules/{scheduleID}Get Task Agent schedule
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
scheduleID · path · 必須
{
"description": "Schedule ID",
"in": "path",
"name": "scheduleID",
"required": true,
"type": "string"
}応答
200 OK
{
"properties": {
"schedule": {
"properties": {
"config": {
"additionalProperties": {},
"type": "object"
},
"cron_spec": {
"type": "string"
},
"id": {
"type": "string"
},
"last_run_at": {
"type": "string"
},
"last_task_id": {
"type": "string"
},
"mode": {
"type": "string"
},
"next_run_at": {
"type": "string"
},
"prompt": {
"type": "string"
},
"status": {
"type": "string"
},
"timezone": {
"type": "string"
},
"title": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}PUT /api/public/v1/schedules/{scheduleID}Update Task Agent schedule
リクエスト形式: application/json; 応答形式: application/json.
引数
scheduleID · path · 必須
{
"description": "Schedule ID",
"in": "path",
"name": "scheduleID",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Schedule request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"config": {
"additionalProperties": {},
"type": "object"
},
"cron_spec": {
"example": "0 15 * * 1",
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"mode": {
"example": "direct_execute",
"type": "string"
},
"next_run_at": {
"example": "2026-09-15T01:00:00Z",
"type": "string"
},
"prompt": {
"example": "Summarize the workspace.",
"type": "string"
},
"status": {
"example": "active",
"type": "string"
},
"timezone": {
"example": "Asia/Shanghai",
"type": "string"
},
"title": {
"example": "Weekly workspace report",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"schedule": {
"properties": {
"config": {
"additionalProperties": {},
"type": "object"
},
"cron_spec": {
"type": "string"
},
"id": {
"type": "string"
},
"last_run_at": {
"type": "string"
},
"last_task_id": {
"type": "string"
},
"mode": {
"type": "string"
},
"next_run_at": {
"type": "string"
},
"prompt": {
"type": "string"
},
"status": {
"type": "string"
},
"timezone": {
"type": "string"
},
"title": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}PATCH /api/public/v1/schedules/{scheduleID}Update Task Agent schedule
リクエスト形式: application/json; 応答形式: application/json.
引数
scheduleID · path · 必須
{
"description": "Schedule ID",
"in": "path",
"name": "scheduleID",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Schedule request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"config": {
"additionalProperties": {},
"type": "object"
},
"cron_spec": {
"example": "0 15 * * 1",
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"mode": {
"example": "direct_execute",
"type": "string"
},
"next_run_at": {
"example": "2026-09-15T01:00:00Z",
"type": "string"
},
"prompt": {
"example": "Summarize the workspace.",
"type": "string"
},
"status": {
"example": "active",
"type": "string"
},
"timezone": {
"example": "Asia/Shanghai",
"type": "string"
},
"title": {
"example": "Weekly workspace report",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"schedule": {
"properties": {
"config": {
"additionalProperties": {},
"type": "object"
},
"cron_spec": {
"type": "string"
},
"id": {
"type": "string"
},
"last_run_at": {
"type": "string"
},
"last_task_id": {
"type": "string"
},
"mode": {
"type": "string"
},
"next_run_at": {
"type": "string"
},
"prompt": {
"type": "string"
},
"status": {
"type": "string"
},
"timezone": {
"type": "string"
},
"title": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}DELETE /api/public/v1/schedules/{scheduleID}Delete Task Agent schedule
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
scheduleID · path · 必須
{
"description": "Schedule ID",
"in": "path",
"name": "scheduleID",
"required": true,
"type": "string"
}応答
200 OK
{
"properties": {
"ok": {
"example": true,
"type": "boolean"
}
},
"type": "object"
}GET /api/public/v1/schedules/{scheduleID}/runsList Task Agent schedule runs
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
scheduleID · path · 必須
{
"description": "Schedule ID",
"in": "path",
"name": "scheduleID",
"required": true,
"type": "string"
}limit · query · 任意
{
"description": "Run page size",
"in": "query",
"name": "limit",
"type": "integer"
}応答
200 OK
{
"properties": {
"runs": {
"items": {
"properties": {
"id": {
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"run_at": {
"type": "string"
},
"schedule_id": {
"type": "string"
},
"status": {
"type": "string"
},
"task_id": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}ナレッジベース
GET /api/public/v1/knowledge-basesList public Task Agent Knowledge Bases
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
page · query · 任意
{
"description": "Page number, default 1",
"in": "query",
"name": "page",
"type": "integer"
}page_size · query · 任意
{
"description": "Page size, default 20 and max 100",
"in": "query",
"name": "page_size",
"type": "integer"
}応答
200 OK
{
"properties": {
"knowledge_bases": {
"items": {
"properties": {
"cloudflare_instance_id": {
"example": "hast-kb-product-docs",
"type": "string"
},
"cloudflare_mcp_url": {
"example": "https://hast-kb-product-docs.search.ai.cloudflare.com/mcp",
"type": "string"
},
"cloudflare_public_endpoint_id": {
"example": "hast-kb-product-docs",
"type": "string"
},
"created_at": {
"type": "string"
},
"description": {
"type": "string"
},
"error_message": {
"type": "string"
},
"id": {
"example": "kb_123",
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"example": "Product docs",
"type": "string"
},
"source_content_type": {
"example": "text/markdown",
"type": "string"
},
"source_filename": {
"example": "docs.md",
"type": "string"
},
"source_type": {
"example": "url",
"type": "string"
},
"source_uri": {
"example": "https://example.com/docs.md",
"type": "string"
},
"status": {
"example": "indexed",
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"pagination": {
"properties": {
"has_more": {
"example": false,
"type": "boolean"
},
"limit": {
"example": 20,
"type": "integer"
},
"offset": {
"example": 0,
"type": "integer"
},
"page": {
"example": 1,
"type": "integer"
},
"page_size": {
"example": 20,
"type": "integer"
},
"total": {
"example": 1,
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
}POST /api/public/v1/knowledge-basesCreate a public Task Agent Knowledge Base
Creates a URL Knowledge Base with JSON or a file Knowledge Base with multipart/form-data. Indexing continues asynchronously.
リクエスト形式: application/json; 応答形式: application/json.
引数
request · body · 必須
{
"description": "URL Knowledge Base request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"description": {
"example": "Public product documentation",
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"example": "Product docs",
"type": "string"
},
"source_type": {
"example": "url",
"type": "string"
},
"url": {
"example": "https://example.com/docs.md",
"type": "string"
}
},
"type": "object"
}
}応答
201 Created
{
"properties": {
"knowledge_base": {
"properties": {
"cloudflare_instance_id": {
"example": "hast-kb-product-docs",
"type": "string"
},
"cloudflare_mcp_url": {
"example": "https://hast-kb-product-docs.search.ai.cloudflare.com/mcp",
"type": "string"
},
"cloudflare_public_endpoint_id": {
"example": "hast-kb-product-docs",
"type": "string"
},
"created_at": {
"type": "string"
},
"description": {
"type": "string"
},
"error_message": {
"type": "string"
},
"id": {
"example": "kb_123",
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"example": "Product docs",
"type": "string"
},
"source_content_type": {
"example": "text/markdown",
"type": "string"
},
"source_filename": {
"example": "docs.md",
"type": "string"
},
"source_type": {
"example": "url",
"type": "string"
},
"source_uri": {
"example": "https://example.com/docs.md",
"type": "string"
},
"status": {
"example": "indexed",
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}400 Bad Request
{
"properties": {
"code": {
"description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
"example": 0,
"type": "integer"
},
"message": {
"description": "Message is a human-readable status or error description.",
"example": "ok",
"type": "string"
}
},
"type": "object"
}GET /api/public/v1/knowledge-bases/{id}Read a public Task Agent Knowledge Base
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
id · path · 必須
{
"description": "Knowledge Base ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}応答
200 OK
{
"properties": {
"knowledge_base": {
"properties": {
"cloudflare_instance_id": {
"example": "hast-kb-product-docs",
"type": "string"
},
"cloudflare_mcp_url": {
"example": "https://hast-kb-product-docs.search.ai.cloudflare.com/mcp",
"type": "string"
},
"cloudflare_public_endpoint_id": {
"example": "hast-kb-product-docs",
"type": "string"
},
"created_at": {
"type": "string"
},
"description": {
"type": "string"
},
"error_message": {
"type": "string"
},
"id": {
"example": "kb_123",
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"example": "Product docs",
"type": "string"
},
"source_content_type": {
"example": "text/markdown",
"type": "string"
},
"source_filename": {
"example": "docs.md",
"type": "string"
},
"source_type": {
"example": "url",
"type": "string"
},
"source_uri": {
"example": "https://example.com/docs.md",
"type": "string"
},
"status": {
"example": "indexed",
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}404 Not Found
{
"properties": {
"code": {
"description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
"example": 0,
"type": "integer"
},
"message": {
"description": "Message is a human-readable status or error description.",
"example": "ok",
"type": "string"
}
},
"type": "object"
}PUT /api/public/v1/knowledge-bases/{id}Update a public Task Agent Knowledge Base
リクエスト形式: application/json; 応答形式: application/json.
引数
id · path · 必須
{
"description": "Knowledge Base ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Knowledge Base update request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"description": {
"example": "Updated description",
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"example": "Updated product docs",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"knowledge_base": {
"properties": {
"cloudflare_instance_id": {
"example": "hast-kb-product-docs",
"type": "string"
},
"cloudflare_mcp_url": {
"example": "https://hast-kb-product-docs.search.ai.cloudflare.com/mcp",
"type": "string"
},
"cloudflare_public_endpoint_id": {
"example": "hast-kb-product-docs",
"type": "string"
},
"created_at": {
"type": "string"
},
"description": {
"type": "string"
},
"error_message": {
"type": "string"
},
"id": {
"example": "kb_123",
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"example": "Product docs",
"type": "string"
},
"source_content_type": {
"example": "text/markdown",
"type": "string"
},
"source_filename": {
"example": "docs.md",
"type": "string"
},
"source_type": {
"example": "url",
"type": "string"
},
"source_uri": {
"example": "https://example.com/docs.md",
"type": "string"
},
"status": {
"example": "indexed",
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}404 Not Found
{
"properties": {
"code": {
"description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
"example": 0,
"type": "integer"
},
"message": {
"description": "Message is a human-readable status or error description.",
"example": "ok",
"type": "string"
}
},
"type": "object"
}PATCH /api/public/v1/knowledge-bases/{id}Update a public Task Agent Knowledge Base
リクエスト形式: application/json; 応答形式: application/json.
引数
id · path · 必須
{
"description": "Knowledge Base ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Knowledge Base update request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"description": {
"example": "Updated description",
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"example": "Updated product docs",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"knowledge_base": {
"properties": {
"cloudflare_instance_id": {
"example": "hast-kb-product-docs",
"type": "string"
},
"cloudflare_mcp_url": {
"example": "https://hast-kb-product-docs.search.ai.cloudflare.com/mcp",
"type": "string"
},
"cloudflare_public_endpoint_id": {
"example": "hast-kb-product-docs",
"type": "string"
},
"created_at": {
"type": "string"
},
"description": {
"type": "string"
},
"error_message": {
"type": "string"
},
"id": {
"example": "kb_123",
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"example": "Product docs",
"type": "string"
},
"source_content_type": {
"example": "text/markdown",
"type": "string"
},
"source_filename": {
"example": "docs.md",
"type": "string"
},
"source_type": {
"example": "url",
"type": "string"
},
"source_uri": {
"example": "https://example.com/docs.md",
"type": "string"
},
"status": {
"example": "indexed",
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}404 Not Found
{
"properties": {
"code": {
"description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
"example": 0,
"type": "integer"
},
"message": {
"description": "Message is a human-readable status or error description.",
"example": "ok",
"type": "string"
}
},
"type": "object"
}DELETE /api/public/v1/knowledge-bases/{id}Delete a public Task Agent Knowledge Base
Knowledge deletion is disabled to preserve imported originals. This compatibility endpoint returns HTTP 409.
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
id · path · 必須
{
"description": "Knowledge Base ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}応答
409 Conflict
{
"properties": {
"code": {
"description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
"example": 0,
"type": "integer"
},
"message": {
"description": "Message is a human-readable status or error description.",
"example": "ok",
"type": "string"
}
},
"type": "object"
}CRM
GET /api/public/v1/business-resourcesList CRM and customer communication knowledge bases
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
仕様に引数の定義はありません。
応答
200 OK
{
"additionalProperties": true,
"type": "object"
}POST /api/public/v1/business-resources/communication-knowledgeCreate a customer communication knowledge base
リクエスト形式: application/json; 応答形式: application/json.
引数
request · body · 必須
{
"description": "Create a customer communication knowledge base request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"name": {
"type": "string"
},
"request_id": {
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}POST /api/public/v1/business-resources/crmCreate an optional Twenty workspace
リクエスト形式: application/json; 応答形式: application/json.
引数
request · body · 必須
{
"description": "Create an optional Twenty workspace request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"name": {
"type": "string"
},
"request_id": {
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}GET /api/public/v1/business-resources/{resource_id}Browse CRM records or communication knowledge source documents
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
resource_id · path · 必須
{
"description": "resource_id",
"in": "path",
"name": "resource_id",
"required": true,
"type": "string"
}object · query · 任意
{
"description": "CRM object (default people); use CRM schema for supported objects",
"in": "query",
"name": "object",
"type": "string"
}cursor · query · 任意
{
"description": "CRM next-page cursor",
"in": "query",
"name": "cursor",
"type": "string"
}query · query · 任意
{
"description": "Communication knowledge search (maximum 2000 bytes); omit to browse sources",
"in": "query",
"name": "query",
"type": "string"
}before · query · 任意
{
"description": "Communication document pagination cursor",
"in": "query",
"name": "before",
"type": "string"
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}DELETE /api/public/v1/business-resources/{resource_id}Delete an unused channel resource configuration
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
resource_id · path · 必須
{
"description": "resource_id",
"in": "path",
"name": "resource_id",
"required": true,
"type": "string"
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}POST /api/public/v1/business-resources/{resource_id}/crm/attachments/uploadUpload a CRM attachment
リクエスト形式: application/json; 応答形式: application/json.
引数
仕様に引数の定義はありません。
応答
GET /api/public/v1/business-resources/{resource_id}/crm/schemaRead CRM business objects and field schema
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
resource_id · path · 必須
{
"description": "resource_id",
"in": "path",
"name": "resource_id",
"required": true,
"type": "string"
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}GET /api/public/v1/business-resources/{resource_id}/crm/{object}Search CRM records
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
resource_id · path · 必須
{
"description": "resource_id",
"in": "path",
"name": "resource_id",
"required": true,
"type": "string"
}object · path · 必須
{
"description": "object",
"in": "path",
"name": "object",
"required": true,
"type": "string"
}query · query · 任意
{
"description": "Search (maximum 300 bytes, no quotes or line breaks)",
"in": "query",
"name": "query",
"type": "string"
}cursor · query · 任意
{
"description": "Provider cursor returned by the previous page",
"in": "query",
"name": "cursor",
"type": "string"
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}POST /api/public/v1/business-resources/{resource_id}/crm/{object}Create a CRM record
Discover objects and writable fields using the CRM schema endpoint before writing. Read back on uncertain errors before retrying.
リクエスト形式: application/json; 応答形式: application/json.
引数
resource_id · path · 必須
{
"description": "resource_id",
"in": "path",
"name": "resource_id",
"required": true,
"type": "string"
}object · path · 必須
{
"description": "object",
"in": "path",
"name": "object",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Create a CRM record request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"request_id": {
"description": "Stable UUID required on create. Reuse it only for the identical create request.",
"type": "string"
},
"updated_at": {
"description": "Required on update; use updatedAt from the last record readback.",
"type": "string"
},
"values": {
"additionalProperties": {},
"description": "Only writable fields from GET /business-resources/{resource_id}/crm/schema.",
"type": "object"
}
},
"required": [
"values"
],
"type": "object"
}
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}GET /api/public/v1/business-resources/{resource_id}/crm/{object}/{record_id}Read CRM record details
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
resource_id · path · 必須
{
"description": "resource_id",
"in": "path",
"name": "resource_id",
"required": true,
"type": "string"
}object · path · 必須
{
"description": "object",
"in": "path",
"name": "object",
"required": true,
"type": "string"
}record_id · path · 必須
{
"description": "record_id",
"in": "path",
"name": "record_id",
"required": true,
"type": "string"
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}PATCH /api/public/v1/business-resources/{resource_id}/crm/{object}/{record_id}Update a CRM record
Discover objects and writable fields using the CRM schema endpoint before writing. Read back on uncertain errors before retrying.
リクエスト形式: application/json; 応答形式: application/json.
引数
resource_id · path · 必須
{
"description": "resource_id",
"in": "path",
"name": "resource_id",
"required": true,
"type": "string"
}object · path · 必須
{
"description": "object",
"in": "path",
"name": "object",
"required": true,
"type": "string"
}record_id · path · 必須
{
"description": "record_id",
"in": "path",
"name": "record_id",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Update a CRM record request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"request_id": {
"description": "Stable UUID required on create. Reuse it only for the identical create request.",
"type": "string"
},
"updated_at": {
"description": "Required on update; use updatedAt from the last record readback.",
"type": "string"
},
"values": {
"additionalProperties": {},
"description": "Only writable fields from GET /business-resources/{resource_id}/crm/schema.",
"type": "object"
}
},
"required": [
"values"
],
"type": "object"
}
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}DELETE /api/public/v1/business-resources/{resource_id}/crm/{object}/{record_id}Delete a CRM record
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
resource_id · path · 必須
{
"description": "resource_id",
"in": "path",
"name": "resource_id",
"required": true,
"type": "string"
}object · path · 必須
{
"description": "object",
"in": "path",
"name": "object",
"required": true,
"type": "string"
}record_id · path · 必須
{
"description": "record_id",
"in": "path",
"name": "record_id",
"required": true,
"type": "string"
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}GET /api/public/v1/business-resources/{resource_id}/crm/{object}/{record_id}/files/{field}/{file_id}Download a file attached to a CRM record
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
resource_id · path · 必須
{
"description": "resource_id",
"in": "path",
"name": "resource_id",
"required": true,
"type": "string"
}object · path · 必須
{
"description": "object",
"in": "path",
"name": "object",
"required": true,
"type": "string"
}record_id · path · 必須
{
"description": "record_id",
"in": "path",
"name": "record_id",
"required": true,
"type": "string"
}field · path · 必須
{
"description": "field",
"in": "path",
"name": "field",
"required": true,
"type": "string"
}file_id · path · 必須
{
"description": "file_id",
"in": "path",
"name": "file_id",
"required": true,
"type": "string"
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}GET /api/public/v1/business-resources/{resource_id}/crm/{object}/{record_id}/relations/{field}Browse related CRM records
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
resource_id · path · 必須
{
"description": "resource_id",
"in": "path",
"name": "resource_id",
"required": true,
"type": "string"
}object · path · 必須
{
"description": "object",
"in": "path",
"name": "object",
"required": true,
"type": "string"
}record_id · path · 必須
{
"description": "record_id",
"in": "path",
"name": "record_id",
"required": true,
"type": "string"
}field · path · 必須
{
"description": "field",
"in": "path",
"name": "field",
"required": true,
"type": "string"
}cursor · query · 任意
{
"description": "Provider cursor returned by the previous page",
"in": "query",
"name": "cursor",
"type": "string"
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}GET /api/public/v1/business-resources/{resource_id}/membersList CRM member identities for owner and assignee fields
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
resource_id · path · 必須
{
"description": "Owned CRM resource ID",
"in": "path",
"name": "resource_id",
"required": true,
"type": "string"
}cursor · query · 任意
{
"description": "Next cursor from the previous member page",
"in": "query",
"name": "cursor",
"type": "string"
}応答
200 OK
{
"properties": {
"has_more": {
"type": "boolean"
},
"members": {
"items": {
"properties": {
"email": {
"type": "string"
},
"first_name": {
"type": "string"
},
"id": {
"type": "string"
},
"last_name": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"next_cursor": {
"type": "string"
}
},
"type": "object"
}POST /api/public/v1/business-resources/{resource_id}/membersCreate or reuse a CRM member without retaining a password
Uses the selected managed workspace's existing registration flow. No invitation is sent. Generated passwords are discarded. Does not reset accounts outside this CRM; provider email-verification settings still apply.
リクエスト形式: application/json; 応答形式: application/json.
引数
resource_id · path · 必須
{
"description": "Owned platform-managed CRM resource ID",
"in": "path",
"name": "resource_id",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Actual email and name; never a password",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"email": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
}
},
"required": [
"email",
"first_name"
],
"type": "object"
}
}応答
200 OK
{
"properties": {
"email": {
"type": "string"
},
"first_name": {
"type": "string"
},
"id": {
"type": "string"
},
"last_name": {
"type": "string"
}
},
"type": "object"
}POST /api/public/v1/business-resources/{resource_id}/provisionRetry an incomplete CRM provisioning operation
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
resource_id · path · 必須
{
"description": "resource_id",
"in": "path",
"name": "resource_id",
"required": true,
"type": "string"
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}メモリプロジェクト
GET /api/public/v1/chat_memory_projectsList user chat memory projects
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
仕様に引数の定義はありません。
応答
POST /api/public/v1/chat_memory_projectsCreate a user chat memory project
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
request · body · 必須
{
"description": "Request body",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"customer_connection_id": {
"type": "string"
},
"customer_id": {
"type": "integer"
},
"name": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
}応答
GET /api/public/v1/chat_memory_projects/writesList user chat memory indexing operations
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
仕様に引数の定義はありません。
応答
Prompt
POST /api/public/v1/promptsSubmit a public Task Agent prompt
Creates a normal conversational Task Agent session when session_id is omitted, or appends a turn to an existing session. request_id is idempotent.
リクエスト形式: application/json; 応答形式: application/json.
引数
request · body · 必須
{
"description": "Public prompt request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"dynamic_tools": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"files": {
"items": {
"type": "string"
},
"type": "array"
},
"model": {
"example": "hast/auto",
"type": "string"
},
"prompt": {
"example": "Summarize the release notes.",
"type": "string"
},
"reasoning_effort": {
"example": "medium",
"type": "string"
},
"request_id": {
"example": "client-turn-1",
"type": "string"
},
"secret_bindings": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
},
"session_id": {
"example": "sess_abc123",
"type": "string"
},
"skill_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"system_prompt": {
"type": "string"
}
},
"type": "object"
}
}応答
202 Accepted
{
"properties": {
"request_id": {
"example": "client-turn-1",
"type": "string"
},
"session_id": {
"example": "sess_abc123",
"type": "string"
},
"status": {
"example": "dispatch_pending",
"type": "string"
}
},
"type": "object"
}401 Unauthorized
{
"properties": {
"code": {
"description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
"example": 0,
"type": "integer"
},
"message": {
"description": "Message is a human-readable status or error description.",
"example": "ok",
"type": "string"
}
},
"type": "object"
}409 Conflict
{
"properties": {
"code": {
"description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
"example": 0,
"type": "integer"
},
"message": {
"description": "Message is a human-readable status or error description.",
"example": "ok",
"type": "string"
}
},
"type": "object"
}413 Request Entity Too Large
{
"properties": {
"code": {
"description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
"example": 0,
"type": "integer"
},
"message": {
"description": "Message is a human-readable status or error description.",
"example": "ok",
"type": "string"
}
},
"type": "object"
}セッションとイベント
GET /api/public/v1/sessionsList public Task Agent sessions
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
limit · query · 任意
{
"description": "Page size (1-100, default 50)",
"in": "query",
"name": "limit",
"type": "integer"
}cursor · query · 任意
{
"description": "Opaque cursor returned by the previous page",
"in": "query",
"name": "cursor",
"type": "string"
}応答
200 OK
{
"properties": {
"has_more": {
"type": "boolean"
},
"next_cursor": {
"type": "string"
},
"sessions": {
"items": {
"properties": {
"event_cursor": {
"type": "integer"
},
"mode": {
"type": "string"
},
"runtime_provider": {
"type": "string"
},
"session_id": {
"example": "sess_abc123",
"type": "string"
},
"status": {
"example": "running",
"type": "string"
},
"task_origin": {
"example": "session",
"type": "string"
},
"token_usage": {
"properties": {
"cache_read_tokens": {
"type": "integer"
},
"cache_write_tokens": {
"type": "integer"
},
"cost_status": {
"type": "string"
},
"estimated_cost_usd": {
"type": "number"
},
"input_tokens": {
"type": "integer"
},
"model": {
"type": "string"
},
"output_tokens": {
"type": "integer"
},
"pricing": {
"properties": {
"cache_read_usd_per_token": {
"type": "string"
},
"cache_write_usd_per_token": {
"type": "string"
},
"input_usd_per_token": {
"type": "string"
},
"output_usd_per_token": {
"type": "string"
}
},
"type": "object"
},
"reasoning_tokens": {
"type": "integer"
},
"reported_sessions": {
"type": "integer"
},
"total_tokens": {
"type": "integer"
},
"unpriced_tokens": {
"type": "integer"
},
"unreported_sessions": {
"type": "integer"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}GET /api/public/v1/sessions/{id}Read a public Task Agent session
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
id · path · 必須
{
"description": "Session ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}応答
200 OK
{
"properties": {
"session": {
"properties": {
"event_cursor": {
"type": "integer"
},
"mode": {
"type": "string"
},
"runtime_provider": {
"type": "string"
},
"session_id": {
"example": "sess_abc123",
"type": "string"
},
"status": {
"example": "running",
"type": "string"
},
"task_origin": {
"example": "session",
"type": "string"
},
"token_usage": {
"properties": {
"cache_read_tokens": {
"type": "integer"
},
"cache_write_tokens": {
"type": "integer"
},
"cost_status": {
"type": "string"
},
"estimated_cost_usd": {
"type": "number"
},
"input_tokens": {
"type": "integer"
},
"model": {
"type": "string"
},
"output_tokens": {
"type": "integer"
},
"pricing": {
"properties": {
"cache_read_usd_per_token": {
"type": "string"
},
"cache_write_usd_per_token": {
"type": "string"
},
"input_usd_per_token": {
"type": "string"
},
"output_usd_per_token": {
"type": "string"
}
},
"type": "object"
},
"reasoning_tokens": {
"type": "integer"
},
"reported_sessions": {
"type": "integer"
},
"total_tokens": {
"type": "integer"
},
"unpriced_tokens": {
"type": "integer"
},
"unreported_sessions": {
"type": "integer"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
}DELETE /api/public/v1/sessions/{id}Delete a public Task Agent session
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
id · path · 必須
{
"description": "Session ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}応答
200 OK
{
"properties": {
"task": {
"properties": {
"client_id": {
"example": "client-main-user-123",
"type": "string"
},
"config": {
"additionalProperties": {},
"type": "object"
},
"created_at": {
"type": "string"
},
"event_cursor": {
"example": 42,
"type": "integer"
},
"id": {
"example": "task-agent-123",
"type": "string"
},
"mode": {
"example": "agent_run",
"type": "string"
},
"profile_id": {
"example": "user_123",
"type": "string"
},
"prompt": {
"type": "string"
},
"runtime_provider": {
"example": "cubesandbox",
"type": "string"
},
"sandbox_id": {
"example": "sandbox-main-user-123",
"type": "string"
},
"sandbox_scope": {
"example": "main",
"type": "string"
},
"status": {
"example": "needs_input",
"type": "string"
},
"task_origin": {
"example": "session",
"type": "string"
},
"title": {
"example": "Release validation",
"type": "string"
},
"token_usage": {
"properties": {
"cache_read_tokens": {
"type": "integer"
},
"cache_write_tokens": {
"type": "integer"
},
"cost_status": {
"type": "string"
},
"estimated_cost_usd": {
"type": "number"
},
"input_tokens": {
"type": "integer"
},
"model": {
"type": "string"
},
"output_tokens": {
"type": "integer"
},
"pricing": {
"properties": {
"cache_read_usd_per_token": {
"type": "string"
},
"cache_write_usd_per_token": {
"type": "string"
},
"input_usd_per_token": {
"type": "string"
},
"output_usd_per_token": {
"type": "string"
}
},
"type": "object"
},
"reasoning_tokens": {
"type": "integer"
},
"reported_sessions": {
"type": "integer"
},
"total_tokens": {
"type": "integer"
},
"unpriced_tokens": {
"type": "integer"
},
"unreported_sessions": {
"type": "integer"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
},
"updated_at": {
"type": "string"
},
"workspace_object_prefix": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}POST /api/public/v1/sessions/{id}/cancelCancel a public Task Agent session
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
id · path · 必須
{
"description": "Session ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}応答
200 OK
{
"properties": {
"task": {
"properties": {
"client_id": {
"example": "client-main-user-123",
"type": "string"
},
"config": {
"additionalProperties": {},
"type": "object"
},
"created_at": {
"type": "string"
},
"event_cursor": {
"example": 42,
"type": "integer"
},
"id": {
"example": "task-agent-123",
"type": "string"
},
"mode": {
"example": "agent_run",
"type": "string"
},
"profile_id": {
"example": "user_123",
"type": "string"
},
"prompt": {
"type": "string"
},
"runtime_provider": {
"example": "cubesandbox",
"type": "string"
},
"sandbox_id": {
"example": "sandbox-main-user-123",
"type": "string"
},
"sandbox_scope": {
"example": "main",
"type": "string"
},
"status": {
"example": "needs_input",
"type": "string"
},
"task_origin": {
"example": "session",
"type": "string"
},
"title": {
"example": "Release validation",
"type": "string"
},
"token_usage": {
"properties": {
"cache_read_tokens": {
"type": "integer"
},
"cache_write_tokens": {
"type": "integer"
},
"cost_status": {
"type": "string"
},
"estimated_cost_usd": {
"type": "number"
},
"input_tokens": {
"type": "integer"
},
"model": {
"type": "string"
},
"output_tokens": {
"type": "integer"
},
"pricing": {
"properties": {
"cache_read_usd_per_token": {
"type": "string"
},
"cache_write_usd_per_token": {
"type": "string"
},
"input_usd_per_token": {
"type": "string"
},
"output_usd_per_token": {
"type": "string"
}
},
"type": "object"
},
"reasoning_tokens": {
"type": "integer"
},
"reported_sessions": {
"type": "integer"
},
"total_tokens": {
"type": "integer"
},
"unpriced_tokens": {
"type": "integer"
},
"unreported_sessions": {
"type": "integer"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
},
"updated_at": {
"type": "string"
},
"workspace_object_prefix": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}GET /api/public/v1/sessions/{id}/eventsList public Task Agent Event v2 events
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
id · path · 必須
{
"description": "Session ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}after · query · 任意
{
"description": "Return persisted events after this sequence",
"in": "query",
"name": "after",
"type": "integer"
}limit · query · 任意
{
"description": "Event page size, maximum 200",
"in": "query",
"name": "limit",
"type": "integer"
}応答
200 OK
{
"properties": {
"events": {
"items": {
"discriminator": "type",
"properties": {
"created_at": {
"example": "2026-08-16T12:00:00Z",
"format": "date-time",
"type": "string"
},
"data": {
"allOf": [
{
"properties": {
"attempt": {
"minimum": 1,
"type": "integer"
},
"attempts": {
"minimum": 1,
"type": "integer"
},
"channel": {
"enum": [
"stdout",
"stderr",
"progress"
],
"type": "string"
},
"code": {
"type": "string"
},
"context_window": {
"minimum": 0,
"type": "integer"
},
"cost": {},
"delta": {
"type": "string"
},
"duration_ms": {
"minimum": 0,
"type": "integer"
},
"error": {
"type": "string"
},
"exit_code": {
"type": "integer"
},
"files": {
"items": {
"type": "string"
},
"type": "array"
},
"final_message_id": {
"type": "string"
},
"finish_reason": {
"type": "string"
},
"input": {},
"is_error": {
"type": "boolean"
},
"kind": {
"type": "string"
},
"last": {
"properties": {
"cache_read_tokens": {
"minimum": 0,
"type": "integer"
},
"cache_write_tokens": {
"minimum": 0,
"type": "integer"
},
"input_tokens": {
"minimum": 0,
"type": "integer"
},
"output_tokens": {
"minimum": 0,
"type": "integer"
},
"reasoning_tokens": {
"minimum": 0,
"type": "integer"
},
"total_tokens": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"cache_read_tokens",
"cache_write_tokens",
"input_tokens",
"output_tokens",
"reasoning_tokens",
"total_tokens"
],
"type": "object"
},
"message": {
"type": "string"
},
"message_id": {
"type": "string"
},
"model": {
"type": "string"
},
"model_config": {
"properties": {
"model": {
"type": "string"
},
"model_source": {
"enum": [
"hast",
"codex_account"
],
"type": "string"
},
"reasoning_effort": {
"type": "string"
}
},
"type": "object"
},
"model_source": {
"type": "string"
},
"modified_at": {
"format": "date-time",
"type": "string"
},
"name": {
"type": "string"
},
"operation": {
"enum": [
"update",
"delete"
],
"type": "string"
},
"options": {
"items": {},
"type": "array"
},
"output": {},
"parent_tool_call_id": {
"type": "string"
},
"path": {
"type": "string"
},
"plan_id": {
"type": "string"
},
"prompt": {
"type": "string"
},
"reason": {
"type": "string"
},
"reasoning_id": {
"type": "string"
},
"request_id": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"role": {
"enum": [
"user",
"assistant",
"system"
],
"type": "string"
},
"scope": {
"type": "string"
},
"size_bytes": {
"minimum": 0,
"type": "integer"
},
"status": {
"enum": [
"starting",
"ready",
"failed",
"released",
"succeeded",
"interrupted"
],
"type": "string"
},
"steps": {
"items": {
"properties": {
"status": {
"enum": [
"pending",
"in_progress",
"completed"
],
"example": "in_progress",
"type": "string"
},
"step": {
"type": "string"
}
},
"required": [
"status",
"step"
],
"type": "object"
},
"type": "array"
},
"text": {
"type": "string"
},
"tokens_after": {
"minimum": 0,
"type": "integer"
},
"tokens_before": {
"minimum": 0,
"type": "integer"
},
"tool_call_id": {
"type": "string"
},
"total": {
"properties": {
"cache_read_tokens": {
"minimum": 0,
"type": "integer"
},
"cache_write_tokens": {
"minimum": 0,
"type": "integer"
},
"input_tokens": {
"minimum": 0,
"type": "integer"
},
"output_tokens": {
"minimum": 0,
"type": "integer"
},
"reasoning_tokens": {
"minimum": 0,
"type": "integer"
},
"total_tokens": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"cache_read_tokens",
"cache_write_tokens",
"input_tokens",
"output_tokens",
"reasoning_tokens",
"total_tokens"
],
"type": "object"
},
"turn_type": {
"type": "string"
}
},
"type": "object"
}
],
"description": "Data is the HAST-owned payload union; Type selects its required shape as\ndefined in docs/reference/task-agent-event-v2.md."
},
"engine": {
"enum": [
"codex_cli",
"pi_agent_cli"
],
"example": "codex_cli",
"type": "string"
},
"event_id": {
"example": "evt_123",
"type": "string"
},
"replayable": {
"example": true,
"type": "boolean"
},
"run_id": {
"example": "run_123",
"type": "string"
},
"schema_version": {
"enum": [
2
],
"example": 2,
"type": "integer"
},
"sequence": {
"description": "Sequence is a positive durable order, or null for volatile events.",
"example": 42,
"minimum": 1,
"type": "integer",
"x-nullable": true
},
"session_id": {
"example": "session_123",
"type": "string"
},
"source": {
"enum": [
"runtime",
"backplane",
"workspace"
],
"example": "runtime",
"type": "string"
},
"task_id": {
"example": "task_123",
"type": "string"
},
"type": {
"enum": [
"runtime.status",
"run.queued",
"run.started",
"run.retrying",
"run.completed",
"run.failed",
"run.interrupted",
"message.started",
"message.delta",
"message.completed",
"reasoning.started",
"reasoning.delta",
"reasoning.completed",
"tool.started",
"tool.updated",
"tool.completed",
"plan.updated",
"plan.completed",
"usage.updated",
"file.changed",
"input.requested",
"context.compacted",
"warning",
"error"
],
"example": "message.completed",
"type": "string"
}
},
"required": [
"created_at",
"data",
"engine",
"event_id",
"replayable",
"schema_version",
"sequence",
"source",
"task_id",
"type"
],
"type": "object"
},
"type": "array"
},
"has_more": {
"example": true,
"type": "boolean"
},
"next_after": {
"example": 42,
"format": "int64",
"type": "integer",
"x-nullable": true
}
},
"type": "object"
}GET /api/public/v1/sessions/{id}/events/streamStream public Task Agent events
Event v2 SSE supports after and Last-Event-ID replay.
リクエスト形式: 本文形式の指定なし; 応答形式: text/event-stream.
引数
id · path · 必須
{
"description": "Session ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}after · query · 任意
{
"description": "Return persisted events after this sequence",
"in": "query",
"name": "after",
"type": "integer"
}応答
200 SSE stream
{
"type": "string"
}POST /api/public/v1/sessions/{id}/interruptInterrupt a public Task Agent turn
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
id · path · 必須
{
"description": "Session ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}応答
200 OK
{
"properties": {
"request_id": {
"example": "task-agent-turn-1710000000000000000",
"type": "string"
},
"status": {
"example": "queued",
"type": "string"
}
},
"type": "object"
}202 Accepted
{
"properties": {
"request_id": {
"example": "task-agent-turn-1710000000000000000",
"type": "string"
},
"status": {
"example": "queued",
"type": "string"
}
},
"type": "object"
}スキル
GET /api/public/v1/skillsList public Task Agent skills
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
仕様に引数の定義はありません。
応答
200 OK
{
"properties": {
"skills": {
"items": {
"properties": {
"capability_id": {
"type": "string"
},
"description": {
"type": "string"
},
"directory_name": {
"example": "e2e-summary",
"type": "string"
},
"display_name": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"entrypoint_path": {
"example": "SKILL.md",
"type": "string"
},
"files": {
"items": {
"properties": {
"content": {
"type": "string"
},
"path": {
"example": "SKILL.md",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"hash": {
"example": "sha256:abc123",
"type": "string"
},
"skill_id": {
"example": "e2e-summary",
"type": "string"
},
"source": {
"example": "user",
"type": "string"
},
"status": {
"example": "active",
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}POST /api/public/v1/skillsCreate a public Task Agent skill
リクエスト形式: application/json; 応答形式: application/json.
引数
request · body · 必須
{
"description": "Skill request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"description": {
"type": "string"
},
"directory_name": {
"example": "e2e-summary",
"type": "string"
},
"display_name": {
"example": "E2E Summary",
"type": "string"
},
"enabled": {
"type": "boolean"
},
"entrypoint_path": {
"example": "SKILL.md",
"type": "string"
},
"expected_checksum_sha256": {
"type": "string"
},
"files": {
"items": {
"properties": {
"content": {
"type": "string"
},
"path": {
"example": "SKILL.md",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"skill_id": {
"example": "e2e-summary",
"type": "string"
},
"source_type": {
"example": "upload",
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"skill": {
"properties": {
"capability_id": {
"type": "string"
},
"description": {
"type": "string"
},
"directory_name": {
"example": "e2e-summary",
"type": "string"
},
"display_name": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"entrypoint_path": {
"example": "SKILL.md",
"type": "string"
},
"files": {
"items": {
"properties": {
"content": {
"type": "string"
},
"path": {
"example": "SKILL.md",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"hash": {
"example": "sha256:abc123",
"type": "string"
},
"skill_id": {
"example": "e2e-summary",
"type": "string"
},
"source": {
"example": "user",
"type": "string"
},
"status": {
"example": "active",
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}GET /api/public/v1/skills/{skillID}Read, update, or delete a public Task Agent skill
リクエスト形式: application/json; 応答形式: application/json.
引数
skillID · path · 必須
{
"description": "Skill ID",
"in": "path",
"name": "skillID",
"required": true,
"type": "string"
}request · body · 任意
{
"description": "Skill request",
"in": "body",
"name": "request",
"schema": {
"properties": {
"description": {
"type": "string"
},
"directory_name": {
"example": "e2e-summary",
"type": "string"
},
"display_name": {
"example": "E2E Summary",
"type": "string"
},
"enabled": {
"type": "boolean"
},
"entrypoint_path": {
"example": "SKILL.md",
"type": "string"
},
"expected_checksum_sha256": {
"type": "string"
},
"files": {
"items": {
"properties": {
"content": {
"type": "string"
},
"path": {
"example": "SKILL.md",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"skill_id": {
"example": "e2e-summary",
"type": "string"
},
"source_type": {
"example": "upload",
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"skill": {
"properties": {
"capability_id": {
"type": "string"
},
"description": {
"type": "string"
},
"directory_name": {
"example": "e2e-summary",
"type": "string"
},
"display_name": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"entrypoint_path": {
"example": "SKILL.md",
"type": "string"
},
"files": {
"items": {
"properties": {
"content": {
"type": "string"
},
"path": {
"example": "SKILL.md",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"hash": {
"example": "sha256:abc123",
"type": "string"
},
"skill_id": {
"example": "e2e-summary",
"type": "string"
},
"source": {
"example": "user",
"type": "string"
},
"status": {
"example": "active",
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}PUT /api/public/v1/skills/{skillID}Read, update, or delete a public Task Agent skill
リクエスト形式: application/json; 応答形式: application/json.
引数
skillID · path · 必須
{
"description": "Skill ID",
"in": "path",
"name": "skillID",
"required": true,
"type": "string"
}request · body · 任意
{
"description": "Skill request",
"in": "body",
"name": "request",
"schema": {
"properties": {
"description": {
"type": "string"
},
"directory_name": {
"example": "e2e-summary",
"type": "string"
},
"display_name": {
"example": "E2E Summary",
"type": "string"
},
"enabled": {
"type": "boolean"
},
"entrypoint_path": {
"example": "SKILL.md",
"type": "string"
},
"expected_checksum_sha256": {
"type": "string"
},
"files": {
"items": {
"properties": {
"content": {
"type": "string"
},
"path": {
"example": "SKILL.md",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"skill_id": {
"example": "e2e-summary",
"type": "string"
},
"source_type": {
"example": "upload",
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"skill": {
"properties": {
"capability_id": {
"type": "string"
},
"description": {
"type": "string"
},
"directory_name": {
"example": "e2e-summary",
"type": "string"
},
"display_name": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"entrypoint_path": {
"example": "SKILL.md",
"type": "string"
},
"files": {
"items": {
"properties": {
"content": {
"type": "string"
},
"path": {
"example": "SKILL.md",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"hash": {
"example": "sha256:abc123",
"type": "string"
},
"skill_id": {
"example": "e2e-summary",
"type": "string"
},
"source": {
"example": "user",
"type": "string"
},
"status": {
"example": "active",
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}PATCH /api/public/v1/skills/{skillID}Read, update, or delete a public Task Agent skill
リクエスト形式: application/json; 応答形式: application/json.
引数
skillID · path · 必須
{
"description": "Skill ID",
"in": "path",
"name": "skillID",
"required": true,
"type": "string"
}request · body · 任意
{
"description": "Skill request",
"in": "body",
"name": "request",
"schema": {
"properties": {
"description": {
"type": "string"
},
"directory_name": {
"example": "e2e-summary",
"type": "string"
},
"display_name": {
"example": "E2E Summary",
"type": "string"
},
"enabled": {
"type": "boolean"
},
"entrypoint_path": {
"example": "SKILL.md",
"type": "string"
},
"expected_checksum_sha256": {
"type": "string"
},
"files": {
"items": {
"properties": {
"content": {
"type": "string"
},
"path": {
"example": "SKILL.md",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"skill_id": {
"example": "e2e-summary",
"type": "string"
},
"source_type": {
"example": "upload",
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"skill": {
"properties": {
"capability_id": {
"type": "string"
},
"description": {
"type": "string"
},
"directory_name": {
"example": "e2e-summary",
"type": "string"
},
"display_name": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"entrypoint_path": {
"example": "SKILL.md",
"type": "string"
},
"files": {
"items": {
"properties": {
"content": {
"type": "string"
},
"path": {
"example": "SKILL.md",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"hash": {
"example": "sha256:abc123",
"type": "string"
},
"skill_id": {
"example": "e2e-summary",
"type": "string"
},
"source": {
"example": "user",
"type": "string"
},
"status": {
"example": "active",
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}DELETE /api/public/v1/skills/{skillID}Read, update, or delete a public Task Agent skill
リクエスト形式: application/json; 応答形式: application/json.
引数
skillID · path · 必須
{
"description": "Skill ID",
"in": "path",
"name": "skillID",
"required": true,
"type": "string"
}request · body · 任意
{
"description": "Skill request",
"in": "body",
"name": "request",
"schema": {
"properties": {
"description": {
"type": "string"
},
"directory_name": {
"example": "e2e-summary",
"type": "string"
},
"display_name": {
"example": "E2E Summary",
"type": "string"
},
"enabled": {
"type": "boolean"
},
"entrypoint_path": {
"example": "SKILL.md",
"type": "string"
},
"expected_checksum_sha256": {
"type": "string"
},
"files": {
"items": {
"properties": {
"content": {
"type": "string"
},
"path": {
"example": "SKILL.md",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"skill_id": {
"example": "e2e-summary",
"type": "string"
},
"source_type": {
"example": "upload",
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"skill": {
"properties": {
"capability_id": {
"type": "string"
},
"description": {
"type": "string"
},
"directory_name": {
"example": "e2e-summary",
"type": "string"
},
"display_name": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"entrypoint_path": {
"example": "SKILL.md",
"type": "string"
},
"files": {
"items": {
"properties": {
"content": {
"type": "string"
},
"path": {
"example": "SKILL.md",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"hash": {
"example": "sha256:abc123",
"type": "string"
},
"skill_id": {
"example": "e2e-summary",
"type": "string"
},
"source": {
"example": "user",
"type": "string"
},
"status": {
"example": "active",
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}チャネル
GET /api/public/v1/channelsList user channel connections
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
仕様に引数の定義はありません。
応答
POST /api/public/v1/channelsConnect a verified existing Chatwoot message inbox
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
request · body · 必須
{
"description": "Request body",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"inbox_id": {
"type": "integer"
},
"name": {
"type": "string"
},
"require_admission": {
"type": "boolean"
}
},
"required": [
"inbox_id",
"name"
],
"type": "object"
}
}応答
POST /api/public/v1/channels/accountInitialize a user channel account
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
仕様に引数の定義はありません。
応答
GET /api/public/v1/channels/agentsList Agents available for channel assignment
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
page · query · 任意
{
"description": "Page number",
"in": "query",
"name": "page",
"type": "integer"
}page_size · query · 任意
{
"description": "Page size, maximum 100",
"in": "query",
"name": "page_size",
"type": "integer"
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}POST /api/public/v1/channels/authorizations/{provider}Begin channel authorization
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
provider · path · 必須
{
"description": "provider",
"in": "path",
"name": "provider",
"required": true,
"type": "string"
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}POST /api/public/v1/channels/authorizations/{provider}/completeComplete channel authorization
リクエスト形式: application/json; 応答形式: application/json.
引数
provider · path · 必須
{
"description": "provider",
"in": "path",
"name": "provider",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Complete channel authorization request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"code": {
"type": "string"
},
"require_admission": {
"type": "boolean"
},
"state": {
"type": "string"
}
},
"required": [
"code",
"state"
],
"type": "object"
}
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}POST /api/public/v1/channels/deletions/{id}/retryRetry channel cleanup
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
仕様に引数の定義はありません。
応答
202 Accepted
{
"additionalProperties": {
"type": "string"
},
"type": "object"
}POST /api/public/v1/channels/facebookConnect a Facebook page
リクエスト形式: application/json; 応答形式: application/json.
引数
request · body · 必須
{
"description": "Connect a Facebook page request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"page_id": {
"type": "string"
},
"require_admission": {
"type": "boolean"
},
"token": {
"type": "string"
}
},
"required": [
"page_id",
"token"
],
"type": "object"
}
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}POST /api/public/v1/channels/facebook/pagesList authorized Facebook pages
リクエスト形式: application/json; 応答形式: application/json.
引数
request · body · 必須
{
"description": "List authorized Facebook pages request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"token": {
"type": "string"
}
},
"required": [
"token"
],
"type": "object"
}
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}GET /api/public/v1/channels/inboxesList available Chatwoot message inboxes
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
仕様に引数の定義はありません。
応答
GET /api/public/v1/channels/resourcesList channel resources and operations
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
仕様に引数の定義はありません。
応答
POST /api/public/v1/channels/resourcesRegister an independently bindable channel resource
リクエスト形式: application/json; 応答形式: application/json.
引数
body · body · 必須
{
"description": "Resource reference",
"in": "body",
"name": "body",
"required": true,
"schema": {
"properties": {
"base_url": {
"type": "string"
},
"created_at": {
"type": "string"
},
"credential_expires_at": {
"type": "string"
},
"id": {
"type": "string"
},
"kind": {
"enum": [
"hast_memory",
"cloudflare",
"knowledge_source",
"knowledge_collection",
"hindsight",
"twenty",
"tool",
"schedule"
],
"type": "string",
"x-enum-varnames": [
"ChannelResourceMemory",
"ChannelResourceKnowledge",
"ChannelResourceSource",
"ChannelResourceCollection",
"ChannelResourceFacts",
"ChannelResourceCRM",
"ChannelResourceTool",
"ChannelResourceSchedule"
]
},
"managed": {
"type": "boolean"
},
"name": {
"type": "string"
},
"reference_id": {
"type": "string"
},
"scope_type": {
"type": "string"
},
"secret_id": {
"type": "string"
},
"status": {
"type": "string"
}
},
"type": "object"
}
}応答
POST /api/public/v1/channels/resources/crmCreate an optional Twenty workspace
リクエスト形式: application/json; 応答形式: application/json.
引数
body · body · 必須
{
"description": "CRM name and stable request ID",
"in": "body",
"name": "body",
"required": true,
"schema": {
"properties": {
"name": {
"type": "string"
},
"request_id": {
"type": "string"
}
},
"type": "object"
}
}応答
DELETE /api/public/v1/channels/resources/{resource_id}Delete an unused channel resource configuration
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
resource_id · path · 必須
{
"description": "Resource ID",
"in": "path",
"name": "resource_id",
"required": true,
"type": "string"
}応答
POST /api/public/v1/channels/resources/{resource_id}/provisionRetry an incomplete CRM provisioning operation
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
resource_id · path · 必須
{
"description": "CRM resource ID",
"in": "path",
"name": "resource_id",
"required": true,
"type": "string"
}応答
PUT /api/public/v1/channels/resources/{resource_id}/statusDisable or reverify a CRM resource
リクエスト形式: application/json; 応答形式: application/json.
引数
resource_id · path · 必須
{
"description": "CRM resource ID",
"in": "path",
"name": "resource_id",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Request body",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"status": {
"type": "string"
}
},
"required": [
"status"
],
"type": "object"
}
}応答
POST /api/public/v1/channels/resources/{resource_id}/verifyVerify a Twenty resource credential and workspace
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
resource_id · path · 必須
{
"description": "CRM resource ID",
"in": "path",
"name": "resource_id",
"required": true,
"type": "string"
}応答
GET /api/public/v1/channels/schedule_sourcesList verified Webhook Schedule destinations
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
仕様に引数の定義はありません。
応答
GET /api/public/v1/channels/sendsList user channel sends and provider statuses
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
仕様に引数の定義はありません。
応答
GET /api/public/v1/channels/setupRead channel setup configuration
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
仕様に引数の定義はありません。
応答
200 OK
{
"additionalProperties": true,
"type": "object"
}POST /api/public/v1/channels/setupCreate a message channel
Slack accepts optional slack_trigger_rules with require_mention, auto_reply_channel_ids and auto_reply_sender_ids. Omit it for mention-required defaults. Channel and sender exceptions are OR conditions; obtain actual IDs from the authorized Slack workspace.
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
request · body · 必須
{
"description": "Request body",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"account_id": {
"type": "string"
},
"account_sid": {
"type": "string"
},
"api_key": {
"type": "string"
},
"api_secret": {
"type": "string"
},
"application_id": {
"type": "string"
},
"auth_token": {
"type": "string"
},
"bot_token": {
"type": "string"
},
"callback_token": {
"type": "string"
},
"corp_id": {
"type": "string"
},
"corp_secret": {
"type": "string"
},
"email": {
"type": "string"
},
"encoding_aes_key": {
"type": "string"
},
"imap_address": {
"type": "string"
},
"imap_login": {
"type": "string"
},
"imap_password": {
"type": "string"
},
"line_channel_id": {
"type": "string"
},
"line_channel_secret": {
"type": "string"
},
"line_channel_token": {
"type": "string"
},
"medium": {
"type": "string"
},
"name": {
"type": "string"
},
"open_kfid": {
"type": "string"
},
"phone_number": {
"type": "string"
},
"platform": {
"type": "string"
},
"require_admission": {
"type": "boolean"
},
"signing_secret": {
"type": "string"
},
"slack_trigger_rules": {
"properties": {
"auto_reply_channel_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"auto_reply_sender_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"require_mention": {
"type": "boolean"
}
},
"required": [
"require_mention"
],
"type": "object"
},
"smtp_address": {
"type": "string"
},
"smtp_login": {
"type": "string"
},
"smtp_password": {
"type": "string"
},
"telegram_trigger_rules": {
"properties": {
"group_rules": {
"items": {
"properties": {
"chat_id": {
"type": "string"
},
"mode": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"website_url": {
"type": "string"
}
},
"type": "object"
}
}応答
POST /api/public/v1/channels/whatsappCreate an official WhatsApp Cloud connection
リクエスト形式: application/json; 応答形式: application/json.
引数
request · body · 必須
{
"description": "Create an official WhatsApp Cloud connection request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"app_secret_id": {
"type": "string"
},
"app_secret_name": {
"type": "string"
},
"app_secret_value": {
"type": "string"
},
"business_account_id": {
"type": "string"
},
"name": {
"type": "string"
},
"phone_number": {
"type": "string"
},
"phone_number_id": {
"type": "string"
},
"require_admission": {
"type": "boolean"
},
"token_secret_id": {
"type": "string"
},
"token_secret_name": {
"type": "string"
},
"token_secret_value": {
"type": "string"
}
},
"required": [
"business_account_id",
"name",
"phone_number",
"phone_number_id"
],
"type": "object"
}
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}DELETE /api/public/v1/channels/{connection_id}Disconnect a user channel
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
connection_id · path · 必須
{
"description": "Connection ID",
"in": "path",
"name": "connection_id",
"required": true,
"type": "string"
}応答
PUT /api/public/v1/channels/{connection_id}/bindingRelease a legacy channel association
リクエスト形式: application/json; 応答形式: application/json.
引数
connection_id · path · 必須
{
"description": "Channel connection ID",
"in": "path",
"name": "connection_id",
"required": true,
"type": "string"
}body · body · 必須
{
"description": "Expected Webhook ID and binding version; target must be empty to release the association",
"in": "body",
"name": "body",
"required": true,
"schema": {
"properties": {
"expected_binding_version": {
"type": "integer"
},
"expected_hook_id": {
"type": "string"
},
"require_admission": {
"type": "boolean"
},
"target_hook_id": {
"type": "string"
}
},
"type": "object"
}
}応答
GET /api/public/v1/channels/{connection_id}/deletion_previewPreview retained Knowledge affected by channel deletion
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
仕様に引数の定義はありません。
応答
200 OK
{
"properties": {
"attachment_count": {
"type": "integer"
},
"bases": {
"items": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"record_count": {
"type": "integer"
},
"source_count": {
"type": "integer"
}
},
"type": "object"
}GET /api/public/v1/channels/{connection_id}/installationRead channel installation information
WeChat installation includes wechat_trusted_ips, the configured public egress IP list. An empty array means the deployment has not configured it; other platforms omit this field. Slack installation includes slack_trigger_rules and the callback URL. Use the returned rules to preserve existing exceptions when updating a Slack channel.
リクエスト形式: 本文形式の指定なし; 応答形式: 応答定義を参照.
引数
仕様に引数の定義はありません。
応答
POST /api/public/v1/channels/{connection_id}/reconnectReconnect a disconnected channel
Verify the provider inbox before resuming synchronization. Existing history remains associated with this connection. Automatic replies stay off until an Agent is selected again.
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
connection_id · path · 必須
{
"description": "Connection ID",
"in": "path",
"name": "connection_id",
"required": true,
"type": "string"
}応答
DELETE /api/public/v1/channels/{connection_id}/removeDelete a channel with optional retained Knowledge cleanup
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
connection_id · path · 必須
{
"description": "Connection ID",
"in": "path",
"name": "connection_id",
"required": true,
"type": "string"
}purge_knowledge · query · 任意
{
"description": "Delete retained originals and derived knowledge in all affected bases",
"in": "query",
"name": "purge_knowledge",
"type": "boolean"
}応答
202 Accepted
{
"properties": {
"deletion": {
"properties": {
"affected_base_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"completed": {
"type": "integer"
},
"connection_id": {
"type": "string"
},
"created_at": {
"type": "string"
},
"error": {
"type": "string"
},
"finished_at": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"purge_knowledge": {
"type": "boolean"
},
"stage": {
"type": "string"
},
"state": {
"type": "string"
},
"total": {
"type": "integer"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}PATCH /api/public/v1/channels/{connection_id}/slackSet Slack mention requirements and automatic reply exceptions
Replace the complete Slack trigger rules. Mentions, exempt channel IDs and exempt user or bot IDs independently trigger replies. Both ID arrays support multiple values (up to 100 unique IDs each). Direct messages trigger normally and own-bot echoes are ignored. Requires an owned Slack channel; read /channels/{connection_id}/installation before editing and after saving.
リクエスト形式: application/json; 応答形式: application/json.
引数
connection_id · path · 必須
{
"description": "Channel ID",
"in": "path",
"name": "connection_id",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Complete Slack trigger rules",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"auto_reply_channel_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"auto_reply_sender_ids": {
"items": {
"type": "string"
},
"type": "array"
},
"require_mention": {
"type": "boolean"
}
},
"required": [
"require_mention"
],
"type": "object"
}
}応答
PATCH /api/public/v1/channels/{connection_id}/telegramSet Telegram group Agent triggers
Replace all group rules. Unlisted groups sync knowledge only. Modes: sync_only, mention (mention or reply to the Bot), all. Private chats trigger normally; Agent configuration and member admission are checked independently.
リクエスト形式: application/json; 応答形式: application/json.
引数
connection_id · path · 必須
{
"description": "Channel ID",
"in": "path",
"name": "connection_id",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Complete Telegram group rules",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"group_rules": {
"items": {
"properties": {
"chat_id": {
"type": "string"
},
"mode": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
}応答
PATCH /api/public/v1/channels/{connection_id}/wechat-kfComplete WeChat customer service setup
リクエスト形式: application/json; 応答形式: application/json.
引数
connection_id · path · 必須
{
"description": "connection_id",
"in": "path",
"name": "connection_id",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Complete WeChat customer service setup request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"corp_secret": {
"type": "string"
},
"open_kfid": {
"type": "string"
}
},
"required": [
"corp_secret",
"open_kfid"
],
"type": "object"
}
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}POST /api/public/v1/channels/{connection_id}/wechat-kf/accountsDiscover WeChat customer service accounts without saving credentials
Requires channels:write on a Profile key. Returns account names, IDs and management eligibility for an owned WeChat channel. Does not save the Secret or change bindings. Select an account with manage_privilege=true, then PATCH the WeChat setup with corp_secret and open_kfid.
リクエスト形式: application/json; 応答形式: application/json.
引数
connection_id · path · 必須
{
"description": "Owned WeChat channel connection ID",
"in": "path",
"name": "connection_id",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Application Secret; never include in prompts or logs",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"corp_secret": {
"maxLength": 4096,
"type": "string"
}
},
"required": [
"corp_secret"
],
"type": "object"
}
}応答
200 OK
{
"properties": {
"accounts": {
"items": {
"properties": {
"manage_privilege": {
"type": "boolean"
},
"name": {
"type": "string"
},
"open_kfid": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}400 wechat_credentials_invalid
{
"properties": {
"code": {
"type": "string"
},
"error": {
"type": "string"
}
},
"type": "object"
}401 Missing or invalid API key
{
"properties": {
"code": {
"type": "string"
},
"error": {
"type": "string"
}
},
"type": "object"
}403 Requires a Profile key with channels:write
{
"properties": {
"code": {
"type": "string"
},
"error": {
"type": "string"
}
},
"type": "object"
}404 WeChat channel not found
{
"properties": {
"code": {
"type": "string"
},
"error": {
"type": "string"
}
},
"type": "object"
}409 Channel account unavailable
{
"properties": {
"code": {
"type": "string"
},
"error": {
"type": "string"
}
},
"type": "object"
}422 wechat_credentials_invalid, wechat_permission_denied, wechat_ip_not_allowed or wechat_accounts_unavailable
{
"properties": {
"code": {
"type": "string"
},
"error": {
"type": "string"
}
},
"type": "object"
}502 wechat_accounts_unavailable
{
"properties": {
"code": {
"type": "string"
},
"error": {
"type": "string"
}
},
"type": "object"
}POST /api/public/v1/channels/{connection_id}/wechat-kf/domain-verificationUpload a WeCom domain verification file
リクエスト形式: application/json; 応答形式: application/json.
引数
connection_id · path · 必須
{
"description": "connection_id",
"in": "path",
"name": "connection_id",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Upload a WeCom domain verification file request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"content": {
"type": "string"
},
"filename": {
"type": "string"
}
},
"required": [
"content",
"filename"
],
"type": "object"
}
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}PATCH /api/public/v1/channels/{connection_id}/whatsappReauthorize an official WhatsApp Cloud connection
リクエスト形式: application/json; 応答形式: application/json.
引数
connection_id · path · 必須
{
"description": "connection_id",
"in": "path",
"name": "connection_id",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Reauthorize an official WhatsApp Cloud connection request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"app_secret_id": {
"type": "string"
},
"app_secret_name": {
"type": "string"
},
"app_secret_value": {
"type": "string"
},
"business_account_id": {
"type": "string"
},
"phone_number_id": {
"type": "string"
},
"token_secret_id": {
"type": "string"
},
"token_secret_name": {
"type": "string"
},
"token_secret_value": {
"type": "string"
}
},
"required": [
"business_account_id",
"phone_number_id"
],
"type": "object"
}
}応答
200 OK
{
"additionalProperties": true,
"type": "object"
}メモリ
GET /api/public/v1/memoriesList public Task Agent memories
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
scope_type · query · 任意
{
"description": "Filter memory category",
"enum": [
"task_agent",
"webhook"
],
"in": "query",
"name": "scope_type",
"type": "string"
}scope_id · query · 任意
{
"description": "Webhook ID; empty selects shared, omitted selects all in the category",
"in": "query",
"name": "scope_id",
"type": "string"
}応答
200 OK
{
"properties": {
"memories": {
"items": {
"properties": {
"content": {
"type": "string"
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"type": "string"
},
"scope_id": {
"example": "",
"type": "string"
},
"scope_type": {
"enum": [
"task_agent",
"webhook"
],
"example": "task_agent",
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}POST /api/public/v1/memoriesCreate a public Task Agent memory
リクエスト形式: application/json; 応答形式: application/json.
引数
request · body · 必須
{
"description": "Memory request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"content": {
"example": "Prefer concise validation notes.",
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"example": "project-preferences",
"type": "string"
},
"scope_id": {
"example": "",
"type": "string"
},
"scope_type": {
"enum": [
"task_agent",
"webhook"
],
"example": "task_agent",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"memory": {
"properties": {
"content": {
"type": "string"
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"type": "string"
},
"scope_id": {
"example": "",
"type": "string"
},
"scope_type": {
"enum": [
"task_agent",
"webhook"
],
"example": "task_agent",
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}GET /api/public/v1/memories/by-id/{memoryID}Read a memory by ID within the authenticated user
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
memoryID · path · 必須
{
"description": "Memory ID",
"in": "path",
"name": "memoryID",
"required": true,
"type": "string"
}応答
200 OK
{
"properties": {
"memory": {
"properties": {
"content": {
"type": "string"
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"type": "string"
},
"scope_id": {
"example": "",
"type": "string"
},
"scope_type": {
"enum": [
"task_agent",
"webhook"
],
"example": "task_agent",
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}PUT /api/public/v1/memories/by-id/{memoryID}Update a memory by ID, optionally moving its scope
リクエスト形式: application/json; 応答形式: application/json.
引数
memoryID · path · 必須
{
"description": "Memory ID",
"in": "path",
"name": "memoryID",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Memory update",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"content": {
"example": "Prefer concise validation notes.",
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"example": "project-preferences",
"type": "string"
},
"scope_id": {
"example": "",
"type": "string"
},
"scope_type": {
"enum": [
"task_agent",
"webhook"
],
"example": "task_agent",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"memory": {
"properties": {
"content": {
"type": "string"
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"type": "string"
},
"scope_id": {
"example": "",
"type": "string"
},
"scope_type": {
"enum": [
"task_agent",
"webhook"
],
"example": "task_agent",
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}404 Not Found
{
"properties": {
"code": {
"description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
"example": 0,
"type": "integer"
},
"message": {
"description": "Message is a human-readable status or error description.",
"example": "ok",
"type": "string"
}
},
"type": "object"
}PATCH /api/public/v1/memories/by-id/{memoryID}Update a memory by ID, optionally moving its scope
リクエスト形式: application/json; 応答形式: application/json.
引数
memoryID · path · 必須
{
"description": "Memory ID",
"in": "path",
"name": "memoryID",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Memory update",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"content": {
"example": "Prefer concise validation notes.",
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"example": "project-preferences",
"type": "string"
},
"scope_id": {
"example": "",
"type": "string"
},
"scope_type": {
"enum": [
"task_agent",
"webhook"
],
"example": "task_agent",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"memory": {
"properties": {
"content": {
"type": "string"
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"type": "string"
},
"scope_id": {
"example": "",
"type": "string"
},
"scope_type": {
"enum": [
"task_agent",
"webhook"
],
"example": "task_agent",
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}404 Not Found
{
"properties": {
"code": {
"description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
"example": 0,
"type": "integer"
},
"message": {
"description": "Message is a human-readable status or error description.",
"example": "ok",
"type": "string"
}
},
"type": "object"
}DELETE /api/public/v1/memories/by-id/{memoryID}Delete a memory by ID within the authenticated user
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
memoryID · path · 必須
{
"description": "Memory ID",
"in": "path",
"name": "memoryID",
"required": true,
"type": "string"
}応答
200 OK
{
"properties": {
"ok": {
"example": true,
"type": "boolean"
}
},
"type": "object"
}GET /api/public/v1/memories/{name}Read, update, or delete a public Task Agent memory
リクエスト形式: application/json; 応答形式: application/json.
引数
name · path · 必須
{
"description": "Memory name",
"in": "path",
"name": "name",
"required": true,
"type": "string"
}request · body · 任意
{
"description": "Memory request",
"in": "body",
"name": "request",
"schema": {
"properties": {
"content": {
"example": "Prefer concise validation notes.",
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"example": "project-preferences",
"type": "string"
},
"scope_id": {
"example": "",
"type": "string"
},
"scope_type": {
"enum": [
"task_agent",
"webhook"
],
"example": "task_agent",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"memory": {
"properties": {
"content": {
"type": "string"
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"type": "string"
},
"scope_id": {
"example": "",
"type": "string"
},
"scope_type": {
"enum": [
"task_agent",
"webhook"
],
"example": "task_agent",
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}PUT /api/public/v1/memories/{name}Read, update, or delete a public Task Agent memory
リクエスト形式: application/json; 応答形式: application/json.
引数
name · path · 必須
{
"description": "Memory name",
"in": "path",
"name": "name",
"required": true,
"type": "string"
}request · body · 任意
{
"description": "Memory request",
"in": "body",
"name": "request",
"schema": {
"properties": {
"content": {
"example": "Prefer concise validation notes.",
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"example": "project-preferences",
"type": "string"
},
"scope_id": {
"example": "",
"type": "string"
},
"scope_type": {
"enum": [
"task_agent",
"webhook"
],
"example": "task_agent",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"memory": {
"properties": {
"content": {
"type": "string"
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"type": "string"
},
"scope_id": {
"example": "",
"type": "string"
},
"scope_type": {
"enum": [
"task_agent",
"webhook"
],
"example": "task_agent",
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}PATCH /api/public/v1/memories/{name}Read, update, or delete a public Task Agent memory
リクエスト形式: application/json; 応答形式: application/json.
引数
name · path · 必須
{
"description": "Memory name",
"in": "path",
"name": "name",
"required": true,
"type": "string"
}request · body · 任意
{
"description": "Memory request",
"in": "body",
"name": "request",
"schema": {
"properties": {
"content": {
"example": "Prefer concise validation notes.",
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"example": "project-preferences",
"type": "string"
},
"scope_id": {
"example": "",
"type": "string"
},
"scope_type": {
"enum": [
"task_agent",
"webhook"
],
"example": "task_agent",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"memory": {
"properties": {
"content": {
"type": "string"
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"type": "string"
},
"scope_id": {
"example": "",
"type": "string"
},
"scope_type": {
"enum": [
"task_agent",
"webhook"
],
"example": "task_agent",
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}DELETE /api/public/v1/memories/{name}Read, update, or delete a public Task Agent memory
リクエスト形式: application/json; 応答形式: application/json.
引数
name · path · 必須
{
"description": "Memory name",
"in": "path",
"name": "name",
"required": true,
"type": "string"
}request · body · 任意
{
"description": "Memory request",
"in": "body",
"name": "request",
"schema": {
"properties": {
"content": {
"example": "Prefer concise validation notes.",
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"example": "project-preferences",
"type": "string"
},
"scope_id": {
"example": "",
"type": "string"
},
"scope_type": {
"enum": [
"task_agent",
"webhook"
],
"example": "task_agent",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"memory": {
"properties": {
"content": {
"type": "string"
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"name": {
"type": "string"
},
"scope_id": {
"example": "",
"type": "string"
},
"scope_type": {
"enum": [
"task_agent",
"webhook"
],
"example": "task_agent",
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}ファイル
GET /api/public/v1/filesList, download, or delete public workspace files
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
session_id · query · 任意
{
"description": "Session ID",
"in": "query",
"name": "session_id",
"type": "string"
}path · query · 任意
{
"description": "Workspace directory path",
"in": "query",
"name": "path",
"type": "string"
}scope · query · 任意
{
"description": "Workspace scope",
"in": "query",
"name": "scope",
"type": "string"
}応答
200 OK
{
"properties": {
"has_more": {
"type": "boolean"
},
"items": {
"items": {
"properties": {
"file_id": {
"example": "opaque-file-id",
"type": "string"
},
"id": {
"example": "opaque-file-id",
"type": "string"
},
"name": {
"example": "report.csv",
"type": "string"
},
"path": {
"example": "uploads/upload-id/report.csv",
"type": "string"
},
"relative_path": {
"example": "uploads/upload-id/report.csv",
"type": "string"
},
"session_id": {
"type": "string"
},
"size_bytes": {
"example": 1024,
"type": "integer"
},
"type": {
"example": "file",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"next_cursor": {
"type": "string"
}
},
"type": "object"
}POST /api/public/v1/filesUpload a public Task Agent file
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
file · formData · 必須
{
"description": "File",
"in": "formData",
"name": "file",
"required": true,
"type": "file"
}応答
201 Created
{
"properties": {
"file": {
"properties": {
"file_id": {
"example": "opaque-file-id",
"type": "string"
},
"id": {
"example": "opaque-file-id",
"type": "string"
},
"name": {
"example": "report.csv",
"type": "string"
},
"path": {
"example": "uploads/upload-id/report.csv",
"type": "string"
},
"relative_path": {
"example": "uploads/upload-id/report.csv",
"type": "string"
},
"session_id": {
"type": "string"
},
"size_bytes": {
"example": 1024,
"type": "integer"
},
"type": {
"example": "file",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}GET /api/public/v1/files.zipDownload a public workspace ZIP
リクエスト形式: 本文形式の指定なし; 応答形式: application/zip.
引数
session_id · query · 任意
{
"description": "Session ID",
"in": "query",
"name": "session_id",
"type": "string"
}scope · query · 任意
{
"description": "Workspace scope",
"in": "query",
"name": "scope",
"type": "string"
}応答
200 Workspace ZIP
{
"type": "file"
}GET /api/public/v1/files/{relativePath}Download or delete a public workspace file
リクエスト形式: 本文形式の指定なし; 応答形式: application/octet-stream.
引数
relativePath · path · 必須
{
"description": "Workspace relative path",
"in": "path",
"name": "relativePath",
"required": true,
"type": "string"
}session_id · query · 任意
{
"description": "Session ID",
"in": "query",
"name": "session_id",
"type": "string"
}file_id · query · 必須
{
"description": "Opaque file ID",
"in": "query",
"name": "file_id",
"required": true,
"type": "string"
}scope · query · 任意
{
"description": "Workspace scope",
"in": "query",
"name": "scope",
"type": "string"
}応答
200 Workspace file
{
"type": "file"
}DELETE /api/public/v1/files/{relativePath}Download or delete a public workspace file
リクエスト形式: 本文形式の指定なし; 応答形式: application/octet-stream.
引数
relativePath · path · 必須
{
"description": "Workspace relative path",
"in": "path",
"name": "relativePath",
"required": true,
"type": "string"
}session_id · query · 任意
{
"description": "Session ID",
"in": "query",
"name": "session_id",
"type": "string"
}file_id · query · 必須
{
"description": "Opaque file ID",
"in": "query",
"name": "file_id",
"required": true,
"type": "string"
}scope · query · 任意
{
"description": "Workspace scope",
"in": "query",
"name": "scope",
"type": "string"
}応答
200 Workspace file
{
"type": "file"
}コネクター
GET /api/public/v1/connectors/accountsList public connector accounts
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
仕様に引数の定義はありません。
応答
200 OK
{
"properties": {
"connector_accounts": {
"items": {
"additionalProperties": {},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}GET /api/public/v1/connectors/accounts/{id}Read, update, or delete a public connector account
リクエスト形式: application/json; 応答形式: application/json.
引数
id · path · 必須
{
"description": "Connector account ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}request · body · 任意
{
"description": "Connector account request",
"in": "body",
"name": "request",
"schema": {
"properties": {
"external_account_ref": {
"example": "connected-account-id",
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"provider": {
"example": "github",
"type": "string"
},
"status": {
"example": "connected",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"connector_account": {
"additionalProperties": {},
"type": "object"
}
},
"type": "object"
}PUT /api/public/v1/connectors/accounts/{id}Read, update, or delete a public connector account
リクエスト形式: application/json; 応答形式: application/json.
引数
id · path · 必須
{
"description": "Connector account ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}request · body · 任意
{
"description": "Connector account request",
"in": "body",
"name": "request",
"schema": {
"properties": {
"external_account_ref": {
"example": "connected-account-id",
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"provider": {
"example": "github",
"type": "string"
},
"status": {
"example": "connected",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"connector_account": {
"additionalProperties": {},
"type": "object"
}
},
"type": "object"
}PATCH /api/public/v1/connectors/accounts/{id}Read, update, or delete a public connector account
リクエスト形式: application/json; 応答形式: application/json.
引数
id · path · 必須
{
"description": "Connector account ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}request · body · 任意
{
"description": "Connector account request",
"in": "body",
"name": "request",
"schema": {
"properties": {
"external_account_ref": {
"example": "connected-account-id",
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"provider": {
"example": "github",
"type": "string"
},
"status": {
"example": "connected",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"connector_account": {
"additionalProperties": {},
"type": "object"
}
},
"type": "object"
}DELETE /api/public/v1/connectors/accounts/{id}Read, update, or delete a public connector account
リクエスト形式: application/json; 応答形式: application/json.
引数
id · path · 必須
{
"description": "Connector account ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}request · body · 任意
{
"description": "Connector account request",
"in": "body",
"name": "request",
"schema": {
"properties": {
"external_account_ref": {
"example": "connected-account-id",
"type": "string"
},
"metadata": {
"additionalProperties": {},
"type": "object"
},
"provider": {
"example": "github",
"type": "string"
},
"status": {
"example": "connected",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"connector_account": {
"additionalProperties": {},
"type": "object"
}
},
"type": "object"
}GET /api/public/v1/connectors/catalogList public connector catalog
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
search · query · 任意
{
"description": "Search toolkits",
"in": "query",
"name": "search",
"type": "string"
}cursor · query · 任意
{
"description": "Next cursor",
"in": "query",
"name": "cursor",
"type": "string"
}limit · query · 任意
{
"description": "Page size, maximum 100",
"in": "query",
"name": "limit",
"type": "integer"
}応答
200 OK
{
"properties": {
"agent_id": {
"type": "string"
},
"connection_scope": {
"type": "string"
},
"connectors": {
"items": {
"properties": {
"account_label": {
"type": "string"
},
"description": {
"type": "string"
},
"label": {
"example": "GitHub",
"type": "string"
},
"logo": {
"type": "string"
},
"provider": {
"example": "github",
"type": "string"
},
"runtime_provider": {
"example": "composio",
"type": "string"
},
"start_url": {
"type": "string"
},
"status": {
"example": "connected",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"has_more": {
"type": "boolean"
},
"limit": {
"example": 20,
"type": "integer"
},
"next_cursor": {
"type": "string"
},
"profile_id": {
"type": "string"
},
"search": {
"example": "github",
"type": "string"
}
},
"type": "object"
}GET /api/public/v1/connectors/statusList public connector status
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
search · query · 任意
{
"description": "Search connector catalog",
"in": "query",
"name": "search",
"type": "string"
}cursor · query · 任意
{
"description": "Next cursor",
"in": "query",
"name": "cursor",
"type": "string"
}limit · query · 任意
{
"description": "Page size, maximum 100",
"in": "query",
"name": "limit",
"type": "integer"
}応答
200 OK
{
"properties": {
"agent_id": {
"type": "string"
},
"connection_scope": {
"type": "string"
},
"connectors": {
"items": {
"properties": {
"account_label": {
"type": "string"
},
"description": {
"type": "string"
},
"label": {
"example": "GitHub",
"type": "string"
},
"logo": {
"type": "string"
},
"provider": {
"example": "github",
"type": "string"
},
"runtime_provider": {
"example": "composio",
"type": "string"
},
"start_url": {
"type": "string"
},
"status": {
"example": "connected",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"has_more": {
"type": "boolean"
},
"limit": {
"example": 20,
"type": "integer"
},
"next_cursor": {
"type": "string"
},
"profile_id": {
"type": "string"
},
"search": {
"example": "github",
"type": "string"
}
},
"type": "object"
}POST /api/public/v1/connectors/{provider}/oauth/authorizeStart public connector OAuth authorization
リクエスト形式: application/json; 応答形式: application/json.
引数
provider · path · 必須
{
"description": "Connector provider",
"in": "path",
"name": "provider",
"required": true,
"type": "string"
}応答
200 OK
{
"properties": {
"auth_url": {
"type": "string"
},
"connected_account_id": {
"type": "string"
}
},
"type": "object"
}シークレット
GET /api/public/v1/secretsList User Secrets
Lists owned User Secret metadata. Secret values are write-only and are never returned.
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
仕様に引数の定義はありません。
応答
200 OK
{
"properties": {
"secrets": {
"items": {
"properties": {
"created_at": {
"type": "string"
},
"id": {
"example": "sec_123",
"type": "string"
},
"name": {
"example": "kubeconfig",
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}POST /api/public/v1/secretsCreate a User Secret
Creates a write-only User Secret. The response returns metadata only.
リクエスト形式: application/json; 応答形式: application/json.
引数
request · body · 必須
{
"description": "Secret request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"name": {
"example": "kubeconfig",
"type": "string"
},
"value": {
"example": "write-only",
"type": "string"
}
},
"type": "object"
}
}応答
201 Created
{
"properties": {
"secret": {
"properties": {
"created_at": {
"type": "string"
},
"id": {
"example": "sec_123",
"type": "string"
},
"name": {
"example": "kubeconfig",
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}PATCH /api/public/v1/secrets/{secretID}Update a User Secret value
Replaces the write-only Secret value. The response returns metadata only.
リクエスト形式: application/json; 応答形式: application/json.
引数
secretID · path · 必須
{
"description": "Secret ID",
"in": "path",
"name": "secretID",
"required": true,
"type": "string"
}request · body · 必須
{
"description": "Secret request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"value": {
"example": "write-only",
"type": "string"
}
},
"type": "object"
}
}応答
200 OK
{
"properties": {
"secret": {
"properties": {
"created_at": {
"type": "string"
},
"id": {
"example": "sec_123",
"type": "string"
},
"name": {
"example": "kubeconfig",
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}404 Not Found
{
"properties": {
"code": {
"description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
"example": 0,
"type": "integer"
},
"message": {
"description": "Message is a human-readable status or error description.",
"example": "ok",
"type": "string"
}
},
"type": "object"
}DELETE /api/public/v1/secrets/{secretID}Delete a User Secret
リクエスト形式: 本文形式の指定なし; 応答形式: application/json.
引数
secretID · path · 必須
{
"description": "Secret ID",
"in": "path",
"name": "secretID",
"required": true,
"type": "string"
}応答
204 No Content
404 Not Found
{
"properties": {
"code": {
"description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
"example": 0,
"type": "integer"
},
"message": {
"description": "Message is a human-readable status or error description.",
"example": "ok",
"type": "string"
}
},
"type": "object"
}409 Conflict
{
"properties": {
"code": {
"description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
"example": 0,
"type": "integer"
},
"message": {
"description": "Message is a human-readable status or error description.",
"example": "ok",
"type": "string"
}
},
"type": "object"
}WeChat カスタマーサービスのアカウントを取得
WeChat チャネルの下書きを作成し、WeCom 側の認可を完了した後、channels:write を持つ Profile API key で POST /api/public/v1/channels/{connection_id}/wechat-kf/accounts を呼び出します。書き込み権限は読み取りを含みます。単一 Agent の会話キーでは利用できません。
リクエスト本文(Secret のプレースホルダーはクライアントの保護された引数で置き換え、プロンプトやログには記載しないでください):
{"corp_secret":"<APPLICATION_SECRET>"}成功時の応答(200):
{"accounts":[{"open_kfid":"wk-example","name":"Customer support","manage_privilege":true}]}manage_privilege: true のアカウントを名前で選択します。管理可能なアカウントが 1 つなら事前選択でき、複数ならユーザーが選びます。空の一覧も有効です。一覧取得では Secret の保存や紐付けの変更は行いません。確定時に同じ corp_secret と選択した open_kfid を PATCH /api/public/v1/channels/{connection_id}/wechat-kf に送信します。サーバーは管理権限を再確認します。
400/422 wechat_credentials_invalid はアプリの Secret と企業 ID を確認します。422 wechat_permission_denied はアプリにカスタマーサービス API の利用を許可し、422 wechat_ip_not_allowed は信頼する送信元 IP を設定します。422/502 wechat_accounts_unavailable は再試行してください。401/403 は API key と権限、404 はチャネルの所有権、409 はチャネルアカウントの初期化を確認します。