Winnr Email Users API
Email user (mailbox) operations
Email user (mailbox) operations
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/winnr-app:winnr-app-email-users-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Winnr Email Users API
description: 'The Winnr API provides programmatic access to manage email domains, email users,
and inbox operations. Use this API to integrate Winnr''s email infrastructure
into your applications.
## Authentication
All API requests require authentication using an API token.
API tokens start with `wnr_` and can be created in your account settings
or via the `POST /v1/auth/tokens` endpoint.
Include your token in the `Authorization` header:
```
Authorization: Bearer wnr_xxx...
```
## Rate Limiting
API requests are rate limited based on your account tier:
| Plan | Requests/min | Burst |
|------|--------------|-------|
| Startup | 300 | 500 |
| Enterprise | 500 | 800 |
Rate limit headers are included in all responses:
- `X-RateLimit-Limit` - Your per-minute limit
- `X-RateLimit-Remaining` - Requests remaining in current window
- `X-RateLimit-Reset` - Unix timestamp when the window resets
## Response envelope
**Every** success response is wrapped in the same envelope — there are no
bare resource bodies. Single-resource endpoints return:
```json
{
"meta": { "request_id": "D0tCQjBLIAMEVCg=", "timestamp": "2026-09-17T03:16:55Z" },
"data": { "...": "the resource" }
}
```
List endpoints add a sibling `pagination` object and return an array in
`data`:
```json
{
"meta": { "request_id": "...", "timestamp": "..." },
"data": [ { "...": "resource" } ],
"pagination": { "has_more": true, "cursor": "eyJ...", "count": 25 }
}
```
Always read the resource from `data`, never from the top level. The
request id lives at `meta.request_id` on success and at `error.request_id`
on failure — quote it when contacting support.
## Pagination
List endpoints support cursor-based pagination:
- `limit` - Number of items per page (default: 25, max: 100)
- `cursor` - Cursor for next page (from previous response)
## Asynchronous endpoints
Endpoints that touch the mail servers or a registrar (mailbox creation,
domain setup, domain deletion, warming changes) do **not** perform the work
inline. They validate the request, enqueue it, and return a job receipt —
`data.job_id` with `data.status: "pending"` — instead of the created
resource. The affected endpoints say so in their own description.
Poll `GET /v1/jobs/{job_id}` until `status` is `completed` or `failed`,
then read the resource from its own endpoint. Typical completion is a few
seconds to a couple of minutes.
**Reconciling a timed-out or failed request.** These endpoints are *not*
idempotent: a blind retry can enqueue a second mailbox. If a request times
out before you see a `job_id`, do not retry immediately — first check
whether the work already landed:
1. `GET /v1/jobs?filter[type]=domain_setup&filter[status]=in_progress` and
look for a job whose input matches your request; if one exists, poll it
rather than resubmitting.
2. Otherwise `GET /v1/email-users?filter[domain]={domain}` (or the relevant
resource list) and check whether the address already exists.
Only resubmit when neither a job nor the resource is present. Resubmitting
an address that already exists is safe in the sense that it is rejected
with `400 validation_error` rather than silently duplicated.'
version: 1.0.0
contact:
name: Winnr Support
email: support@winnr.app
license:
name: Proprietary
url: https://winnr.app/terms
servers:
- url: https://api.winnr.app
description: Production API
- url: https://c8qc9z97f5.execute-api.us-east-1.amazonaws.com
description: Production API (direct)
- url: http://localhost:3000
description: Local development
security:
- bearerAuth: []
tags:
- name: Email Users
description: Email user (mailbox) operations
paths:
/v1/email-users:
get:
tags:
- Email Users
summary: List email users
description: 'List all email users for the account.
Each item is a full `EmailUser`, including the `smtp_host`/`smtp_port`
and `imap_host`/`imap_port` needed to connect the mailbox — no
per-mailbox detail call is required.'
operationId: listEmailUsers
parameters:
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Cursor'
- name: filter[domain]
in: query
required: false
schema:
type: string
example: talent.example.com
description: 'Filter by domain **name**. Note the bracketed parameter name — a
plain `?domain=` is ignored and returns the unfiltered list.
When this filter is supplied results are not ordered and the
`cursor` parameter does not apply; raise `limit` (max 100) instead.
'
responses:
'200':
description: List of email users
content:
application/json:
schema:
$ref: '#/components/schemas/EmailUserListResponse'
'401':
$ref: '#/components/responses/Unauthorized'
post:
tags:
- Email Users
summary: Create email user
description: 'Create a new email user (mailbox) on a domain you already own.
**This is asynchronous.** The mailbox is created on the mail server by
a background worker, so a successful call returns `200` with a job
receipt (`data.job_id`, `data.status: "pending"`) — *not* the created
mailbox. Poll `GET /v1/jobs/{job_id}` until `status` is `completed`,
then fetch the mailbox with
`GET /v1/email-users?filter[domain]={domain}` (or
`GET /v1/email-users/{user_id}`) to read its password and SMTP/IMAP
connection details.
`domain` is the domain **name** (`talent.example.com`), not the domain
id. See `CreateEmailUserRequest`.
Validation (unknown domain, duplicate address, plan limits, per-domain
caps, password length) happens synchronously and returns `400` before
anything is enqueued — so a `200` means the request was accepted, and
the job can still fail later for mail-server reasons.
See **Asynchronous endpoints** in the introduction for how to reconcile
a timed-out request without creating duplicate mailboxes.'
operationId: createEmailUser
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateEmailUserRequest'
responses:
'200':
description: 'Mailbox creation accepted and queued. The body is a job receipt,
not the mailbox.
'
content:
application/json:
schema:
$ref: '#/components/schemas/EmailUserCreateAccepted'
'400':
$ref: '#/components/responses/ValidationError'
'401':
$ref: '#/components/responses/Unauthorized'
'409':
$ref: '#/components/responses/Conflict'
/v1/email-users/generate-names:
post:
tags:
- Email Users
summary: Generate username suggestions
description: Generate AI-powered username suggestions.
operationId: generateNames
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/GenerateNamesRequest'
responses:
'200':
description: Generated names
content:
application/json:
schema:
$ref: '#/components/schemas/GenerateNamesResponse'
'401':
$ref: '#/components/responses/Unauthorized'
/v1/email-users/bulk:
post:
tags:
- Email Users
summary: Bulk create email users
description: 'Create up to 500 email users on one domain in a single call.
**Asynchronous, like `POST /v1/email-users`:** the whole batch is
enqueued as one job and the response is a job receipt
(`data.job_id`, `data.status: "pending"`, `data.users_count`), not the
created mailboxes. Poll `GET /v1/jobs/{job_id}`, then list the mailboxes
with `GET /v1/email-users?filter[domain]={domain}`.
`domain` in the body is the domain **name**, not the domain id.'
operationId: bulkCreateEmailUsers
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BulkCreateRequest'
responses:
'200':
description: 'Batch accepted and queued. The body is a job receipt, not the
created mailboxes.
'
content:
application/json:
schema:
$ref: '#/components/schemas/BulkCreateResponse'
'401':
$ref: '#/components/responses/Unauthorized'
delete:
tags:
- Email Users
summary: Bulk delete email users
description: Delete multiple email users at once.
operationId: bulkDeleteEmailUsers
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BulkDeleteRequest'
responses:
'200':
description: Bulk deletion results
content:
application/json:
schema:
$ref: '#/components/schemas/BulkDeleteResponse'
'401':
$ref: '#/components/responses/Unauthorized'
/v1/email-users/replace:
post:
tags:
- Email Users
summary: Bulk replace email usernames (destructive)
description: 'Replace the local part (username) of up to 100 mailboxes. A mailbox
cannot be renamed on the mail server, so each replacement DELETES the
old mailbox — **all messages in it are permanently lost and cannot be
recovered** — and recreates it on the same domain with the new
username and a fresh password. Warming restarts from scratch (it is
automatically re-enabled when the old mailbox had it). Works for
pre-warmed mailboxes too (the pre-warmed flag and billing pool carry
over 1:1). Processing is asynchronous; poll the returned job.'
operationId: replaceEmailUsernames
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ReplaceEmailUsernamesRequest'
responses:
'202':
description: Replacement queued
content:
application/json:
schema:
$ref: '#/components/schemas/ReplaceEmailUsernamesResponse'
'400':
$ref: '#/components/responses/ValidationError'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/v1/email-users/{user_id}:
get:
tags:
- Email Users
summary: Get email user
description: Get details for a specific email user.
operationId: getEmailUser
parameters:
- $ref: '#/components/parameters/UserId'
responses:
'200':
description: Email user details
content:
application/json:
schema:
$ref: '#/components/schemas/EmailUserResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
patch:
tags:
- Email Users
summary: Update email user
description: Update email user settings.
operationId: updateEmailUser
parameters:
- $ref: '#/components/parameters/UserId'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateEmailUserRequest'
responses:
'200':
description: Updated email user
content:
application/json:
schema:
$ref: '#/components/schemas/EmailUserResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
delete:
tags:
- Email Users
summary: Delete email user
description: Queue an email user for deletion.
operationId: deleteEmailUser
parameters:
- $ref: '#/components/parameters/UserId'
responses:
'200':
description: Deletion queued
content:
application/json:
schema:
type: object
properties:
meta:
$ref: '#/components/schemas/Meta'
data:
type: object
properties:
message:
type: string
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
components:
parameters:
Cursor:
name: cursor
in: query
schema:
type: string
description: Pagination cursor from previous response
Limit:
name: limit
in: query
schema:
type: integer
default: 25
minimum: 1
maximum: 100
description: Number of items per page
UserId:
name: user_id
in: path
required: true
schema:
type: string
description: Email user ID
schemas:
Pagination:
type: object
description: 'Pagination metadata. Cursor-based endpoints (e.g. `/v1/domains`,
`/v1/email-users`, `/v1/inbox`, `/v1/email-users/{id}/inbox`) populate
`has_more` and `cursor`. Offset-based endpoints (e.g. `/v1/warming`)
populate `page`, `per_page`, and `total`. `count` (number of items in
the current page) is included where available.
'
properties:
has_more:
type: boolean
description: Whether more pages exist after this one (cursor-based endpoints).
cursor:
type: string
nullable: true
description: Opaque cursor to pass as `?cursor=…` for the next page.
count:
type: integer
description: Number of items returned in this response.
total:
type: integer
description: Total number of items across all pages (offset-based endpoints).
page:
type: integer
description: 1-based page number (offset-based endpoints).
per_page:
type: integer
description: Items per page (offset-based endpoints).
CreateEmailUserRequest:
type: object
required:
- username
- domain
properties:
username:
type: string
description: Local part of the email address (before the `@`).
example: jordan
domain:
type: string
description: 'The domain **name**, exactly as it appears in `name` on the domain
resource — e.g. `talent.example.com`. This is **not** the domain
id.
Passing a domain id here fails with
`400 validation_error` / `Domain {value} not found in this account`,
even when that id is a real domain on the account.
Rule of thumb: domain **ids** are used only in the path of
`/v1/domains/{domain_id}/...` routes. Request *bodies* that refer
to a domain — including this one and `BulkCreateRequest` — take the
domain name.
'
example: talent.example.com
name:
type: string
description: Display name used in the `From` header. Derived from `username` if omitted.
example: Jordan Reed
password:
type: string
minLength: 8
description: 'Optional mailbox password; a strong one is generated when omitted.
Minimum 8 characters. Read the generated password back from
`GET /v1/email-users/{user_id}` once the job completes.
'
GenerateNamesRequest:
type: object
properties:
count:
type: integer
default: 5
style:
type: string
enum:
- professional
- casual
- creative
Meta:
type: object
properties:
request_id:
type: string
timestamp:
type: string
format: date-time
EmailUserCreateAccepted:
type: object
description: 'Job receipt for a queued mailbox creation. The mailbox does not exist
yet when this is returned — poll `GET /v1/jobs/{job_id}`, then read the
mailbox (and its password and SMTP/IMAP details) from
`GET /v1/email-users/{user_id}`.
'
properties:
data:
type: object
properties:
job_id:
type: string
description: Poll `GET /v1/jobs/{job_id}` for completion.
example: job_e80f588c889b4091
status:
type: string
enum:
- pending
description: Always `pending` — the mailbox has been enqueued, not created.
email:
type: string
format: email
description: Full address that will be created (`{username}@{domain}`).
example: jordan@talent.example.com
username:
type: string
example: jordan
domain:
type: string
description: Domain name the mailbox is being created on.
example: talent.example.com
name:
type: string
description: Display name that will be set on the mailbox.
example: Jordan Reed
message:
type: string
example: Email user jordan@talent.example.com creation queued
prewarmed_billing:
type:
- object
- 'null'
description: Present only when the domain is pre-warmed; describes the $3/addr seat charge.
meta:
$ref: '#/components/schemas/Meta'
BulkDeleteRequest:
type: object
required:
- user_ids
properties:
user_ids:
type: array
items:
type: string
UpdateEmailUserRequest:
type: object
properties:
name:
type: string
password:
type: string
ReplaceEmailUsernamesResponse:
type: object
properties:
data:
type: object
properties:
job_id:
type: string
status:
type: string
example: pending
pairs_count:
type: integer
domains:
type: object
additionalProperties:
type: integer
description: Pairs queued per domain
message:
type: string
meta:
$ref: '#/components/schemas/Meta'
GenerateNamesResponse:
type: object
properties:
data:
type: array
items:
type: string
meta:
$ref: '#/components/schemas/Meta'
EmailUserResponse:
type: object
properties:
data:
$ref: '#/components/schemas/EmailUser'
meta:
$ref: '#/components/schemas/Meta'
BulkCreateRequest:
type: object
required:
- domain
- users
properties:
domain:
type: string
description: Domain name shared by all users in this request (e.g. "example.com"). All users in a single bulk request must be on the same domain — send one request per domain if creating users across multiple.
example: example.com
users:
type: array
minItems: 1
maxItems: 500
items:
$ref: '#/components/schemas/BulkCreateUserItem'
ReplaceEmailUsernamesRequest:
type: object
required:
- replacements
- acknowledge_data_loss
properties:
replacements:
type: array
minItems: 1
maxItems: 100
items:
type: object
required:
- user_id
- new_username
properties:
user_id:
type: string
description: email_users document id
new_username:
type: string
description: New local part (same domain), lowercase letters/digits/._-
acknowledge_data_loss:
type: boolean
description: Must be true — confirms the old mailboxes and ALL their messages are permanently deleted.
BulkCreateResponse:
type: object
description: 'Job receipt for a queued bulk mailbox creation. The mailboxes do not
exist yet when this is returned.
'
properties:
data:
type: object
properties:
job_id:
type: string
description: Poll `GET /v1/jobs/{job_id}` for completion.
example: job_e80f588c889b4091
status:
type: string
enum:
- pending
description: Always `pending` — the batch has been enqueued, not executed.
domain:
type: string
description: Domain name the mailboxes are being created on.
example: talent.example.com
users_count:
type: integer
description: Number of mailboxes accepted for creation.
example: 5
message:
type: string
example: Bulk creation of 5 user(s) queued on talent.example.com
prewarmed_billing:
type:
- object
- 'null'
description: Present only when the domain is pre-warmed; describes the $3/addr seat charge.
meta:
$ref: '#/components/schemas/Meta'
BulkCreateUserItem:
type: object
required:
- username
properties:
username:
type: string
description: Local part of the email address (before the @)
example: john
name:
type: string
description: Display name. Auto-derived from username (e.g. "john.doe" → "John Doe") if omitted.
example: John Doe
password:
type: string
description: Optional password. Auto-generated if omitted.
footer:
type: string
description: Optional email signature footer.
EmailUserListResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/EmailUser'
pagination:
$ref: '#/components/schemas/Pagination'
meta:
$ref: '#/components/schemas/Meta'
ErrorResponse:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: array
items:
type: object
properties:
field:
type: string
message:
type: string
meta:
$ref: '#/components/schemas/Meta'
EmailUser:
type: object
properties:
id:
type: string
description: Firestore document ID for the email user.
username:
type: string
description: Local part of the email address (before the `@`).
domain:
type: string
description: Domain string (after the `@`).
full_address:
type: string
format: email
description: Full email address (`{username}@{domain}`). Use this when sending mail.
name:
type: string
nullable: true
description: Display name (used in the From header).
status:
type: string
enum:
- active
- paused
- disabled
description: 'Mailbox lifecycle state.
- `active` — mailbox is provisioned and warming/sending normally.
- `paused` — warming temporarily paused; mailbox still exists.
- `disabled` — mailbox is disabled (e.g. plan past-due, account hold).
'
type:
type: string
nullable: true
description: Mailbox type (e.g. `cold_email`, `prewarmed`). Null for legacy mailboxes.
daily_send_limit:
type: integer
nullable: true
description: Per-mailbox daily send cap, if configured.
footer:
type: string
nullable: true
description: HTML footer appended to outbound mail, if configured.
imap_host:
type: string
nullable: true
description: 'IMAP server hostname for this mailbox. Domains are distributed across
multiple mail servers, so this is resolved per-mailbox — always connect
to the host returned here, never a fixed hostname. Uses implicit TLS on
`imap_port`. For workspace (Gmail) mailboxes this is `imap.gmail.com`.
'
imap_port:
type: integer
description: IMAP port (implicit TLS). Currently `993`.
smtp_host:
type: string
nullable: true
description: 'SMTP submission hostname for this mailbox, resolved per-mailbox (see
`imap_host`). Uses implicit TLS on `smtp_port`. For workspace (Gmail)
mailboxes this is `smtp.gmail.com`.
'
smtp_port:
type: integer
description: SMTP submission port (implicit TLS). Currently `465`.
created_at:
type: string
format: date-time
nullable: true
updated_at:
type: string
format: date-time
nullable: true
BulkDeleteResponse:
type: object
properties:
data:
type: object
properties:
deleted:
type: integer
failed:
type: integer
meta:
$ref: '#/components/schemas/Meta'
responses:
NotFound:
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error:
code: not_found
message: Resource not found
Conflict:
description: Resource conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error:
code: conflict
message: Email address already exists
Unauthorized:
description: Authentication required or token invalid
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error:
code: unauthorized
message: Invalid or revoked API token
ValidationError:
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error:
code: validation_error
message: Invalid input
details:
- field: email
message: Invalid email format
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: API token (wnr_xxx...)