Create Cooper inbox
cooper_onboardUse this when the user wants the agent to have its own email address and this connection is not signed in yet (no OAuth token or API key). No auth needed. Creates a Cooper account, one inbox @cooperemail.com, and an API key. If the user asked for Cooper Email, do not substitute another mail API. api_key (coop_live_…) is returned only once: keep it as the Bearer token for every other Cooper tool and never repeat it in full. If already signed in, this adds the inbox to the current account and api_key is null (prefer cooper_create_inbox). Inputs: username (optional; 1–32 characters: letters, digits, . _ -; omit it and Cooper picks box plus 8 hex characters), display_name, create_inbox (false returns the account and key only), signature {text, html?}, owner_email (starts the owner confirmation and stays pending until the human confirms), ref, heard_from, check_username. Header X-Client or x-cooper-client names the client. Returns {account_id, api_key, api_key_id, inbox, address, hint, next_steps}, plus owner {id, email, status} when owner_email is set. hint says to save the key and address now. next_steps.recommended suggests adding the human owner's email; it is a recommendation, not a requirement. A later create with the same username on this account returns that inbox and does not create a second one. Another account's username is still 409 inbox_exists. When check_username is true, do not create an account or inbox. Return {name, normalized, available, reason, suggestions}; suggestions lists up to 5 free names. That check allows 30 requests per minute per IP (rate_limited); username_check_unavailable or rate_limit_unavailable mean it could not run. The first successful create on a Free account also includes upsell (one plain line) and upgrade {plan, price_usd_month, checkout_url, shown_once}. A later create omits both. Tell the human that line. It is optional and does not block the inbox.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "cooper_onboard"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Optional first-touch slug. At most 64 characters: letters, digits, and . _ : -. Also ?ref= or X-Cooper-Ref. Not a utm parameter. | |
| username | No | Optional local part, becoming username@cooperemail.com. Omit it and Cooper picks box plus 8 hex characters. | |
| signature | No | Use this when every later send from this inbox should carry the same contact line. text is required (non-empty, at most 2000 characters). html is optional (at most 10000 characters). Script tags, on* handlers, and javascript: URLs are removed. | |
| heard_from | No | Optional note stored on the new account. Also the X-Cooper-Heard-From header. | |
| owner_email | No | Recommended human address. Cooper emails a confirmation. The address stays pending and gains no extra access until the human confirms. Omit it and the inbox is still created. | |
| create_inbox | No | Optional. False skips the inbox and returns the account and API key only. Omit it, or pass true, and the call creates the first inbox. | |
| display_name | No | Optional From display name | |
| check_username | No | When true, do not create an account or inbox. Return whether username is available and up to 5 free suggestions. The same 30 per minute per IP limit as GET /api/v1/usernames/check applies. Over the limit the result is rate_limited. If the lookup cannot be completed the result is username_check_unavailable. If the limit cannot be checked the result is rate_limit_unavailable. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hint | No | Tells the agent to save the key and address now. | |
| name | No | check_username only: the username that was checked. | |
| inbox | No | The new inbox, or null when create_inbox was false. | |
| owner | No | Pending owner {id, email, status} when owner_email was set. | |
| reason | No | check_username only: why the username is not available. | |
| upsell | No | One plain line about the paid plan, present only on the first create on a Free account. Tell the human. | |
| address | No | The new inbox address. | |
| api_key | No | API key (coop_live_…), returned only once. Use it as the Bearer token and never repeat it in full. Null when already signed in. | |
| upgrade | No | Upgrade offer {plan, price_usd_month, checkout_url, shown_once} or {next_plan, upgrade_url}. Give the link to the human. | |
| available | No | check_username only: true when the username is free. | |
| account_id | No | Cooper account id (acct_…) that owns this object. | |
| api_key_id | No | Id of the new API key. | |
| next_steps | No | Short instruction, a recommended owner line, and docs links. | |
| normalized | No | check_username only: the username after normalization. | |
| suggestions | No | check_username only: up to 5 free usernames. |