Winnr Account API
Account management operations
Account management 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-account-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 Account 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: Account
description: Account management operations
paths:
/v1/account:
get:
tags:
- Account
summary: Get account details
description: Returns the authenticated account's details including limits and configuration.
operationId: getAccount
responses:
'200':
description: Account details
content:
application/json:
schema:
$ref: '#/components/schemas/AccountResponse'
'401':
$ref: '#/components/responses/Unauthorized'
/v1/account/usage:
get:
tags:
- Account
summary: Get usage statistics
description: Returns current usage statistics and limits for the account.
operationId: getAccountUsage
responses:
'200':
description: Usage statistics
content:
application/json:
schema:
$ref: '#/components/schemas/UsageResponse'
'401':
$ref: '#/components/responses/Unauthorized'
/v1/account/email-credits:
post:
tags:
- Account
summary: Set additional email-user credits
description: 'Sets the account''s additional email-user credits (the per-user addon) to a
target total, mirroring the Settings > Subscription dashboard flow. Adds,
updates, or removes the addon line item on the main plan subscription (the
change is prorated and charged immediately to the default payment method),
then updates `email_user_limit_additional_credits` and `email_user_limit`.
`quantity` is the target TOTAL additional credits (not a delta), so the call
is idempotent and safe to retry. Effective email user limit = base plan limit
+ additional credits.
Floor: additional credits can never be set below
`max(0, email_users_used - email_user_limit_base)` — i.e. the total allowance
can never drop below the mailboxes currently in use. To go lower, delete email
users first.
Not available for reseller / Connected-Account sub-accounts (returns 400 — use
the dashboard).'
operationId: updateEmailCredits
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- quantity
properties:
quantity:
type: integer
minimum: 0
maximum: 20000
description: Target total additional email-user credits
responses:
'200':
description: Credits updated (or no-op, or pending payment verification)
content:
application/json:
schema:
type: object
properties:
meta:
$ref: '#/components/schemas/Meta'
data:
type: object
properties:
action:
type: string
enum:
- created
- updated
- removed
- unchanged
- requires_action
description: What happened. `unchanged` = already at this quantity (no charge); `requires_action` = payment needs 3D Secure verification.
additional_credits:
type: integer
description: Additional credits after the change
email_user_limit:
type: integer
description: Effective email user limit (base plan limit + additional_credits)
requires_action:
type: boolean
description: True when the payment needs customer verification (3D Secure)
payment_url:
type: string
description: Hosted invoice URL to complete verification (only when requires_action is true)
'400':
description: Invalid quantity, no active subscription, or reseller-managed account
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
description: Payment failed (card declined). Credits were not changed.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
$ref: '#/components/responses/Conflict'
/v1/account/universal-inbox:
post:
tags:
- Account
summary: Turn the Universal Inbox on or off
description: 'Sets whether the account''s inbox sync (the dashboard''s Universal Inbox)
is on. This is the same switch as Settings > Universal Inbox in the
dashboard. Turning it off stops syncing incoming mail into the inbox;
mailboxes and the mail on them are untouched, and it can be turned back
on at any time. Idempotent.
`email.received` webhook events are produced by inbox sync, so turning
it off is refused with `409` while any **enabled** webhook endpoint
subscribes to `email.received` or `*`. Remove that event from the
endpoint (or disable the endpoint) first. Subscribing an endpoint to
`email.received`, or re-enabling one, turns inbox sync back on
automatically.'
operationId: setUniversalInbox
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- enabled
properties:
enabled:
type: boolean
description: true to turn inbox sync on, false to turn it off
responses:
'200':
description: Setting applied (or already in that state)
content:
application/json:
schema:
type: object
properties:
meta:
$ref: '#/components/schemas/Meta'
data:
type: object
properties:
enabled:
type: boolean
description: The inbox sync setting after the call
changed:
type: boolean
description: False when the account was already in the requested state
'400':
$ref: '#/components/responses/ValidationError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
description: API token lacks write permission
'409':
description: Turning the inbox off was refused because an enabled webhook endpoint subscribes to `email.received` (or `*`).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/billing/update-payment:
get:
tags:
- Account
summary: One-click payment-method update (from billing email link)
description: 'Public endpoint (no authentication required). The link is minted into
Winnr billing emails (payment failure, upcoming-renewal and
expiring-card notices, domains disabled). `t` is a signed token bound
to the account and its Stripe customer that expires after 30 days.
A valid token redirects (302) to a Stripe Billing Portal session
limited to adding a payment method, which returns to Settings when
done. Opening the link changes nothing by itself, so mail scanners
that prefetch it are harmless. Rate limited per IP.'
operationId: updatePaymentMethodLink
security: []
parameters:
- name: t
in: query
required: true
schema:
type: string
responses:
'302':
description: Redirect to the Stripe Billing Portal payment-method form
headers:
Location:
schema:
type: string
format: uri
'400':
description: Invalid or expired link (HTML page pointing to Settings)
content:
text/html:
schema:
type: string
'429':
description: Too many requests from this IP
'502':
description: The payment page could not be opened (HTML page pointing to Settings)
content:
text/html:
schema:
type: string
components:
responses:
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
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
Conflict:
description: Resource conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error:
code: conflict
message: Email address already exists
schemas:
UsageResponse:
type: object
properties:
data:
type: object
properties:
domains:
type: object
properties:
used:
type: integer
limit:
type: integer
email_users:
type: object
properties:
used:
type: integer
limit:
type: integer
meta:
$ref: '#/components/schemas/Meta'
Meta:
type: object
properties:
request_id:
type: string
timestamp:
type: string
format: date-time
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'
AccountResponse:
type: object
properties:
data:
type: object
properties:
id:
type: string
description: Account ID
name:
type: string
description: Account name
email:
type: string
description: Account owner email
plan:
type: string
description: Current plan name (e.g. "Startup", "Enterprise")
domains_limit:
type: integer
description: Maximum number of domains allowed
domains_used:
type: integer
description: Number of domains currently in use
domain_credits:
type: integer
description: Domain credits available (each credit covers one domain purchase)
email_users_limit:
type: integer
description: Maximum number of email users allowed
email_users_used:
type: integer
description: Number of email users currently in use
stripe_subscription_status:
type: string
description: Subscription status (e.g. "active", "canceled", "past_due")
prewarmed_subscription_status:
type: string
nullable: true
description: Status of the standalone pre-warmed ($3/addr) subscription, if any
prewarmed_domains_disabled:
type: boolean
description: True while pre-warmed domains are suspended for non-payment
universal_inbox_enabled:
type: boolean
description: Whether inbox sync (the Universal Inbox) is on. Change it with POST /v1/account/universal-inbox.
api_token:
type: object
description: 'Present only when the request is authenticated with an API token.
Describes the calling token itself so integrations can discover
their own scope (the Winnr MCP server hides write tools when
`permissions` lacks "write").
'
properties:
id:
type: string
description: Token ID
name:
type: string
nullable: true
description: Token name as set at creation
permissions:
type: array
items:
type: string
enum:
- read
- write
meta:
$ref: '#/components/schemas/Meta'
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: API token (wnr_xxx...)