Create a sub-account
cooper_create_workspaceUse this when the signed-in parent account should give a project or another agent its own API key and a fixed inbox quota. Requires auth. Inputs: name (required; 1–64 characters), inbox_quota (required integer; how many inboxes that sub-account may hold), client_id (optional idempotency key; the same key returns the original workspace and api_key is null). Returns {id, name, inbox_quota, account_id, api_key, api_key_prefix, inboxes_used, created_at}. api_key is returned only once and only sees that sub-account. Inboxes and sends on the sub-account count toward the parent plan limits. A sub-account cannot create another workspace. Plan prices are unchanged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name for the sub-account, 1–64 characters | |
| client_id | No | Optional idempotency key. Reuse it to get the original workspace back. | |
| inbox_quota | Yes | Maximum live inboxes this sub-account may hold. Set by the parent. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Workspace id. | |
| name | No | Human-readable name. | |
| api_key | No | Workspace API key, returned only once on create. Never repeat it in full. | |
| account_id | No | Sub-account id for this workspace. | |
| created_at | No | ISO-8601 time the object was created. | |
| inbox_quota | No | Most inboxes the workspace may hold. | |
| inboxes_used | No | Live inboxes in the workspace. | |
| api_key_prefix | No | First characters of the workspace key, for display. |