查询 Connect 账号
GET/api/v1/connect/accounts
返回 API Key 所属账号下的 Connect 账号列表。调用触达类接口前,可通过该接口取得可用的 account_id。
Query 参数
| 字段 | 类型 | 必填 | 说明 |
|---|
channel | string | 否 | 按渠道过滤。可选值:email、linkedin、whatsapp。 |
can_send | boolean string | 否 | 按是否可发送过滤。支持 true、false、1、0。 |
请求示例
curl -X GET "https://revor.ai/api/v1/connect/accounts?channel=linkedin&can_send=true" \
-H "Authorization: Bearer sk-revor-REPLACE_ME"
响应示例
{
"ok": true,
"request_id": "req_xxx",
"items": [
{
"account_id": "connect_account_xxx",
"channel": "linkedin",
"name": "LinkedIn Account",
"account_identifier": "https://www.linkedin.com/in/example/",
"status": "ok",
"lifecycle_status": "active",
"can_send": true,
"can_receive": true
}
]
}
响应字段
| 字段 | 类型 | 说明 |
|---|
account_id | string | Connect 账号 ID。触达类接口的 account_id 参数使用该值。 |
channel | string | 账号渠道:email、linkedin 或 whatsapp。 |
name | string | 账号显示名。 |
account_identifier | string | null | 账号标识,例如邮箱地址或 LinkedIn 主页。 |
status | string | 账号状态:ok、credentials、error。 |
lifecycle_status | string | 连接状态,例如 active、connected、reconnect_required。 |
can_send | boolean | 是否可用于发送或执行动作。 |
can_receive | boolean | 是否可接收消息或同步状态。 |
状态说明
status | 说明 |
|---|
ok | 账号可用于对应渠道的 API 操作。 |
credentials | 账号凭证需要更新或重新连接。 |
error | 账号暂不可用。 |
错误
| HTTP | Code | 说明 |
|---|
400 | invalid_channel | channel 值不支持。 |
400 | invalid_can_send | can_send 值不支持。 |
401 | api_key_missing | 未提供 API Key。 |
401 | api_key_invalid | API Key 无效。 |
403 | permission_denied | API Key 权限不足,无法访问该接口。 |
429 | api_rate_limit_exceeded | 请求触发限流。 |