Create inboxes in a batch
cooper_create_inboxesUse this when the signed-in account needs several email addresses at once, or addresses that should disappear after a deadline (one inbox per signup, trial, or job). Requires auth. Inputs: count (required; how many inboxes, capped per plan), prefix (optional; addresses become prefix-@cooperemail.com, or box@cooperemail.com when omitted), labels (optional strings; filter later with GET /api/v1/inboxes?label=), metadata (optional object stored on every inbox; at most 256 keys, keys at most 256 characters, values string number or boolean, serialized at most 16 KB), ttl_hours (optional hours until expiry) or expires_at (optional ISO-8601 timestamp). Pass at most one of ttl_hours and expires_at. Returns {object:"list", data:[{id, username, email, display_name, created_at, require_sender_auth, labels, expires_at, status, paused_at, metadata, client_id}]}. Temporary inboxes count toward the plan inbox limit until they expire. The daily cron deletes expired inboxes and they then stop counting. Fails with 400 batch_count_exceeded when count is above the per-plan cap, 400 invalid_metadata, or 402 with upgrade_url when the plan inbox limit would be exceeded.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | How many inboxes to create. Capped per plan; each one counts toward the plan inbox limit. | |
| labels | No | Optional labels stored on every inbox in the batch. | |
| prefix | No | Optional local-part prefix. Addresses are prefix-<random>@cooperemail.com. | |
| metadata | No | Optional caller data stored on every inbox in the batch. At most 256 keys, each key at most 256 characters, values string number or boolean, serialized at most 16 KB. Otherwise 400 invalid_metadata. | |
| ttl_hours | No | Optional lifetime in hours. Omit both ttl_hours and expires_at for permanent inboxes. | |
| expires_at | No | Optional ISO-8601 expiry. Do not send this together with ttl_hours. |