跳到文档正文
DOOUDEVELOPERS

BUILD WITH DOOU

把客户数据,
接入你的应用。

从第一条请求到完整业务流程。在这里了解 DOOU 的认证方式、数据结构与调用规范,让你的系统与 AI 助手使用同一份业务上下文。

开放平台分阶段开放。本页描述当前接口契约,并不表示全部能力已在生产环境开放。请使用接入时提供的已验收环境地址及授权范围。

01 / AUTHENTICATION

认证与权限

在 DOOU 连接界面创建访问令牌,保存在调用方服务端的环境变量或密钥管理服务中。业务接口使用 Bearer 认证;浏览器前端不持有访问令牌。

HTTP
Authorization: Bearer <DOOU_ACCESS_TOKEN>
Content-Type: application/json

DOOU_BASE_URL 是获准环境的 origin,例如本地开发的 http://127.0.0.1:3003。用户和工作区由服务端根据凭据确定,无需在请求中传入。报价与确认使用同一访问凭据。

操作所需 Scope
读取已保存客户customers:read
创建搜索草稿customer_searches:write
报价与确认搜索customer_searches:execute
读取运行 / 成果runs:read / artifacts:read
读取用量回执usage:read

按需申请权限。涉及付费执行、消息发送或其他写入的操作,还需完成对应的报价或审核确认。

02 / FIRST REQUEST

先读取一份已保存的名单

在服务端配置好 DOOU_BASE_URLDOOU_ACCESS_TOKEN 后,使用拥有 customers:read 权限的令牌发起请求。

cURL · 只读请求
curl "$DOOU_BASE_URL/api/v1/customer-lists?limit=20&offset=0" \
  -H "Authorization: Bearer $DOOU_ACCESS_TOKEN"

REST 成功响应将业务结果放在 datameta.requestId 用于排查请求。名单索引返回后,使用名单 ID 调用 GET /api/v1/customer-lists/{id} 读取企业明细。具体响应字段见下方对应接口。

文档中的 v1 与 v2 是公开协议版本。请使用目录列出的完整路径,不要自行替换版本号。发现入口 /api/v2、OpenAPI 和 Schema 索引无需业务令牌。

04 / DATA DICTIONARY

可理解,也可校验的数据

字段结构使用版本化 JSON Schema 描述。下面是共享数据模型;具体接口可能返回名单投影或任务快照,请以该接口的响应 Schema 为准,勿将共享企业模型直接当作所有名单行的结构。

企业 Companycompany.v1
字段必填说明 / 类型与约束
id资源唯一标识string · 至少 1 字符 · 至多 160 字符
name名称string · 至少 1 字符 · 至多 240 字符
legalName按场景企业法定名称string · 至多 240 字符
aliases按场景array · 元素:string · 至多 240 字符 · 最多 20 项
domain按场景企业域名string · 至多 240 字符
website按场景企业网站string · uri · 至多 500 字符
identityStatusstring · 可选:verified / matched / candidate / conflicting
industry按场景object
firmographics按场景object
locationobject
businessRolesarray · 元素:string · 可选:importer / distributor / wholesaler / retailer / brand / manufacturer / service_provider / other · 最多 20 项
relevance按场景object
contactPoints联系渠道及各自的核验信息array · 元素:contact-point.v1 · 最多 50 项
socialProfiles社交平台资料array · 元素:social-profile.v1 · 最多 30 项
peoplearray · 元素:person.v1 · 最多 30 项
evidence支撑数据的来源证据array · 元素:evidence-reference.v1 · 最多 50 项
observedAt按场景数据观察时间string · date-time · RFC 3339 timestamp in UTC.
updatedAt最近更新时间string · date-time · RFC 3339 timestamp in UTC.
完整 JSON Schema · 含嵌套字段与组合约束
company.v1
{
  "$id": "https://doouai.com/api/v2/schemas/company.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "DOOU company",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "name",
    "identityStatus",
    "location",
    "businessRoles",
    "contactPoints",
    "socialProfiles",
    "people",
    "evidence",
    "updatedAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 240
    },
    "legalName": {
      "type": "string",
      "maxLength": 240
    },
    "aliases": {
      "type": "array",
      "maxItems": 20,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "maxLength": 240
      }
    },
    "domain": {
      "type": "string",
      "maxLength": 240
    },
    "website": {
      "type": "string",
      "format": "uri",
      "maxLength": 500
    },
    "identityStatus": {
      "type": "string",
      "enum": [
        "verified",
        "matched",
        "candidate",
        "conflicting"
      ]
    },
    "industry": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 160
        },
        "codes": {
          "type": "array",
          "maxItems": 20,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "maxLength": 40
          }
        }
      }
    },
    "firmographics": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "employeeCount": {
          "type": "integer",
          "minimum": 0
        },
        "employeeRange": {
          "type": "string",
          "maxLength": 80
        },
        "foundedYear": {
          "type": "integer",
          "minimum": 1000,
          "maximum": 9999
        },
        "annualRevenue": {
          "$ref": "https://doouai.com/api/v2/schemas/money.v1.json"
        },
        "fundingStage": {
          "type": "string",
          "maxLength": 80
        },
        "totalFunding": {
          "$ref": "https://doouai.com/api/v2/schemas/money.v1.json"
        }
      }
    },
    "location": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "countryCode": {
          "type": "string",
          "pattern": "^[A-Z]{2}$"
        },
        "country": {
          "type": "string",
          "maxLength": 120
        },
        "region": {
          "type": "string",
          "maxLength": 160
        },
        "city": {
          "type": "string",
          "maxLength": 160
        }
      }
    },
    "businessRoles": {
      "type": "array",
      "maxItems": 20,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "importer",
          "distributor",
          "wholesaler",
          "retailer",
          "brand",
          "manufacturer",
          "service_provider",
          "other"
        ]
      }
    },
    "relevance": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "matched",
            "suspected",
            "unknown",
            "excluded"
          ]
        },
        "score": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "reasons": {
          "type": "array",
          "maxItems": 12,
          "items": {
            "type": "string",
            "maxLength": 240
          }
        }
      }
    },
    "contactPoints": {
      "type": "array",
      "maxItems": 50,
      "items": {
        "$ref": "https://doouai.com/api/v2/schemas/contact-point.v1.json"
      }
    },
    "socialProfiles": {
      "type": "array",
      "maxItems": 30,
      "items": {
        "$ref": "https://doouai.com/api/v2/schemas/social-profile.v1.json"
      }
    },
    "people": {
      "type": "array",
      "maxItems": 30,
      "items": {
        "$ref": "https://doouai.com/api/v2/schemas/person.v1.json"
      }
    },
    "evidence": {
      "type": "array",
      "maxItems": 50,
      "items": {
        "$ref": "https://doouai.com/api/v2/schemas/evidence-reference.v1.json"
      }
    },
    "observedAt": {
      "type": "string",
      "format": "date-time",
      "description": "RFC 3339 timestamp in UTC."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "RFC 3339 timestamp in UTC."
    }
  }
}
company.v1
联系人 Personperson.v1
字段必填说明 / 类型与约束
id资源唯一标识string · 至少 1 字符 · 至多 160 字符
name名称string · 至少 1 字符 · 至多 160 字符
companyId所属企业标识string · 至少 1 字符 · 至多 160 字符
title按场景职务string · 至多 160 字符
department按场景部门string · 至多 120 字符
seniority按场景职级string · 至多 80 字符
requestedRole按场景string · 至多 120 字符
employmentStatus当前任职核验状态string · 可选:current_verified / current_candidate / unverified / former / conflicting
verificationStatus实体或渠道核验状态string · 可选:verified / candidate / conflicting / expired
confidence按场景置信度number · 最小 0 · 最大 100
observedAt按场景数据观察时间string · date-time · RFC 3339 timestamp in UTC.
contactPoints联系渠道及各自的核验信息array · 元素:contact-point.v1 · 最多 20 项
socialProfiles社交平台资料array · 元素:social-profile.v1 · 最多 20 项
evidence支撑数据的来源证据array · 元素:evidence-reference.v1 · 最多 30 项
完整 JSON Schema · 含嵌套字段与组合约束
person.v1
{
  "$id": "https://doouai.com/api/v2/schemas/person.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "DOOU person",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "name",
    "companyId",
    "employmentStatus",
    "verificationStatus",
    "contactPoints",
    "socialProfiles",
    "evidence"
  ],
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "companyId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "title": {
      "type": "string",
      "maxLength": 160
    },
    "department": {
      "type": "string",
      "maxLength": 120
    },
    "seniority": {
      "type": "string",
      "maxLength": 80
    },
    "requestedRole": {
      "type": "string",
      "maxLength": 120
    },
    "employmentStatus": {
      "type": "string",
      "enum": [
        "current_verified",
        "current_candidate",
        "unverified",
        "former",
        "conflicting"
      ]
    },
    "verificationStatus": {
      "type": "string",
      "enum": [
        "verified",
        "candidate",
        "conflicting",
        "expired"
      ]
    },
    "confidence": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "observedAt": {
      "type": "string",
      "format": "date-time",
      "description": "RFC 3339 timestamp in UTC."
    },
    "contactPoints": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "$ref": "https://doouai.com/api/v2/schemas/contact-point.v1.json"
      }
    },
    "socialProfiles": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "$ref": "https://doouai.com/api/v2/schemas/social-profile.v1.json"
      }
    },
    "evidence": {
      "type": "array",
      "maxItems": 30,
      "items": {
        "$ref": "https://doouai.com/api/v2/schemas/evidence-reference.v1.json"
      }
    }
  }
}
person.v1
联系渠道 Contact pointcontact-point.v1
字段必填说明 / 类型与约束
typestring · 可选:email / phone / whatsapp
valuestring · 至少 1 字符 · 至多 500 字符
label按场景string · 至多 80 字符
ownerType渠道归属主体string · 可选:company / person / unknown
usage按场景渠道用途string · 可选:general / sales / support / procurement / executive / personal / unknown
verificationStatus实体或渠道核验状态string · 可选:verified / valid / accept_all / observed / unverified / risky / invalid / expired
confidence按场景置信度number · 最小 0 · 最大 100
observedAt按场景数据观察时间string · date-time · RFC 3339 timestamp in UTC.
evidence支撑数据的来源证据array · 元素:evidence-reference.v1 · 最多 20 项
完整 JSON Schema · 含嵌套字段与组合约束
contact-point.v1
{
  "$id": "https://doouai.com/api/v2/schemas/contact-point.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "DOOU contact point",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "type",
    "value",
    "ownerType",
    "verificationStatus",
    "evidence"
  ],
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "email",
        "phone",
        "whatsapp"
      ]
    },
    "value": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "label": {
      "type": "string",
      "maxLength": 80
    },
    "ownerType": {
      "type": "string",
      "enum": [
        "company",
        "person",
        "unknown"
      ]
    },
    "usage": {
      "type": "string",
      "enum": [
        "general",
        "sales",
        "support",
        "procurement",
        "executive",
        "personal",
        "unknown"
      ]
    },
    "verificationStatus": {
      "type": "string",
      "enum": [
        "verified",
        "valid",
        "accept_all",
        "observed",
        "unverified",
        "risky",
        "invalid",
        "expired"
      ]
    },
    "confidence": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "observedAt": {
      "type": "string",
      "format": "date-time",
      "description": "RFC 3339 timestamp in UTC."
    },
    "evidence": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "$ref": "https://doouai.com/api/v2/schemas/evidence-reference.v1.json"
      }
    }
  }
}
contact-point.v1
来源与核验 Evidenceevidence-reference.v1
字段必填说明 / 类型与约束
sourceName来源名称string · 至少 1 字符 · 至多 160 字符
sourceType按场景string · 可选:first_party / official_registry / structured_provider / public_web / user_supplied
sourceUrl按场景来源页面地址string · uri · 至多 500 字符
sourceRecordId按场景string · 至少 1 字符 · 至多 180 字符
observedAt数据观察时间string · date-time · RFC 3339 timestamp in UTC.
retrievedAt按场景数据获取时间string · date-time · RFC 3339 timestamp in UTC.
validUntil按场景有效期截止时间string · date-time · RFC 3339 timestamp in UTC.
verificationState证据核验状态string · 可选:observed / verified / corroborated / conflicting / expired
confidence按场景置信度number · 最小 0 · 最大 100
supports按场景该证据支持的字段或结论array · 元素:string · 至少 1 字符 · 至多 120 字符 · 最多 20 项
完整 JSON Schema · 含嵌套字段与组合约束
evidence-reference.v1
{
  "$id": "https://doouai.com/api/v2/schemas/evidence-reference.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "DOOU evidence reference",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "sourceName",
    "observedAt",
    "verificationState"
  ],
  "properties": {
    "sourceName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "sourceType": {
      "type": "string",
      "enum": [
        "first_party",
        "official_registry",
        "structured_provider",
        "public_web",
        "user_supplied"
      ]
    },
    "sourceUrl": {
      "type": "string",
      "format": "uri",
      "maxLength": 500
    },
    "sourceRecordId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180
    },
    "observedAt": {
      "type": "string",
      "format": "date-time",
      "description": "RFC 3339 timestamp in UTC."
    },
    "retrievedAt": {
      "type": "string",
      "format": "date-time",
      "description": "RFC 3339 timestamp in UTC."
    },
    "validUntil": {
      "type": "string",
      "format": "date-time",
      "description": "RFC 3339 timestamp in UTC."
    },
    "verificationState": {
      "type": "string",
      "enum": [
        "observed",
        "verified",
        "corroborated",
        "conflicting",
        "expired"
      ]
    },
    "confidence": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "supports": {
      "type": "array",
      "maxItems": 20,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 120
      }
    }
  }
}
evidence-reference.v1
命令回执 Receiptworkflow-command-receipt.v1
字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"workflow-command-receipt.v1"
receiptId命令回执标识string
operation业务操作标识string · 至少 1 字符 · 至多 160 字符
state命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired
inputHash按场景string
input按场景object
pricing按场景本次操作的费用信息object
workflow按场景object | null
workflowRunId按场景工作流运行标识string | null
statusUrl状态查询地址string · 至少 1 字符 · 至多 500 字符
resultStatus结果是否可用string · 可选:available / missing / pending / unavailable
result已产生的业务结果object | null
errorCode业务错误码string · 至多 120 字符 | null
replayed是否重放已有回执boolean
externalWritePerformed按场景boolean · 固定值:false
完整 JSON Schema · 含嵌套字段与组合约束
workflow-command-receipt.v1
{
  "$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schemaVersion",
    "receiptId",
    "operation",
    "state",
    "statusUrl",
    "resultStatus",
    "result",
    "errorCode",
    "replayed"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workflow-command-receipt.v1"
    },
    "receiptId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "operation": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "state": {
      "type": "string",
      "enum": [
        "quoted",
        "executing",
        "accepted",
        "running",
        "succeeded",
        "failed",
        "unknown",
        "expired"
      ]
    },
    "inputHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "input": {
      "type": "object"
    },
    "pricing": {
      "type": "object"
    },
    "workflow": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "workflowRunId": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "statusUrl": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "resultStatus": {
      "type": "string",
      "enum": [
        "available",
        "missing",
        "pending",
        "unavailable"
      ]
    },
    "result": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "errorCode": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "replayed": {
      "type": "boolean"
    },
    "externalWritePerformed": {
      "const": false
    }
  }
}
workflow-command-receipt.v1

同步数据时保留来源、采集时间与核验状态。候选联系人不等于已核验联系人;缺失字段保持缺失或契约允许的 null,不要补造业务事实。

浏览全部 JSON Schema

05 / API REFERENCE

按业务能力查找接口

展开接口查看权限、输入字段与 data 结构。GET 输入映射为查询参数;路径中的 ID 放在路径。POST 输入放在 JSON 请求体,idempotencyKey 在 REST 中使用 Idempotency-Key 请求头。完整参数位置以 OpenAPI 为准。

products

已确认的用户产品与可复用产品资料。

GET/api/v2/products+

权限 products:read

请求字段

字段必填说明 / 类型与约束
limit按场景单页条数integer · 最小 1 · 最大 8 · 默认 8
完整 JSON Schema · 含嵌套字段与组合约束
doou-product-profile-query.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-product-profile-query.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 8,
      "default": 8
    }
  }
}
doou-product-profile-query.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-product-profile-index.v1"
profilesarray · 元素:object · 最多 8 项
summaryobject
metaobject
完整 JSON Schema · 含嵌套字段与组合约束
doou-product-profile-index.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-product-profile-index.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "profiles",
    "summary",
    "meta"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-product-profile-index.v1"
    },
    "profiles": {
      "type": "array",
      "maxItems": 8,
      "items": {
        "type": "object"
      }
    },
    "summary": {
      "type": "object"
    },
    "meta": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "liveProviderCalls",
        "externalWrites"
      ],
      "properties": {
        "source": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "scope": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "liveProviderCalls": {
          "const": false
        },
        "externalWrites": {
          "const": false
        },
        "modelCalls": {
          "type": "boolean"
        },
        "fullBodyIncluded": {
          "type": "boolean"
        }
      }
    }
  }
}
doou-product-profile-index.v1

错误码:unauthorized · scope_forbidden · rate_limited · invalid_pagination · product_profile_storage_unavailable · product_profile_read_failed · internal_error

MCP 工具:doou_list_product_profiles

customer_searches

客户发现 TaskDraft、报价、执行和增量状态。

POST/api/v2/customer-searches/drafts+

权限 customer_searches:write · 需要 Idempotency-Key

请求字段

字段必填说明 / 类型与约束
draft按场景服务端返回的完整范围草稿doou-customer-search-draft.v1
product按场景目标产品或品类string · 至少 2 字符 · 至多 120 字符
market按场景目标市场 / 国家string · 至少 2 字符 · 至多 100 字符
resultLimit按场景希望交付的客户数量integer · 最小 1 · 最大 20 · 默认 10
customerTypes按场景目标采购方类型array · 元素:string · 至少 2 字符 · 至多 60 字符 · 最多 5 项
contactRequirement按场景联系渠道要求string · 可选:any_contact / email / phone · 默认 "any_contact"
idempotencyKey按场景REST 放在 Idempotency-Key 请求头;MCP 放在参数中string
完整 JSON Schema · 含嵌套字段与组合约束
doou-customer-search-draft-request.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-customer-search-draft-request.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "anyOf": [
    {
      "required": [
        "draft"
      ]
    },
    {
      "required": [
        "product",
        "market"
      ]
    }
  ],
  "properties": {
    "draft": {
      "$ref": "https://doouai.com/api/v2/schemas/doou-customer-search-draft.v1.json"
    },
    "product": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120
    },
    "market": {
      "type": "string",
      "minLength": 2,
      "maxLength": 100
    },
    "resultLimit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20,
      "default": 10
    },
    "customerTypes": {
      "type": "array",
      "maxItems": 5,
      "items": {
        "type": "string",
        "minLength": 2,
        "maxLength": 60
      }
    },
    "contactRequirement": {
      "type": "string",
      "enum": [
        "any_contact",
        "email",
        "phone"
      ],
      "default": "any_contact"
    },
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
    }
  }
}
doou-customer-search-draft-request.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-customer-search-draft.v1"
draftId草稿标识string
revision数据修订版本integer · 最小 1
statusstring · 固定值:"scope_ready"
scope已确认的任务范围object
updatedAt最近更新时间string · date-time
完整 JSON Schema · 含嵌套字段与组合约束
doou-customer-search-draft.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-customer-search-draft.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "draftId",
    "revision",
    "status",
    "scope",
    "updatedAt"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-customer-search-draft.v1"
    },
    "draftId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "revision": {
      "type": "integer",
      "minimum": 1
    },
    "status": {
      "const": "scope_ready"
    },
    "scope": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "product",
        "market",
        "resultLimit",
        "customerTypes",
        "includeContacts",
        "contactRequirement"
      ],
      "properties": {
        "product": {
          "type": "string",
          "minLength": 2,
          "maxLength": 120
        },
        "market": {
          "type": "string",
          "minLength": 2,
          "maxLength": 100
        },
        "resultLimit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 20
        },
        "customerTypes": {
          "type": "array",
          "minItems": 1,
          "maxItems": 5,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 2,
            "maxLength": 60
          }
        },
        "includeContacts": {
          "const": true
        },
        "contactRequirement": {
          "type": "string",
          "enum": [
            "any_contact",
            "email",
            "phone"
          ]
        }
      }
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}
doou-customer-search-draft.v1

错误码:unauthorized · scope_forbidden · rate_limited · customer_product_missing · customer_market_missing · customer_market_invalid · customer_market_requires_country · customer_result_limit_invalid · idempotency_key_invalid · internal_error

MCP 工具:doou_create_customer_search_draft

POST/api/v2/customer-searches/quotes+

权限 customer_searches:execute · 需要 Idempotency-Key

请求字段

字段必填说明 / 类型与约束
draft服务端返回的完整范围草稿doou-customer-search-draft.v1
idempotencyKey按场景REST 放在 Idempotency-Key 请求头;MCP 放在参数中string
完整 JSON Schema · 含嵌套字段与组合约束
doou-customer-search-quote-request.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-customer-search-quote-request.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "draft"
  ],
  "properties": {
    "draft": {
      "$ref": "https://doouai.com/api/v2/schemas/doou-customer-search-draft.v1.json"
    },
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
    }
  }
}
doou-customer-search-quote-request.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-customer-search-quote.v1"
quoteIdstring
operation业务操作标识string · 固定值:"customer_searches.confirm_start"
draft服务端返回的完整范围草稿doou-customer-search-draft.v1
pricing本次操作的费用信息object
confirmation确认要求、凭证和有效期object
replayed是否重放已有回执boolean
providerCallsnumber · 固定值:0
完整 JSON Schema · 含嵌套字段与组合约束
doou-customer-search-quote.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-customer-search-quote.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "quoteId",
    "operation",
    "draft",
    "pricing",
    "confirmation",
    "replayed",
    "providerCalls"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-customer-search-quote.v1"
    },
    "quoteId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "operation": {
      "const": "customer_searches.confirm_start"
    },
    "draft": {
      "$ref": "https://doouai.com/api/v2/schemas/doou-customer-search-draft.v1.json"
    },
    "pricing": {
      "type": "object"
    },
    "confirmation": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "required",
        "expiresAt",
        "token"
      ],
      "properties": {
        "required": {
          "const": true
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        },
        "token": {
          "type": "string",
          "minLength": 32,
          "maxLength": 4096
        }
      }
    },
    "replayed": {
      "type": "boolean"
    },
    "providerCalls": {
      "const": 0
    }
  }
}
doou-customer-search-quote.v1

错误码:unauthorized · scope_forbidden · rate_limited · customer_search_draft_invalid · idempotency_key_invalid · idempotency_conflict · external_confirmation_configuration_missing · external_command_storage_unavailable · external_command_persistence_failed · internal_error

MCP 工具:doou_quote_customer_search

POST/api/v2/customer-searches+

权限 customer_searches:execute · 需要 Idempotency-Key · 需要确认凭证

请求字段

字段必填说明 / 类型与约束
confirmationToken当前报价或审核的确认凭证string · 至少 32 字符 · 至多 4096 字符
idempotencyKey按场景REST 放在 Idempotency-Key 请求头;MCP 放在参数中string
完整 JSON Schema · 含嵌套字段与组合约束
doou-customer-search-confirmation.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-customer-search-confirmation.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "confirmationToken"
  ],
  "properties": {
    "confirmationToken": {
      "type": "string",
      "minLength": 32,
      "maxLength": 4096
    },
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
    }
  }
}
doou-customer-search-confirmation.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"workflow-command-receipt.v1"
receiptId命令回执标识string
operation业务操作标识string · 至少 1 字符 · 至多 160 字符
state命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired
inputHash按场景string
input按场景object
pricing按场景本次操作的费用信息object
workflow按场景object | null
workflowRunId按场景工作流运行标识string | null
statusUrl状态查询地址string · 至少 1 字符 · 至多 500 字符
resultStatus结果是否可用string · 可选:available / missing / pending / unavailable
result已产生的业务结果object | null
errorCode业务错误码string · 至多 120 字符 | null
replayed是否重放已有回执boolean
externalWritePerformed按场景boolean · 固定值:false
完整 JSON Schema · 含嵌套字段与组合约束
workflow-command-receipt.v1
{
  "$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schemaVersion",
    "receiptId",
    "operation",
    "state",
    "statusUrl",
    "resultStatus",
    "result",
    "errorCode",
    "replayed"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workflow-command-receipt.v1"
    },
    "receiptId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "operation": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "state": {
      "type": "string",
      "enum": [
        "quoted",
        "executing",
        "accepted",
        "running",
        "succeeded",
        "failed",
        "unknown",
        "expired"
      ]
    },
    "inputHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "input": {
      "type": "object"
    },
    "pricing": {
      "type": "object"
    },
    "workflow": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "workflowRunId": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "statusUrl": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "resultStatus": {
      "type": "string",
      "enum": [
        "available",
        "missing",
        "pending",
        "unavailable"
      ]
    },
    "result": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "errorCode": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "replayed": {
      "type": "boolean"
    },
    "externalWritePerformed": {
      "const": false
    }
  }
}
workflow-command-receipt.v1

错误码:unauthorized · scope_forbidden · rate_limited · idempotency_key_invalid · confirmation_invalid · confirmation_expired · confirmation_actor_mismatch · confirmation_not_found · confirmation_input_conflict · confirmation_already_used · idempotency_conflict · customer_search_receipt_unknown · external_command_storage_unavailable · external_command_persistence_failed · internal_error

MCP 工具:doou_confirm_customer_search

companies

工作区内已保存企业、公开渠道、负责人摘要和来源。

GET/api/v1/customer-lists+

权限 customers:read

请求字段

字段必填说明 / 类型与约束
limit按场景单页条数integer · 最小 1 · 最大 50 · 默认 20
offset按场景已跳过的条数integer · 最小 0 · 最大 500 · 默认 0
完整 JSON Schema · 含嵌套字段与组合约束
doou-pagination.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-pagination.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "default": 20
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 500,
      "default": 0
    }
  }
}
doou-pagination.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-customer-list-index.v1"
totalinteger · 最小 0
limit单页条数integer · 最小 1 · 最大 50
offset已跳过的条数integer · 最小 0
hasMoreboolean
listsarray · 元素:object · 最多 50 项
完整 JSON Schema · 含嵌套字段与组合约束
doou-customer-list-index.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-customer-list-index.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "total",
    "limit",
    "offset",
    "hasMore",
    "lists"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-customer-list-index.v1"
    },
    "total": {
      "type": "integer",
      "minimum": 0
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    },
    "offset": {
      "type": "integer",
      "minimum": 0
    },
    "hasMore": {
      "type": "boolean"
    },
    "lists": {
      "type": "array",
      "maxItems": 50,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "key",
          "name",
          "subject",
          "rowCount",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "subject": {
            "type": "object"
          },
          "rowCount": {
            "type": "integer",
            "minimum": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    }
  }
}
doou-customer-list-index.v1

错误码:unauthorized · scope_forbidden · rate_limited · not_found · internal_error

MCP 工具:doou_list_customer_lists

GET/api/v1/customer-lists/{id}+

权限 customers:read

请求字段

id 为必填路径参数,使用前序查询或回执返回的对应资源 ID。

字段必填说明 / 类型与约束
limit按场景单页条数integer · 最小 1 · 最大 50 · 默认 20
offset按场景已跳过的条数integer · 最小 0 · 最大 500 · 默认 0
完整 JSON Schema · 含嵌套字段与组合约束
doou-pagination.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-pagination.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "default": 20
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 500,
      "default": 0
    }
  }
}
doou-pagination.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-customer-list.v1"
listobject
pageobject
companiesarray · 元素:object · 最多 100 项
metaobject
完整 JSON Schema · 含嵌套字段与组合约束
doou-customer-list.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-customer-list.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "list",
    "page",
    "companies",
    "meta"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-customer-list.v1"
    },
    "list": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "key",
        "name",
        "subject",
        "rowCount",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
        },
        "key": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 240
        },
        "subject": {
          "type": "object"
        },
        "rowCount": {
          "type": "integer",
          "minimum": 0
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "page": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "total",
        "limit",
        "offset",
        "hasMore"
      ],
      "properties": {
        "total": {
          "type": "integer",
          "minimum": 0
        },
        "limit": {
          "type": "integer",
          "minimum": 1
        },
        "offset": {
          "type": "integer",
          "minimum": 0
        },
        "hasMore": {
          "type": "boolean"
        }
      }
    },
    "companies": {
      "type": "array",
      "maxItems": 100,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "qualification",
          "channels",
          "people",
          "source"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "businessId": {
            "type": "string",
            "maxLength": 160
          },
          "leadId": {
            "type": "string",
            "maxLength": 160
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "legalName": {
            "type": "string",
            "maxLength": 240
          },
          "domain": {
            "type": "string",
            "maxLength": 240
          },
          "website": {
            "type": "string",
            "format": "uri",
            "maxLength": 500
          },
          "companyType": {
            "type": "string",
            "maxLength": 160
          },
          "industry": {
            "type": "string",
            "maxLength": 160
          },
          "market": {
            "type": "string",
            "maxLength": 160
          },
          "city": {
            "type": "string",
            "maxLength": 160
          },
          "status": {
            "type": "string",
            "maxLength": 120
          },
          "qualification": {
            "type": "object"
          },
          "channels": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "direct",
              "social"
            ],
            "properties": {
              "direct": {
                "type": "array",
                "maxItems": 20,
                "items": {
                  "type": "object"
                }
              },
              "social": {
                "type": "array",
                "maxItems": 20,
                "items": {
                  "type": "object"
                }
              }
            }
          },
          "people": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "object"
            }
          },
          "source": {
            "type": "object"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "meta": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "liveProviderCalls",
        "externalWrites"
      ],
      "properties": {
        "source": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "scope": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "liveProviderCalls": {
          "const": false
        },
        "externalWrites": {
          "const": false
        },
        "modelCalls": {
          "type": "boolean"
        },
        "fullBodyIncluded": {
          "type": "boolean"
        }
      }
    }
  }
}
doou-customer-list.v1

错误码:unauthorized · scope_forbidden · rate_limited · not_found · internal_error

MCP 工具:doou_get_customer_list

people

负责人身份、任职、岗位、联系方式和核验证据。

GET/api/v2/people/enrichments/{id}+

权限 people:enrich

请求字段

id 为必填路径参数,使用前序查询或回执返回的对应资源 ID。

字段必填说明 / 类型与约束
id资源唯一标识string
完整 JSON Schema · 含嵌套字段与组合约束
doou-command-receipt-id.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-command-receipt-id.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    }
  }
}
doou-command-receipt-id.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"workflow-command-receipt.v1"
receiptId命令回执标识string
operation业务操作标识string · 至少 1 字符 · 至多 160 字符
state命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired
inputHash按场景string
input按场景object
pricing按场景本次操作的费用信息object
workflow按场景object | null
workflowRunId按场景工作流运行标识string | null
statusUrl状态查询地址string · 至少 1 字符 · 至多 500 字符
resultStatus结果是否可用string · 可选:available / missing / pending / unavailable
result已产生的业务结果object | null
errorCode业务错误码string · 至多 120 字符 | null
replayed是否重放已有回执boolean
externalWritePerformed按场景boolean · 固定值:false
完整 JSON Schema · 含嵌套字段与组合约束
workflow-command-receipt.v1
{
  "$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schemaVersion",
    "receiptId",
    "operation",
    "state",
    "statusUrl",
    "resultStatus",
    "result",
    "errorCode",
    "replayed"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workflow-command-receipt.v1"
    },
    "receiptId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "operation": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "state": {
      "type": "string",
      "enum": [
        "quoted",
        "executing",
        "accepted",
        "running",
        "succeeded",
        "failed",
        "unknown",
        "expired"
      ]
    },
    "inputHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "input": {
      "type": "object"
    },
    "pricing": {
      "type": "object"
    },
    "workflow": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "workflowRunId": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "statusUrl": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "resultStatus": {
      "type": "string",
      "enum": [
        "available",
        "missing",
        "pending",
        "unavailable"
      ]
    },
    "result": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "errorCode": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "replayed": {
      "type": "boolean"
    },
    "externalWritePerformed": {
      "const": false
    }
  }
}
workflow-command-receipt.v1

错误码:unauthorized · scope_forbidden · rate_limited · receipt_id_invalid · receipt_not_found · external_command_storage_unavailable · external_command_persistence_failed · internal_error

MCP 工具:doou_get_people_enrichment_receipt

POST/api/v2/people/enrichment-quotes+

权限 people:enrich · 需要 Idempotency-Key

请求字段

字段必填说明 / 类型与约束
businessIdsarray · 元素:string · 最多 10 项
targetRolestring · 至少 2 字符 · 至多 120 字符
targetTableId按场景string · 至多 180 字符
idempotencyKey按场景REST 放在 Idempotency-Key 请求头;MCP 放在参数中string
完整 JSON Schema · 含嵌套字段与组合约束
doou-people-enrichment-quote-request.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-people-enrichment-quote-request.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "businessIds",
    "targetRole"
  ],
  "properties": {
    "businessIds": {
      "type": "array",
      "minItems": 1,
      "maxItems": 10,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
      }
    },
    "targetRole": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120
    },
    "targetTableId": {
      "type": "string",
      "maxLength": 180
    },
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
    }
  }
}
doou-people-enrichment-quote-request.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-people-enrichment-quote.v1"
quoteIdstring
operation业务操作标识string · 固定值:"people.confirm_enrichment"
inputobject
pricing本次操作的费用信息object
confirmation确认要求、凭证和有效期object
replayed是否重放已有回执boolean
providerCallsnumber · 固定值:0
完整 JSON Schema · 含嵌套字段与组合约束
doou-people-enrichment-quote.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-people-enrichment-quote.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "quoteId",
    "operation",
    "input",
    "pricing",
    "confirmation",
    "replayed",
    "providerCalls"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-people-enrichment-quote.v1"
    },
    "quoteId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "operation": {
      "const": "people.confirm_enrichment"
    },
    "input": {
      "type": "object"
    },
    "pricing": {
      "type": "object"
    },
    "confirmation": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "required",
        "expiresAt",
        "token"
      ],
      "properties": {
        "required": {
          "const": true
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        },
        "token": {
          "type": "string",
          "minLength": 32,
          "maxLength": 4096
        }
      }
    },
    "replayed": {
      "type": "boolean"
    },
    "providerCalls": {
      "const": 0
    }
  }
}
doou-people-enrichment-quote.v1

错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · contact_business_ids_missing · contact_enrichment_limit_exceeded · contact_target_role_missing · business_scope_forbidden · external_confirmation_configuration_missing · people_enrichment_unavailable · idempotency_key_invalid · idempotency_conflict · external_command_storage_unavailable · external_command_persistence_failed · internal_error

MCP 工具:doou_quote_people_enrichment

POST/api/v2/people/enrichments+

权限 people:enrich · 需要 Idempotency-Key · 需要确认凭证

请求字段

字段必填说明 / 类型与约束
confirmationToken当前报价或审核的确认凭证string · 至少 32 字符 · 至多 4096 字符
idempotencyKey按场景REST 放在 Idempotency-Key 请求头;MCP 放在参数中string
完整 JSON Schema · 含嵌套字段与组合约束
doou-people-enrichment-confirmation.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-people-enrichment-confirmation.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "confirmationToken"
  ],
  "properties": {
    "confirmationToken": {
      "type": "string",
      "minLength": 32,
      "maxLength": 4096
    },
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
    }
  }
}
doou-people-enrichment-confirmation.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"workflow-command-receipt.v1"
receiptId命令回执标识string
operation业务操作标识string · 至少 1 字符 · 至多 160 字符
state命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired
inputHash按场景string
input按场景object
pricing按场景本次操作的费用信息object
workflow按场景object | null
workflowRunId按场景工作流运行标识string | null
statusUrl状态查询地址string · 至少 1 字符 · 至多 500 字符
resultStatus结果是否可用string · 可选:available / missing / pending / unavailable
result已产生的业务结果object | null
errorCode业务错误码string · 至多 120 字符 | null
replayed是否重放已有回执boolean
externalWritePerformed按场景boolean · 固定值:false
完整 JSON Schema · 含嵌套字段与组合约束
workflow-command-receipt.v1
{
  "$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schemaVersion",
    "receiptId",
    "operation",
    "state",
    "statusUrl",
    "resultStatus",
    "result",
    "errorCode",
    "replayed"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workflow-command-receipt.v1"
    },
    "receiptId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "operation": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "state": {
      "type": "string",
      "enum": [
        "quoted",
        "executing",
        "accepted",
        "running",
        "succeeded",
        "failed",
        "unknown",
        "expired"
      ]
    },
    "inputHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "input": {
      "type": "object"
    },
    "pricing": {
      "type": "object"
    },
    "workflow": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "workflowRunId": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "statusUrl": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "resultStatus": {
      "type": "string",
      "enum": [
        "available",
        "missing",
        "pending",
        "unavailable"
      ]
    },
    "result": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "errorCode": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "replayed": {
      "type": "boolean"
    },
    "externalWritePerformed": {
      "const": false
    }
  }
}
workflow-command-receipt.v1

错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · idempotency_key_invalid · confirmation_invalid · confirmation_expired · confirmation_actor_mismatch · confirmation_not_found · confirmation_input_conflict · confirmation_already_used · idempotency_conflict · workflow_start_rejected · workflow_receipt_unknown · external_command_storage_unavailable · external_command_persistence_failed · internal_error

MCP 工具:doou_confirm_people_enrichment

relationships

客户阶段、归属、结果和抑制状态。

GET/api/v2/relationships+

权限 relationships:read

请求字段

字段必填说明 / 类型与约束
cursor按场景上一页返回的游标string · 至少 1 字符 · 至多 1024 字符
limit按场景单页条数integer · 最小 1 · 最大 50
完整 JSON Schema · 含嵌套字段与组合约束
doou-relationship-query.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-relationship-query.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "cursor": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    }
  }
}
doou-relationship-query.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-relationship-index.v1"
statusstring · 可选:ready / empty
relationshipsarray · 元素:object · 最多 50 项
summaryobject
pageobject
metaobject
完整 JSON Schema · 含嵌套字段与组合约束
doou-relationship-index.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-relationship-index.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "status",
    "relationships",
    "summary",
    "page",
    "meta"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-relationship-index.v1"
    },
    "status": {
      "type": "string",
      "enum": [
        "ready",
        "empty"
      ]
    },
    "relationships": {
      "type": "array",
      "maxItems": 50,
      "items": {
        "type": "object"
      }
    },
    "summary": {
      "type": "object"
    },
    "page": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "limit",
        "nextCursor",
        "hasMore"
      ],
      "properties": {
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 50
        },
        "nextCursor": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            {
              "type": "null"
            }
          ]
        },
        "hasMore": {
          "type": "boolean"
        }
      }
    },
    "meta": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "liveProviderCalls",
        "externalWrites"
      ],
      "properties": {
        "source": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "scope": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "liveProviderCalls": {
          "const": false
        },
        "externalWrites": {
          "const": false
        },
        "modelCalls": {
          "type": "boolean"
        },
        "fullBodyIncluded": {
          "type": "boolean"
        }
      }
    }
  }
}
doou-relationship-index.v1

错误码:unauthorized · scope_forbidden · rate_limited · invalid_cursor · relationship_storage_unavailable · relationship_ledger_limit_exceeded · relationship_lead_read_failed · relationship_outcome_read_failed · relationship_suppression_read_failed · internal_error

MCP 工具:doou_list_customer_relationships

GET/api/v2/relationships/follow-up-changes/{id}+

权限 relationships:write

请求字段

id 为必填路径参数,使用前序查询或回执返回的对应资源 ID。

字段必填说明 / 类型与约束
id资源唯一标识string
完整 JSON Schema · 含嵌套字段与组合约束
doou-command-receipt-id.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-command-receipt-id.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    }
  }
}
doou-command-receipt-id.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"workflow-command-receipt.v1"
receiptId命令回执标识string
operation业务操作标识string · 至少 1 字符 · 至多 160 字符
state命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired
inputHash按场景string
input按场景object
pricing按场景本次操作的费用信息object
workflow按场景object | null
workflowRunId按场景工作流运行标识string | null
statusUrl状态查询地址string · 至少 1 字符 · 至多 500 字符
resultStatus结果是否可用string · 可选:available / missing / pending / unavailable
result已产生的业务结果object | null
errorCode业务错误码string · 至多 120 字符 | null
replayed是否重放已有回执boolean
externalWritePerformed按场景boolean · 固定值:false
完整 JSON Schema · 含嵌套字段与组合约束
workflow-command-receipt.v1
{
  "$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schemaVersion",
    "receiptId",
    "operation",
    "state",
    "statusUrl",
    "resultStatus",
    "result",
    "errorCode",
    "replayed"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workflow-command-receipt.v1"
    },
    "receiptId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "operation": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "state": {
      "type": "string",
      "enum": [
        "quoted",
        "executing",
        "accepted",
        "running",
        "succeeded",
        "failed",
        "unknown",
        "expired"
      ]
    },
    "inputHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "input": {
      "type": "object"
    },
    "pricing": {
      "type": "object"
    },
    "workflow": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "workflowRunId": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "statusUrl": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "resultStatus": {
      "type": "string",
      "enum": [
        "available",
        "missing",
        "pending",
        "unavailable"
      ]
    },
    "result": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "errorCode": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "replayed": {
      "type": "boolean"
    },
    "externalWritePerformed": {
      "const": false
    }
  }
}
workflow-command-receipt.v1

错误码:unauthorized · scope_forbidden · rate_limited · receipt_id_invalid · receipt_not_found · external_command_storage_unavailable · external_command_persistence_failed · internal_error

MCP 工具:doou_get_relationship_follow_up_receipt

POST/api/v2/relationships/follow-up-reviews+

权限 relationships:write · 需要 Idempotency-Key

请求字段

字段必填说明 / 类型与约束
leadIdstring
status按场景string · 可选:pending / active / won / closed
note按场景string · 至多 1000 字符
nextFollowUpAt按场景string · date-time | null
idempotencyKey按场景REST 放在 Idempotency-Key 请求头;MCP 放在参数中string
完整 JSON Schema · 含嵌套字段与组合约束
doou-relationship-follow-up-review-request.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-relationship-follow-up-review-request.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "anyOf": [
    {
      "required": [
        "status"
      ]
    },
    {
      "required": [
        "note"
      ]
    },
    {
      "required": [
        "nextFollowUpAt"
      ]
    }
  ],
  "required": [
    "leadId"
  ],
  "properties": {
    "leadId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "active",
        "won",
        "closed"
      ]
    },
    "note": {
      "type": "string",
      "maxLength": 1000
    },
    "nextFollowUpAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
    }
  }
}
doou-relationship-follow-up-review-request.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-relationship-follow-up-review.v1"
reviewIdstring
operation业务操作标识string · 固定值:"relationships.confirm_follow_up"
companyobject
currentobject | null
proposedobject
costobject
confirmation确认要求、凭证和有效期object
replayed是否重放已有回执boolean
providerCallsnumber · 固定值:0
modelCallsnumber · 固定值:0
ledgerWritePerformedboolean · 固定值:false
externalWritePerformedboolean · 固定值:false
完整 JSON Schema · 含嵌套字段与组合约束
doou-relationship-follow-up-review.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-relationship-follow-up-review.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "reviewId",
    "operation",
    "company",
    "current",
    "proposed",
    "cost",
    "confirmation",
    "replayed",
    "providerCalls",
    "modelCalls",
    "ledgerWritePerformed",
    "externalWritePerformed"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-relationship-follow-up-review.v1"
    },
    "reviewId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "operation": {
      "const": "relationships.confirm_follow_up"
    },
    "company": {
      "type": "object"
    },
    "current": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "proposed": {
      "type": "object"
    },
    "cost": {
      "type": "object"
    },
    "confirmation": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "required",
        "expiresAt",
        "token"
      ],
      "properties": {
        "required": {
          "const": true
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        },
        "token": {
          "type": "string",
          "minLength": 32,
          "maxLength": 4096
        }
      }
    },
    "replayed": {
      "type": "boolean"
    },
    "providerCalls": {
      "const": 0
    },
    "modelCalls": {
      "const": 0
    },
    "ledgerWritePerformed": {
      "const": false
    },
    "externalWritePerformed": {
      "const": false
    }
  }
}
doou-relationship-follow-up-review.v1

错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · relationship_follow_up_lead_invalid · relationship_follow_up_status_invalid · relationship_follow_up_date_invalid · relationship_follow_up_change_missing · relationship_follow_up_field_unsupported · follow_up_lead_not_found · follow_up_suppressed · follow_up_unchanged · external_confirmation_configuration_missing · idempotency_key_invalid · idempotency_conflict · external_command_storage_unavailable · external_command_persistence_failed · internal_error

MCP 工具:doou_review_relationship_follow_up

POST/api/v2/relationships/follow-up-changes+

权限 relationships:write · 需要 Idempotency-Key · 需要确认凭证

请求字段

字段必填说明 / 类型与约束
confirmationToken当前报价或审核的确认凭证string · 至少 32 字符 · 至多 4096 字符
idempotencyKey按场景REST 放在 Idempotency-Key 请求头;MCP 放在参数中string
完整 JSON Schema · 含嵌套字段与组合约束
doou-relationship-follow-up-confirmation.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-relationship-follow-up-confirmation.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "confirmationToken"
  ],
  "properties": {
    "confirmationToken": {
      "type": "string",
      "minLength": 32,
      "maxLength": 4096
    },
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
    }
  }
}
doou-relationship-follow-up-confirmation.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"workflow-command-receipt.v1"
receiptId命令回执标识string
operation业务操作标识string · 至少 1 字符 · 至多 160 字符
state命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired
inputHash按场景string
input按场景object
pricing按场景本次操作的费用信息object
workflow按场景object | null
workflowRunId按场景工作流运行标识string | null
statusUrl状态查询地址string · 至少 1 字符 · 至多 500 字符
resultStatus结果是否可用string · 可选:available / missing / pending / unavailable
result已产生的业务结果object | null
errorCode业务错误码string · 至多 120 字符 | null
replayed是否重放已有回执boolean
externalWritePerformed按场景boolean · 固定值:false
完整 JSON Schema · 含嵌套字段与组合约束
workflow-command-receipt.v1
{
  "$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schemaVersion",
    "receiptId",
    "operation",
    "state",
    "statusUrl",
    "resultStatus",
    "result",
    "errorCode",
    "replayed"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workflow-command-receipt.v1"
    },
    "receiptId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "operation": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "state": {
      "type": "string",
      "enum": [
        "quoted",
        "executing",
        "accepted",
        "running",
        "succeeded",
        "failed",
        "unknown",
        "expired"
      ]
    },
    "inputHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "input": {
      "type": "object"
    },
    "pricing": {
      "type": "object"
    },
    "workflow": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "workflowRunId": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "statusUrl": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "resultStatus": {
      "type": "string",
      "enum": [
        "available",
        "missing",
        "pending",
        "unavailable"
      ]
    },
    "result": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "errorCode": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "replayed": {
      "type": "boolean"
    },
    "externalWritePerformed": {
      "const": false
    }
  }
}
workflow-command-receipt.v1

错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · idempotency_key_invalid · confirmation_invalid · confirmation_expired · confirmation_actor_mismatch · confirmation_not_found · confirmation_input_conflict · confirmation_already_used · idempotency_conflict · follow_up_revision_conflict · follow_up_suppressed · follow_up_atomic_write_unavailable · relationship_follow_up_receipt_unknown · external_command_storage_unavailable · external_command_persistence_failed · internal_error

MCP 工具:doou_confirm_relationship_follow_up

conversations

已同步邮箱中的客户回复索引、企业归属和后续动作。

GET/api/v2/conversations+

权限 conversations:read

请求字段

字段必填说明 / 类型与约束
connectionId按场景string
limit按场景单页条数integer · 最小 1 · 最大 40
完整 JSON Schema · 含嵌套字段与组合约束
doou-conversation-inbox-query.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-conversation-inbox-query.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "connectionId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 40
    }
  }
}
doou-conversation-inbox-query.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-conversation-inbox.v1"
statusstring · 至少 1 字符 · 至多 80 字符
conversationsarray · 元素:object · 最多 40 项
summaryobject
metaobject
完整 JSON Schema · 含嵌套字段与组合约束
doou-conversation-inbox.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-conversation-inbox.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "status",
    "conversations",
    "summary",
    "meta"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-conversation-inbox.v1"
    },
    "status": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "conversations": {
      "type": "array",
      "maxItems": 40,
      "items": {
        "type": "object"
      }
    },
    "summary": {
      "type": "object"
    },
    "meta": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "liveProviderCalls",
        "externalWrites"
      ],
      "properties": {
        "source": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "scope": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "liveProviderCalls": {
          "const": false
        },
        "externalWrites": {
          "const": false
        },
        "modelCalls": {
          "type": "boolean"
        },
        "fullBodyIncluded": {
          "type": "boolean"
        }
      }
    }
  }
}
doou-conversation-inbox.v1

错误码:unauthorized · scope_forbidden · rate_limited · mailbox_connection_invalid · mailbox_reply_query_failed · mailbox_reply_context_failed · internal_error

MCP 工具:doou_list_mailbox_conversations

GET/api/v2/conversations/official+

权限 official_messages:read

请求字段

字段必填说明 / 类型与约束
connectionId按场景string
limit按场景单页条数integer · 最小 1 · 最大 40
完整 JSON Schema · 含嵌套字段与组合约束
doou-official-conversation-query.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-official-conversation-query.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "connectionId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 40
    }
  }
}
doou-official-conversation-query.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-official-conversation-inbox.v1"
conversationsarray · 元素:object · 最多 40 项
summaryobject
metaobject
完整 JSON Schema · 含嵌套字段与组合约束
doou-official-conversation-inbox.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-official-conversation-inbox.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "conversations",
    "summary",
    "meta"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-official-conversation-inbox.v1"
    },
    "conversations": {
      "type": "array",
      "maxItems": 40,
      "items": {
        "type": "object"
      }
    },
    "summary": {
      "type": "object"
    },
    "meta": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "liveProviderCalls",
        "externalWrites"
      ],
      "properties": {
        "source": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "scope": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "liveProviderCalls": {
          "const": false
        },
        "externalWrites": {
          "const": false
        },
        "modelCalls": {
          "type": "boolean"
        },
        "fullBodyIncluded": {
          "type": "boolean"
        }
      }
    }
  }
}
doou-official-conversation-inbox.v1

错误码:unauthorized · scope_forbidden · rate_limited · invalid_pagination · official_conversation_connection_invalid · official_conversation_schema_missing · official_conversation_read_failed · internal_error

MCP 工具:doou_list_official_conversations

messages

有界消息、已审核草稿、单封确认和发送回执。

GET/api/v2/messages/drafts/{id}+

权限 messages:draft

请求字段

id 为必填路径参数,使用前序查询或回执返回的对应资源 ID。

字段必填说明 / 类型与约束
id资源唯一标识string
完整 JSON Schema · 含嵌套字段与组合约束
doou-command-receipt-id.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-command-receipt-id.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    }
  }
}
doou-command-receipt-id.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"workflow-command-receipt.v1"
receiptId命令回执标识string
operation业务操作标识string · 至少 1 字符 · 至多 160 字符
state命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired
inputHash按场景string
input按场景object
pricing按场景本次操作的费用信息object
workflow按场景object | null
workflowRunId按场景工作流运行标识string | null
statusUrl状态查询地址string · 至少 1 字符 · 至多 500 字符
resultStatus结果是否可用string · 可选:available / missing / pending / unavailable
result已产生的业务结果object | null
errorCode业务错误码string · 至多 120 字符 | null
replayed是否重放已有回执boolean
externalWritePerformed按场景boolean · 固定值:false
完整 JSON Schema · 含嵌套字段与组合约束
workflow-command-receipt.v1
{
  "$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schemaVersion",
    "receiptId",
    "operation",
    "state",
    "statusUrl",
    "resultStatus",
    "result",
    "errorCode",
    "replayed"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workflow-command-receipt.v1"
    },
    "receiptId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "operation": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "state": {
      "type": "string",
      "enum": [
        "quoted",
        "executing",
        "accepted",
        "running",
        "succeeded",
        "failed",
        "unknown",
        "expired"
      ]
    },
    "inputHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "input": {
      "type": "object"
    },
    "pricing": {
      "type": "object"
    },
    "workflow": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "workflowRunId": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "statusUrl": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "resultStatus": {
      "type": "string",
      "enum": [
        "available",
        "missing",
        "pending",
        "unavailable"
      ]
    },
    "result": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "errorCode": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "replayed": {
      "type": "boolean"
    },
    "externalWritePerformed": {
      "const": false
    }
  }
}
workflow-command-receipt.v1

错误码:unauthorized · scope_forbidden · rate_limited · receipt_id_invalid · receipt_not_found · external_command_storage_unavailable · external_command_persistence_failed · internal_error

MCP 工具:doou_get_outreach_draft_receipt

GET/api/v2/messages/sends/{id}+

权限 messages:send

请求字段

id 为必填路径参数,使用前序查询或回执返回的对应资源 ID。

字段必填说明 / 类型与约束
id资源唯一标识string
完整 JSON Schema · 含嵌套字段与组合约束
doou-command-receipt-id.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-command-receipt-id.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    }
  }
}
doou-command-receipt-id.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"workflow-command-receipt.v1"
receiptId命令回执标识string
operation业务操作标识string · 至少 1 字符 · 至多 160 字符
state命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired
inputHash按场景string
input按场景object
pricing按场景本次操作的费用信息object
workflow按场景object | null
workflowRunId按场景工作流运行标识string | null
statusUrl状态查询地址string · 至少 1 字符 · 至多 500 字符
resultStatus结果是否可用string · 可选:available / missing / pending / unavailable
result已产生的业务结果object | null
errorCode业务错误码string · 至多 120 字符 | null
replayed是否重放已有回执boolean
externalWritePerformed按场景boolean · 固定值:false
完整 JSON Schema · 含嵌套字段与组合约束
workflow-command-receipt.v1
{
  "$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schemaVersion",
    "receiptId",
    "operation",
    "state",
    "statusUrl",
    "resultStatus",
    "result",
    "errorCode",
    "replayed"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workflow-command-receipt.v1"
    },
    "receiptId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "operation": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "state": {
      "type": "string",
      "enum": [
        "quoted",
        "executing",
        "accepted",
        "running",
        "succeeded",
        "failed",
        "unknown",
        "expired"
      ]
    },
    "inputHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "input": {
      "type": "object"
    },
    "pricing": {
      "type": "object"
    },
    "workflow": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "workflowRunId": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "statusUrl": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "resultStatus": {
      "type": "string",
      "enum": [
        "available",
        "missing",
        "pending",
        "unavailable"
      ]
    },
    "result": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "errorCode": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "replayed": {
      "type": "boolean"
    },
    "externalWritePerformed": {
      "const": false
    }
  }
}
workflow-command-receipt.v1

错误码:unauthorized · scope_forbidden · rate_limited · receipt_id_invalid · receipt_not_found · external_command_storage_unavailable · external_command_persistence_failed · internal_error

MCP 工具:doou_get_single_email_send_receipt

GET/api/v2/messages/official-replies/{id}+

权限 official_messages:reply

请求字段

id 为必填路径参数,使用前序查询或回执返回的对应资源 ID。

字段必填说明 / 类型与约束
id资源唯一标识string
完整 JSON Schema · 含嵌套字段与组合约束
doou-command-receipt-id.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-command-receipt-id.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    }
  }
}
doou-command-receipt-id.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-official-message-reply-receipt.v1"
receiptId命令回执标识string
state命令当前状态string · 可选:prepared / confirmed / sending / accepted / failed / unknown / cancelled
channelstring · 固定值:"whatsapp_business"
conversationIdstring
latestInboundMessageIdstring · 至少 1 字符 · 至多 180 字符
messageIdstring · 至多 180 字符 | null
providerMessageIdstring · 至多 240 字符 | null
responseStatusinteger · 最小 100 · 最大 599 | null
errorCode业务错误码string · 至多 120 字符 | null
startedAtstring · date-time | null
finishedAtstring · date-time | null
updatedAt最近更新时间string · date-time
replayed是否重放已有回执boolean
automaticRetryboolean · 固定值:false
完整 JSON Schema · 含嵌套字段与组合约束
doou-official-message-reply-receipt.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-official-message-reply-receipt.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schemaVersion",
    "receiptId",
    "state",
    "channel",
    "conversationId",
    "latestInboundMessageId",
    "messageId",
    "providerMessageId",
    "responseStatus",
    "errorCode",
    "startedAt",
    "finishedAt",
    "updatedAt",
    "replayed",
    "automaticRetry"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-official-message-reply-receipt.v1"
    },
    "receiptId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "state": {
      "type": "string",
      "enum": [
        "prepared",
        "confirmed",
        "sending",
        "accepted",
        "failed",
        "unknown",
        "cancelled"
      ]
    },
    "channel": {
      "const": "whatsapp_business"
    },
    "conversationId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "latestInboundMessageId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180
    },
    "messageId": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 180
        },
        {
          "type": "null"
        }
      ]
    },
    "providerMessageId": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 240
        },
        {
          "type": "null"
        }
      ]
    },
    "responseStatus": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 100,
          "maximum": 599
        },
        {
          "type": "null"
        }
      ]
    },
    "errorCode": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "startedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "finishedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "replayed": {
      "type": "boolean"
    },
    "automaticRetry": {
      "const": false
    }
  }
}
doou-official-message-reply-receipt.v1

错误码:unauthorized · scope_forbidden · rate_limited · official_message_receipt_invalid · official_message_receipt_not_found · official_message_reply_schema_missing · official_message_reply_persistence_failed · internal_error

MCP 工具:doou_get_official_message_reply_receipt

POST/api/v2/messages/draft-quotes+

权限 messages:draft · 需要 Idempotency-Key

请求字段

字段必填说明 / 类型与约束
tableIdstring
businessIdsarray · 元素:string · 最多 20 项
product目标产品或品类string · 至少 2 字符 · 至多 160 字符
market按场景目标市场 / 国家string · 至多 120 字符
productProfileKey按场景string · 至多 180 字符
targetRolestring · 至少 2 字符 · 至多 120 字符
channelStrategystring · 可选:auto / email / linkedin
languagestring · 可选:en / zh
idempotencyKey按场景REST 放在 Idempotency-Key 请求头;MCP 放在参数中string
完整 JSON Schema · 含嵌套字段与组合约束
doou-outreach-draft-quote-request.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-outreach-draft-quote-request.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "tableId",
    "businessIds",
    "product",
    "targetRole",
    "channelStrategy",
    "language"
  ],
  "properties": {
    "tableId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "businessIds": {
      "type": "array",
      "minItems": 1,
      "maxItems": 20,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
      }
    },
    "product": {
      "type": "string",
      "minLength": 2,
      "maxLength": 160
    },
    "market": {
      "type": "string",
      "maxLength": 120
    },
    "productProfileKey": {
      "type": "string",
      "maxLength": 180
    },
    "targetRole": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120
    },
    "channelStrategy": {
      "type": "string",
      "enum": [
        "auto",
        "email",
        "linkedin"
      ]
    },
    "language": {
      "type": "string",
      "enum": [
        "en",
        "zh"
      ]
    },
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
    }
  }
}
doou-outreach-draft-quote-request.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-outreach-draft-quote.v1"
quoteIdstring
operation业务操作标识string · 固定值:"messages.confirm_outreach_draft"
inputobject
pricing本次操作的费用信息object
confirmation确认要求、凭证和有效期object
replayed是否重放已有回执boolean
providerCallsnumber · 固定值:0
完整 JSON Schema · 含嵌套字段与组合约束
doou-outreach-draft-quote.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-outreach-draft-quote.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "quoteId",
    "operation",
    "input",
    "pricing",
    "confirmation",
    "replayed",
    "providerCalls"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-outreach-draft-quote.v1"
    },
    "quoteId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "operation": {
      "const": "messages.confirm_outreach_draft"
    },
    "input": {
      "type": "object"
    },
    "pricing": {
      "type": "object"
    },
    "confirmation": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "required",
        "expiresAt",
        "token"
      ],
      "properties": {
        "required": {
          "const": true
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        },
        "token": {
          "type": "string",
          "minLength": 32,
          "maxLength": 4096
        }
      }
    },
    "replayed": {
      "type": "boolean"
    },
    "providerCalls": {
      "const": 0
    }
  }
}
doou-outreach-draft-quote.v1

错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · outreach_table_missing · outreach_businesses_missing · outreach_business_limit · outreach_product_missing · outreach_target_role_missing · outreach_channel_invalid · outreach_language_invalid · outreach_selection_forbidden · outreach_product_profile_changed · external_confirmation_configuration_missing · idempotency_key_invalid · idempotency_conflict · external_command_storage_unavailable · external_command_persistence_failed · internal_error

MCP 工具:doou_quote_outreach_drafts

POST/api/v2/messages/drafts+

权限 messages:draft · 需要 Idempotency-Key · 需要确认凭证

请求字段

字段必填说明 / 类型与约束
confirmationToken当前报价或审核的确认凭证string · 至少 32 字符 · 至多 4096 字符
idempotencyKey按场景REST 放在 Idempotency-Key 请求头;MCP 放在参数中string
完整 JSON Schema · 含嵌套字段与组合约束
doou-outreach-draft-confirmation.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-outreach-draft-confirmation.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "confirmationToken"
  ],
  "properties": {
    "confirmationToken": {
      "type": "string",
      "minLength": 32,
      "maxLength": 4096
    },
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
    }
  }
}
doou-outreach-draft-confirmation.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"workflow-command-receipt.v1"
receiptId命令回执标识string
operation业务操作标识string · 至少 1 字符 · 至多 160 字符
state命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired
inputHash按场景string
input按场景object
pricing按场景本次操作的费用信息object
workflow按场景object | null
workflowRunId按场景工作流运行标识string | null
statusUrl状态查询地址string · 至少 1 字符 · 至多 500 字符
resultStatus结果是否可用string · 可选:available / missing / pending / unavailable
result已产生的业务结果object | null
errorCode业务错误码string · 至多 120 字符 | null
replayed是否重放已有回执boolean
externalWritePerformed按场景boolean · 固定值:false
完整 JSON Schema · 含嵌套字段与组合约束
workflow-command-receipt.v1
{
  "$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schemaVersion",
    "receiptId",
    "operation",
    "state",
    "statusUrl",
    "resultStatus",
    "result",
    "errorCode",
    "replayed"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workflow-command-receipt.v1"
    },
    "receiptId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "operation": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "state": {
      "type": "string",
      "enum": [
        "quoted",
        "executing",
        "accepted",
        "running",
        "succeeded",
        "failed",
        "unknown",
        "expired"
      ]
    },
    "inputHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "input": {
      "type": "object"
    },
    "pricing": {
      "type": "object"
    },
    "workflow": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "workflowRunId": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "statusUrl": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "resultStatus": {
      "type": "string",
      "enum": [
        "available",
        "missing",
        "pending",
        "unavailable"
      ]
    },
    "result": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "errorCode": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "replayed": {
      "type": "boolean"
    },
    "externalWritePerformed": {
      "const": false
    }
  }
}
workflow-command-receipt.v1

错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · idempotency_key_invalid · confirmation_invalid · confirmation_expired · confirmation_actor_mismatch · confirmation_not_found · confirmation_input_conflict · confirmation_already_used · idempotency_conflict · outreach_product_profile_changed · outreach_draft_start_rejected · outreach_draft_receipt_unknown · external_command_storage_unavailable · external_command_persistence_failed · internal_error

MCP 工具:doou_confirm_outreach_drafts

POST/api/v2/messages/send-reviews+

权限 messages:send · 需要 Idempotency-Key

请求字段

字段必填说明 / 类型与约束
campaignKeystring · 至少 1 字符 · 至多 180 字符
draftId草稿标识string
connectionIdstring
idempotencyKey按场景REST 放在 Idempotency-Key 请求头;MCP 放在参数中string
完整 JSON Schema · 含嵌套字段与组合约束
doou-outreach-send-review-request.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-outreach-send-review-request.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "campaignKey",
    "draftId",
    "connectionId"
  ],
  "properties": {
    "campaignKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180
    },
    "draftId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "connectionId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
    }
  }
}
doou-outreach-send-review-request.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-outreach-send-review.v1"
reviewIdstring
operation业务操作标识string · 固定值:"messages.confirm_single_send"
confirmation确认要求、凭证和有效期object
replayed是否重放已有回执boolean
providerCallsnumber · 固定值:0
modelCallsnumber · 固定值:0
externalWritePerformedboolean · 固定值:false
完整 JSON Schema · 含嵌套字段与组合约束
doou-outreach-send-review.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-outreach-send-review.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schemaVersion",
    "reviewId",
    "operation",
    "confirmation",
    "replayed",
    "providerCalls",
    "modelCalls",
    "externalWritePerformed"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-outreach-send-review.v1"
    },
    "reviewId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "operation": {
      "const": "messages.confirm_single_send"
    },
    "confirmation": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "required",
        "expiresAt",
        "token"
      ],
      "properties": {
        "required": {
          "const": true
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        },
        "token": {
          "type": "string",
          "minLength": 32,
          "maxLength": 4096
        }
      }
    },
    "replayed": {
      "type": "boolean"
    },
    "providerCalls": {
      "const": 0
    },
    "modelCalls": {
      "const": 0
    },
    "externalWritePerformed": {
      "const": false
    }
  }
}
doou-outreach-send-review.v1

错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · campaign_id_invalid · draft_id_invalid · connection_id_invalid · campaign_not_found · campaign_not_sendable · campaign_draft_not_found · campaign_draft_not_sendable · mailbox_connection_unavailable · mailbox_send_not_authorized · campaign_content_quality_failed · external_confirmation_configuration_missing · idempotency_key_invalid · idempotency_conflict · external_command_storage_unavailable · external_command_persistence_failed · internal_error

MCP 工具:doou_review_single_email_send

POST/api/v2/messages/sends+

权限 messages:send · 需要 Idempotency-Key · 需要确认凭证

请求字段

字段必填说明 / 类型与约束
confirmationToken当前报价或审核的确认凭证string · 至少 32 字符 · 至多 4096 字符
idempotencyKey按场景REST 放在 Idempotency-Key 请求头;MCP 放在参数中string
完整 JSON Schema · 含嵌套字段与组合约束
doou-outreach-send-confirmation.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-outreach-send-confirmation.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "confirmationToken"
  ],
  "properties": {
    "confirmationToken": {
      "type": "string",
      "minLength": 32,
      "maxLength": 4096
    },
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
    }
  }
}
doou-outreach-send-confirmation.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"workflow-command-receipt.v1"
receiptId命令回执标识string
operation业务操作标识string · 至少 1 字符 · 至多 160 字符
state命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired
inputHash按场景string
input按场景object
pricing按场景本次操作的费用信息object
workflow按场景object | null
workflowRunId按场景工作流运行标识string | null
statusUrl状态查询地址string · 至少 1 字符 · 至多 500 字符
resultStatus结果是否可用string · 可选:available / missing / pending / unavailable
result已产生的业务结果object | null
errorCode业务错误码string · 至多 120 字符 | null
replayed是否重放已有回执boolean
externalWritePerformed按场景boolean · 固定值:false
完整 JSON Schema · 含嵌套字段与组合约束
workflow-command-receipt.v1
{
  "$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schemaVersion",
    "receiptId",
    "operation",
    "state",
    "statusUrl",
    "resultStatus",
    "result",
    "errorCode",
    "replayed"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workflow-command-receipt.v1"
    },
    "receiptId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "operation": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "state": {
      "type": "string",
      "enum": [
        "quoted",
        "executing",
        "accepted",
        "running",
        "succeeded",
        "failed",
        "unknown",
        "expired"
      ]
    },
    "inputHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "input": {
      "type": "object"
    },
    "pricing": {
      "type": "object"
    },
    "workflow": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "workflowRunId": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "statusUrl": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "resultStatus": {
      "type": "string",
      "enum": [
        "available",
        "missing",
        "pending",
        "unavailable"
      ]
    },
    "result": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "errorCode": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "replayed": {
      "type": "boolean"
    },
    "externalWritePerformed": {
      "const": false
    }
  }
}
workflow-command-receipt.v1

错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · idempotency_key_invalid · confirmation_invalid · confirmation_expired · confirmation_actor_mismatch · confirmation_not_found · confirmation_input_conflict · confirmation_already_used · idempotency_conflict · outreach_send_revision_conflict · outreach_send_preflight_failed · outreach_send_rejected · outreach_send_receipt_unknown · external_command_storage_unavailable · external_command_persistence_failed · internal_error

MCP 工具:doou_confirm_single_email_send

POST/api/v2/messages/official-reply-reviews+

权限 official_messages:reply · 需要 Idempotency-Key

请求字段

字段必填说明 / 类型与约束
conversationIdstring
replyTextstring · 至少 1 字符 · 至多 4000 字符
idempotencyKey按场景REST 放在 Idempotency-Key 请求头;MCP 放在参数中string
完整 JSON Schema · 含嵌套字段与组合约束
doou-official-message-reply-review-request.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-official-message-reply-review-request.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "conversationId",
    "replyText"
  ],
  "properties": {
    "conversationId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "replyText": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4000
    },
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
    }
  }
}
doou-official-message-reply-review-request.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-official-message-reply-review.v1"
reviewIdstring
state命令当前状态string
channelstring · 固定值:"whatsapp_business"
conversationIdstring
latestInboundMessageIdstring · 至少 1 字符 · 至多 180 字符
recipientExternalIdstring · 至少 1 字符 · 至多 180 字符
replyTextstring · 至少 1 字符 · 至多 4000 字符
costobject
confirmation确认要求、凭证和有效期object
replayed是否重放已有回执boolean
完整 JSON Schema · 含嵌套字段与组合约束
doou-official-message-reply-review.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-official-message-reply-review.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schemaVersion",
    "reviewId",
    "state",
    "channel",
    "conversationId",
    "latestInboundMessageId",
    "recipientExternalId",
    "replyText",
    "cost",
    "confirmation",
    "replayed"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-official-message-reply-review.v1"
    },
    "reviewId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "state": {
      "type": "string"
    },
    "channel": {
      "const": "whatsapp_business"
    },
    "conversationId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "latestInboundMessageId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180
    },
    "recipientExternalId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180
    },
    "replyText": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4000
    },
    "cost": {
      "type": "object"
    },
    "confirmation": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "required",
        "expiresAt",
        "token"
      ],
      "properties": {
        "required": {
          "const": true
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        },
        "token": {
          "type": "string",
          "minLength": 32,
          "maxLength": 4096
        }
      }
    },
    "replayed": {
      "type": "boolean"
    }
  }
}
doou-official-message-reply-review.v1

错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · official_message_conversation_invalid · official_message_conversation_not_found · official_message_channel_unsupported · official_message_conversation_not_sendable · official_message_account_unavailable · official_message_inbound_not_found · official_message_reply_not_authorized · whatsapp_reply_window_closed · official_message_reply_empty · official_message_reply_too_long · external_confirmation_configuration_missing · idempotency_key_invalid · idempotency_conflict · official_message_reply_schema_missing · official_message_reply_persistence_failed · internal_error

MCP 工具:doou_review_official_message_reply

POST/api/v2/messages/official-replies+

权限 official_messages:reply · 需要 Idempotency-Key · 需要确认凭证

请求字段

字段必填说明 / 类型与约束
confirmationToken当前报价或审核的确认凭证string · 至少 32 字符 · 至多 4096 字符
idempotencyKey按场景REST 放在 Idempotency-Key 请求头;MCP 放在参数中string
完整 JSON Schema · 含嵌套字段与组合约束
doou-official-message-reply-confirmation.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-official-message-reply-confirmation.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "confirmationToken"
  ],
  "properties": {
    "confirmationToken": {
      "type": "string",
      "minLength": 32,
      "maxLength": 4096
    },
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
    }
  }
}
doou-official-message-reply-confirmation.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-official-message-reply-receipt.v1"
receiptId命令回执标识string
state命令当前状态string · 可选:prepared / confirmed / sending / accepted / failed / unknown / cancelled
channelstring · 固定值:"whatsapp_business"
conversationIdstring
latestInboundMessageIdstring · 至少 1 字符 · 至多 180 字符
messageIdstring · 至多 180 字符 | null
providerMessageIdstring · 至多 240 字符 | null
responseStatusinteger · 最小 100 · 最大 599 | null
errorCode业务错误码string · 至多 120 字符 | null
startedAtstring · date-time | null
finishedAtstring · date-time | null
updatedAt最近更新时间string · date-time
replayed是否重放已有回执boolean
automaticRetryboolean · 固定值:false
完整 JSON Schema · 含嵌套字段与组合约束
doou-official-message-reply-receipt.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-official-message-reply-receipt.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schemaVersion",
    "receiptId",
    "state",
    "channel",
    "conversationId",
    "latestInboundMessageId",
    "messageId",
    "providerMessageId",
    "responseStatus",
    "errorCode",
    "startedAt",
    "finishedAt",
    "updatedAt",
    "replayed",
    "automaticRetry"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-official-message-reply-receipt.v1"
    },
    "receiptId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "state": {
      "type": "string",
      "enum": [
        "prepared",
        "confirmed",
        "sending",
        "accepted",
        "failed",
        "unknown",
        "cancelled"
      ]
    },
    "channel": {
      "const": "whatsapp_business"
    },
    "conversationId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "latestInboundMessageId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180
    },
    "messageId": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 180
        },
        {
          "type": "null"
        }
      ]
    },
    "providerMessageId": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 240
        },
        {
          "type": "null"
        }
      ]
    },
    "responseStatus": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 100,
          "maximum": 599
        },
        {
          "type": "null"
        }
      ]
    },
    "errorCode": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "startedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "finishedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "replayed": {
      "type": "boolean"
    },
    "automaticRetry": {
      "const": false
    }
  }
}
doou-official-message-reply-receipt.v1

错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · confirmation_invalid · confirmation_expired · confirmation_actor_mismatch · confirmation_not_found · confirmation_input_conflict · confirmation_already_used · idempotency_key_invalid · idempotency_conflict · official_message_reply_revision_conflict · official_message_reply_not_authorized · whatsapp_reply_window_closed · whatsapp_send_rejected · whatsapp_send_receipt_unknown · official_message_reply_schema_missing · official_message_reply_persistence_failed · internal_error

MCP 工具:doou_confirm_official_message_reply

actions

需确认的业务动作和 AI 值守策略。

GET/api/v2/watch-policy/changes/{id}+

权限 watch_policy:write

请求字段

id 为必填路径参数,使用前序查询或回执返回的对应资源 ID。

字段必填说明 / 类型与约束
id资源唯一标识string
完整 JSON Schema · 含嵌套字段与组合约束
doou-command-receipt-id.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-command-receipt-id.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    }
  }
}
doou-command-receipt-id.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"workflow-command-receipt.v1"
receiptId命令回执标识string
operation业务操作标识string · 至少 1 字符 · 至多 160 字符
state命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired
inputHash按场景string
input按场景object
pricing按场景本次操作的费用信息object
workflow按场景object | null
workflowRunId按场景工作流运行标识string | null
statusUrl状态查询地址string · 至少 1 字符 · 至多 500 字符
resultStatus结果是否可用string · 可选:available / missing / pending / unavailable
result已产生的业务结果object | null
errorCode业务错误码string · 至多 120 字符 | null
replayed是否重放已有回执boolean
externalWritePerformed按场景boolean · 固定值:false
完整 JSON Schema · 含嵌套字段与组合约束
workflow-command-receipt.v1
{
  "$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schemaVersion",
    "receiptId",
    "operation",
    "state",
    "statusUrl",
    "resultStatus",
    "result",
    "errorCode",
    "replayed"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workflow-command-receipt.v1"
    },
    "receiptId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "operation": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "state": {
      "type": "string",
      "enum": [
        "quoted",
        "executing",
        "accepted",
        "running",
        "succeeded",
        "failed",
        "unknown",
        "expired"
      ]
    },
    "inputHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "input": {
      "type": "object"
    },
    "pricing": {
      "type": "object"
    },
    "workflow": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "workflowRunId": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "statusUrl": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "resultStatus": {
      "type": "string",
      "enum": [
        "available",
        "missing",
        "pending",
        "unavailable"
      ]
    },
    "result": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "errorCode": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "replayed": {
      "type": "boolean"
    },
    "externalWritePerformed": {
      "const": false
    }
  }
}
workflow-command-receipt.v1

错误码:unauthorized · scope_forbidden · rate_limited · receipt_id_invalid · receipt_not_found · external_command_storage_unavailable · external_command_persistence_failed · internal_error

MCP 工具:doou_get_watch_policy_receipt

POST/api/v2/watch-policy/reviews+

权限 watch_policy:write · 需要 Idempotency-Key

请求字段

字段必填说明 / 类型与约束
changestring · 可选:replace / pause / resume
policy按场景object
idempotencyKey按场景REST 放在 Idempotency-Key 请求头;MCP 放在参数中string
完整 JSON Schema · 含嵌套字段与组合约束
doou-watch-policy-change-request.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-watch-policy-change-request.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "change"
  ],
  "properties": {
    "change": {
      "type": "string",
      "enum": [
        "replace",
        "pause",
        "resume"
      ]
    },
    "policy": {
      "type": "object"
    },
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
    }
  }
}
doou-watch-policy-change-request.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-watch-policy-review.v1"
reviewIdstring
operation业务操作标识string · 固定值:"actions.update_watch_policy"
changestring · 可选:replace / pause / resume
confirmation确认要求、凭证和有效期object
replayed是否重放已有回执boolean
providerCallsnumber · 固定值:0
modelCallsnumber · 固定值:0
scheduleWritePerformedboolean · 固定值:false
externalWritePerformedboolean · 固定值:false
完整 JSON Schema · 含嵌套字段与组合约束
doou-watch-policy-review.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-watch-policy-review.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schemaVersion",
    "reviewId",
    "operation",
    "change",
    "confirmation",
    "replayed",
    "providerCalls",
    "modelCalls",
    "scheduleWritePerformed",
    "externalWritePerformed"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-watch-policy-review.v1"
    },
    "reviewId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "operation": {
      "const": "actions.update_watch_policy"
    },
    "change": {
      "type": "string",
      "enum": [
        "replace",
        "pause",
        "resume"
      ]
    },
    "confirmation": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "required",
        "expiresAt",
        "token"
      ],
      "properties": {
        "required": {
          "const": true
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        },
        "token": {
          "type": "string",
          "minLength": 32,
          "maxLength": 4096
        }
      }
    },
    "replayed": {
      "type": "boolean"
    },
    "providerCalls": {
      "const": 0
    },
    "modelCalls": {
      "const": 0
    },
    "scheduleWritePerformed": {
      "const": false
    },
    "externalWritePerformed": {
      "const": false
    }
  }
}
doou-watch-policy-review.v1

错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · watch_policy_change_invalid · watch_policy_change_ambiguous · watch_policy_patch_missing · watch_policy_field_unsupported · watch_policy_review_actions_fixed · watch_policy_snapshot_invalid · watch_policy_no_change · external_confirmation_configuration_missing · idempotency_key_invalid · idempotency_conflict · external_command_storage_unavailable · external_command_persistence_failed · internal_error

MCP 工具:doou_review_watch_policy

POST/api/v2/watch-policy/changes+

权限 watch_policy:write · 需要 Idempotency-Key · 需要确认凭证

请求字段

字段必填说明 / 类型与约束
confirmationToken当前报价或审核的确认凭证string · 至少 32 字符 · 至多 4096 字符
idempotencyKey按场景REST 放在 Idempotency-Key 请求头;MCP 放在参数中string
完整 JSON Schema · 含嵌套字段与组合约束
doou-watch-policy-confirmation.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-watch-policy-confirmation.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "confirmationToken"
  ],
  "properties": {
    "confirmationToken": {
      "type": "string",
      "minLength": 32,
      "maxLength": 4096
    },
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
    }
  }
}
doou-watch-policy-confirmation.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"workflow-command-receipt.v1"
receiptId命令回执标识string
operation业务操作标识string · 至少 1 字符 · 至多 160 字符
state命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired
inputHash按场景string
input按场景object
pricing按场景本次操作的费用信息object
workflow按场景object | null
workflowRunId按场景工作流运行标识string | null
statusUrl状态查询地址string · 至少 1 字符 · 至多 500 字符
resultStatus结果是否可用string · 可选:available / missing / pending / unavailable
result已产生的业务结果object | null
errorCode业务错误码string · 至多 120 字符 | null
replayed是否重放已有回执boolean
externalWritePerformed按场景boolean · 固定值:false
完整 JSON Schema · 含嵌套字段与组合约束
workflow-command-receipt.v1
{
  "$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schemaVersion",
    "receiptId",
    "operation",
    "state",
    "statusUrl",
    "resultStatus",
    "result",
    "errorCode",
    "replayed"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workflow-command-receipt.v1"
    },
    "receiptId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "operation": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "state": {
      "type": "string",
      "enum": [
        "quoted",
        "executing",
        "accepted",
        "running",
        "succeeded",
        "failed",
        "unknown",
        "expired"
      ]
    },
    "inputHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "input": {
      "type": "object"
    },
    "pricing": {
      "type": "object"
    },
    "workflow": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "workflowRunId": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "statusUrl": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "resultStatus": {
      "type": "string",
      "enum": [
        "available",
        "missing",
        "pending",
        "unavailable"
      ]
    },
    "result": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "errorCode": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "replayed": {
      "type": "boolean"
    },
    "externalWritePerformed": {
      "const": false
    }
  }
}
workflow-command-receipt.v1

错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · idempotency_key_invalid · confirmation_invalid · confirmation_expired · confirmation_actor_mismatch · confirmation_not_found · confirmation_input_conflict · confirmation_already_used · idempotency_conflict · watch_policy_revision_conflict · watch_policy_change_rejected · watch_policy_receipt_unknown · external_command_storage_unavailable · external_command_persistence_failed · internal_error

MCP 工具:doou_confirm_watch_policy

artifacts

工作流生成的版本化业务成果。

GET/api/v1/workflow-runs/{id}/artifacts+

权限 artifacts:read

请求字段

id 为必填路径参数,使用前序查询或回执返回的对应资源 ID。

字段必填说明 / 类型与约束
limit按场景单页条数integer · 最小 1 · 最大 50 · 默认 20
offset按场景已跳过的条数integer · 最小 0 · 最大 500 · 默认 0
完整 JSON Schema · 含嵌套字段与组合约束
doou-pagination.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-pagination.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "default": 20
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 500,
      "default": 0
    }
  }
}
doou-pagination.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-workflow-artifact-list.v1"
runobject
pageobject
artifactsarray · 元素:object · 最多 50 项
metaobject
完整 JSON Schema · 含嵌套字段与组合约束
doou-workflow-artifact-list.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-workflow-artifact-list.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "run",
    "page",
    "artifacts",
    "meta"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-workflow-artifact-list.v1"
    },
    "run": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "id",
        "status"
      ],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
        },
        "status": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        }
      }
    },
    "page": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "total",
        "limit",
        "offset",
        "hasMore"
      ],
      "properties": {
        "total": {
          "type": "integer",
          "minimum": 0
        },
        "limit": {
          "type": "integer",
          "minimum": 1
        },
        "offset": {
          "type": "integer",
          "minimum": 0
        },
        "hasMore": {
          "type": "boolean"
        }
      }
    },
    "artifacts": {
      "type": "array",
      "maxItems": 50,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "objectType",
          "objectId",
          "schemaVersion",
          "classification",
          "data",
          "lineage",
          "revision",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
          },
          "stepId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
          },
          "objectType": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "objectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "schemaVersion": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "classification": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          },
          "data": {},
          "lineage": {},
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "meta": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "liveProviderCalls",
        "externalWrites"
      ],
      "properties": {
        "source": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "scope": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "liveProviderCalls": {
          "const": false
        },
        "externalWrites": {
          "const": false
        },
        "modelCalls": {
          "type": "boolean"
        },
        "fullBodyIncluded": {
          "type": "boolean"
        }
      }
    }
  }
}
doou-workflow-artifact-list.v1

错误码:unauthorized · scope_forbidden · rate_limited · not_found · internal_error

MCP 工具:doou_get_workflow_artifacts

GET/api/v2/artifacts+

权限 artifacts:read

请求字段

字段必填说明 / 类型与约束
workflowRunId工作流运行标识string
cursor按场景上一页返回的游标string · 至少 1 字符 · 至多 1024 字符
limit按场景单页条数integer · 最小 1 · 最大 50
完整 JSON Schema · 含嵌套字段与组合约束
doou-workflow-artifact-event-cursor.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-workflow-artifact-event-cursor.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "workflowRunId"
  ],
  "properties": {
    "workflowRunId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "cursor": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    }
  }
}
doou-workflow-artifact-event-cursor.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-workflow-artifact-event-page.v1"
runobject
pageobject
eventsarray · 元素:object · 最多 50 项
metaobject
完整 JSON Schema · 含嵌套字段与组合约束
doou-workflow-artifact-event-page.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-workflow-artifact-event-page.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "run",
    "page",
    "events",
    "meta"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-workflow-artifact-event-page.v1"
    },
    "run": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "id",
        "status"
      ],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
        },
        "status": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        }
      }
    },
    "page": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "limit",
        "nextCursor",
        "hasMore"
      ],
      "properties": {
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 50
        },
        "nextCursor": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            {
              "type": "null"
            }
          ]
        },
        "hasMore": {
          "type": "boolean"
        }
      }
    },
    "events": {
      "type": "array",
      "maxItems": 50,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "cursor",
          "eventType",
          "occurredAt",
          "artifact"
        ],
        "properties": {
          "cursor": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024
          },
          "eventType": {
            "type": "string",
            "enum": [
              "artifact.snapshot_created",
              "artifact.snapshot_updated"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "artifact": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "objectType",
              "objectId",
              "schemaVersion",
              "classification",
              "data",
              "lineage",
              "revision",
              "createdAt",
              "updatedAt"
            ],
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
              },
              "stepId": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
              },
              "objectType": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "objectId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 180
              },
              "schemaVersion": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "classification": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "data": {},
              "lineage": {},
              "revision": {
                "type": "integer",
                "minimum": 1
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      }
    },
    "meta": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "liveProviderCalls",
        "externalWrites"
      ],
      "properties": {
        "source": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "scope": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "liveProviderCalls": {
          "const": false
        },
        "externalWrites": {
          "const": false
        },
        "modelCalls": {
          "type": "boolean"
        },
        "fullBodyIncluded": {
          "type": "boolean"
        }
      }
    }
  }
}
doou-workflow-artifact-event-page.v1

错误码:unauthorized · scope_forbidden · rate_limited · invalid_cursor · run_id_invalid · run_not_found · internal_error

MCP 工具:doou_list_workflow_artifact_events

workflows

可恢复工作流及其运行状态。

GET/api/v1/workflow-runs+

权限 runs:read

请求字段

字段必填说明 / 类型与约束
limit按场景单页条数integer · 最小 1 · 最大 50 · 默认 20
offset按场景已跳过的条数integer · 最小 0 · 最大 500 · 默认 0
完整 JSON Schema · 含嵌套字段与组合约束
doou-pagination.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-pagination.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "default": 20
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 500,
      "default": 0
    }
  }
}
doou-pagination.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-workflow-run-index.v1"
modestring · 至少 1 字符 · 至多 80 字符
reason按场景string · 至多 240 字符 | null
runsarray · 元素:object · 最多 50 项
完整 JSON Schema · 含嵌套字段与组合约束
doou-workflow-run-index.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-workflow-run-index.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "mode",
    "runs"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-workflow-run-index.v1"
    },
    "mode": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "reason": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 240
        },
        {
          "type": "null"
        }
      ]
    },
    "runs": {
      "type": "array",
      "maxItems": 50,
      "items": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "id",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
          },
          "status": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          }
        }
      }
    }
  }
}
doou-workflow-run-index.v1

错误码:unauthorized · scope_forbidden · rate_limited · not_found · internal_error

MCP 工具:doou_list_workflow_runs

usage_receipts

外部命令的费用预估、确认状态和最终用量回执。

GET/api/v2/usage-receipts+

权限 usage:read

请求字段

字段必填说明 / 类型与约束
cursor按场景上一页返回的游标string · 至少 1 字符 · 至多 1024 字符
limit按场景单页条数integer · 最小 1 · 最大 50
完整 JSON Schema · 含嵌套字段与组合约束
doou-usage-receipt-cursor.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-usage-receipt-cursor.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "cursor": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    }
  }
}
doou-usage-receipt-cursor.v1

响应 data

字段必填说明 / 类型与约束
schemaVersion数据结构版本string · 固定值:"doou-usage-receipt-page.v1"
pageobject
receiptsarray · 元素:object · 最多 50 项
metaobject
完整 JSON Schema · 含嵌套字段与组合约束
doou-usage-receipt-page.v1
{
  "$id": "https://doouai.com/api/v2/schemas/doou-usage-receipt-page.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "page",
    "receipts",
    "meta"
  ],
  "properties": {
    "schemaVersion": {
      "const": "doou-usage-receipt-page.v1"
    },
    "page": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "limit",
        "nextCursor",
        "hasMore"
      ],
      "properties": {
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 50
        },
        "nextCursor": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            {
              "type": "null"
            }
          ]
        },
        "hasMore": {
          "type": "boolean"
        }
      }
    },
    "receipts": {
      "type": "array",
      "maxItems": 50,
      "items": {
        "type": "object"
      }
    },
    "meta": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "liveProviderCalls",
        "externalWrites"
      ],
      "properties": {
        "source": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "scope": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "liveProviderCalls": {
          "const": false
        },
        "externalWrites": {
          "const": false
        },
        "modelCalls": {
          "type": "boolean"
        },
        "fullBodyIncluded": {
          "type": "boolean"
        }
      }
    }
  }
}
doou-usage-receipt-page.v1

错误码:unauthorized · scope_forbidden · rate_limited · invalid_cursor · external_command_storage_unavailable · internal_error

MCP 工具:doou_list_usage_receipts

06 / RELIABILITY

分页、重试与错误处理

名单接口使用 limit / offset;采用游标的接口使用响应中的 page.nextCursor。分页方式、上限和终止条件以各接口 Schema 为准。成果按稳定 ID 与 revision 合并,避免旧版本覆盖新版本。

交互界面可从 3–5 秒轮询间隔开始,后台适当放缓;收到 429 时遵守 Retry-After。不应根据一次空分页推断任务完成。

情况处理方式
401 / 403检查令牌有效性与 Scope,不自动扩大权限。
409检查幂等键、已冻结的范围或审核版本是否冲突。
422按字段约束修正参数,再请求。
429按 Retry-After 延后,降低请求频率。
网络超时 / 5xx / unknown先查询已有回执或任务状态,不使用新幂等键盲目再次执行。
确认凭证过期先检查原任务是否已启动;需要新报价时重新取得用户确认。

幂等键格式为 ^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$。重试保持相同凭据、请求体与键。replayed: true 表示返回已有回执;retryable 不代表可以用新键重复付费执行。排错时保存 error.codeerror.message 与请求 ID。

07 / MCP · BETA

让 AI 助手理解你的业务

支持远程 MCP 的客户端可连接获准环境的 /api/mcp,使用 Streamable HTTP。OAuth 客户端先读取资源发现地址,并按该环境的授权流程完成 PKCE;手动令牌由宿主的安全配置保存。

连接地址
MCP: {DOOU_BASE_URL}/api/mcp
OAuth discovery: {DOOU_BASE_URL}/.well-known/oauth-protected-resource/api/mcp

连接后使用 tools/list 获取实际可用工具及其 inputSchema,再用 tools/call 调用。读取返回的 structuredContentisError,不要将展示文本当作稳定数据结构。

客户搜索工具顺序
doou_create_customer_search_draft
  → doou_quote_customer_search
  → 展示费用,等待用户确认
  → doou_confirm_customer_search

MCP 的 idempotencyKey 放在工具参数中。API 和 MCP 使用相同的权限、费用与确认规则,AI 助手不能跳过用户确认。可用工具以授权环境的实际发现结果为准。