ClawEmail
Provision and manage @clawemail.com Google Workspace email accounts for AI agents. Each account comes with full Gmail, Docs, Sheets, Calendar, and Drive access plus OAuth credentials for programmatic use.
Setup
Set your API key as an environment variable:
CODEBLOCK0
Base URL: INLINECODE0
All admin endpoints require the header: INLINECODE1
Check Email Availability (Public — no API key needed)
Before creating an account, always check if the prefix is available:
CODEBLOCK1
Response when available:
CODEBLOCK2
Response when taken or reserved:
CODEBLOCK3
Create Email Account
Provisions a new @clawemail.com Google Workspace user. Returns a temporary password and an OAuth connect URL.
CODEBLOCK4
Response:
CODEBLOCK5
Important: Save the password immediately — it is shown only once.
After creation, the user must:
- 1. Log in to Gmail at https://mail.google.com with the new email and password
- Visit the
connect_url to authorize OAuth and receive their credentials JSON
List All Emails
CODEBLOCK6
Supports pagination with ?limit=100&offset=0.
Get Email Details
CODEBLOCK7
Returns email status, creation date, OAuth connection date, and Workspace user details.
Suspend Email
Temporarily disables a Google Workspace account (preserves data):
CODEBLOCK8
Unsuspend Email
Re-enables a previously suspended account:
CODEBLOCK9
Delete Email
Permanently deletes the Google Workspace account and all associated data:
CODEBLOCK10
Self-Service Signup (No API Key)
For users who want to sign up themselves through Stripe checkout:
- 1. Direct them to: INLINECODE4
- They choose monthly ($16/mo) or annual ($160/yr), enter billing email, and pay via Stripe
- After payment they receive their password and OAuth connect link
Typical Workflow
- 1. Check availability: INLINECODE5
- Create account: POST to
/api/emails with the prefix - Save credentials: Store the password securely
- Connect OAuth: Direct user to the
connect_url from the response - Use the account: The agent now has a real Gmail address with full Google Workspace access
Prefix Rules
- - Must be 3-30 characters
- Must start with a letter
- Can contain letters, numbers, dots, underscores, or hyphens
- Many common names, brands, and words are reserved
When to Use
- - User asks to create an email account for their AI agent
- User needs a Google Workspace account with OAuth access
- User wants to check if a specific email address is available
- User needs to manage (suspend/unsuspend/delete) an existing account
技能名称: claw-admin
详细描述:
ClawEmail
为AI代理配置和管理@clawemail.com Google Workspace邮箱账户。每个账户均提供完整的Gmail、文档、表格、日历和云端硬盘访问权限,以及用于程序化使用的OAuth凭据。
设置
将您的API密钥设置为环境变量:
export CLAWEMAILAPIKEY=yourapikey_here
基础URL: https://clawemail.com
所有管理端点均需包含请求头:-H X-API-Key: $CLAWEMAILAPIKEY
检查邮箱可用性(公开接口——无需API密钥)
创建账户前,请先检查前缀是否可用:
bash
curl -s https://clawemail.com/check/DESIRED_PREFIX
可用时的响应:
json
{prefix:tom,email:tom@clawemail.com,available:true}
已被占用或保留时的响应:
json
{available:false,errors:[This email is reserved]}
创建邮箱账户
配置一个新的@clawemail.com Google Workspace用户。返回临时密码和OAuth连接URL。
bash
curl -s -X POST https://clawemail.com/api/emails \
-H X-API-Key: $CLAWEMAILAPIKEY \
-H Content-Type: application/json \
-d {prefix:DESIRED_PREFIX}
响应:
json
{
success: true,
email: tom@clawemail.com,
password: aB3$xYz...,
connect_url: https://clawemail.com/connect/tom,
instructions: 1. 用户使用上述邮箱/密码登录Gmail。2. 用户访问connect_url授权OAuth。3. 用户将收到其OpenClaw凭据。
}
重要提示: 请立即保存密码——该密码仅显示一次。
创建完成后,用户必须:
- 1. 登录 https://mail.google.com 的Gmail,使用新邮箱和密码
- 访问connect_url以授权OAuth并接收其凭据JSON
列出所有邮箱
bash
curl -s https://clawemail.com/api/emails \
-H X-API-Key: $CLAWEMAILAPIKEY
支持分页,使用?limit=100&offset=0。
获取邮箱详情
bash
curl -s https://clawemail.com/api/emails/PREFIX \
-H X-API-Key: $CLAWEMAILAPIKEY
返回邮箱状态、创建日期、OAuth连接日期以及Workspace用户详情。
暂停邮箱
临时禁用Google Workspace账户(保留数据):
bash
curl -s -X POST https://clawemail.com/api/emails/PREFIX/suspend \
-H X-API-Key: $CLAWEMAILAPIKEY
恢复邮箱
重新启用之前暂停的账户:
bash
curl -s -X POST https://clawemail.com/api/emails/PREFIX/unsuspend \
-H X-API-Key: $CLAWEMAILAPIKEY
删除邮箱
永久删除Google Workspace账户及其所有关联数据:
bash
curl -s -X DELETE https://clawemail.com/api/emails/PREFIX \
-H X-API-Key: $CLAWEMAILAPIKEY
自助注册(无需API密钥)
对于希望通过Stripe结账自行注册的用户:
- 1. 引导他们访问:https://clawemail.com/signup?prefix=DESIRED_PREFIX
- 他们选择月度(16美元/月)或年度(160美元/年)方案,输入账单邮箱,并通过Stripe支付
- 支付完成后,他们将收到密码和OAuth连接链接
典型工作流程
- 1. 检查可用性: curl -s https://clawemail.com/check/myagent
- 创建账户: 使用前缀向/api/emails发送POST请求
- 保存凭据: 安全存储密码
- 连接OAuth: 引导用户访问响应中的connect_url
- 使用账户: 代理现在拥有一个真实的Gmail地址,并具备完整的Google Workspace访问权限
前缀规则
- - 长度必须为3-30个字符
- 必须以字母开头
- 可包含字母、数字、点号、下划线或连字符
- 许多常见名称、品牌和词汇已被保留
使用场景
- - 用户要求为其AI代理创建邮箱账户
- 用户需要具有OAuth访问权限的Google Workspace账户
- 用户希望检查特定邮箱地址是否可用
- 用户需要管理(暂停/恢复/删除)现有账户