Winnr Reseller API

The Reseller API from Winnr, for reseller.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 17

GET /v1/reseller/profile Get reseller profile #
PATCH /v1/reseller/profile Update reseller profile #
GET /v1/reseller/accounts List sub-accounts #
POST /v1/reseller/accounts Create sub-account #
GET /v1/reseller/accounts/{id}/usage Get sub-account usage #
GET /v1/reseller/usage Get aggregate usage #
GET /v1/reseller/audit-log List audit log #
POST /v1/reseller/impersonate Impersonate sub-account #
POST /v1/reseller/accounts/{id}/suspend Suspend sub-account #
POST /v1/reseller/accounts/{id}/reactivate Reactivate sub-account #
POST /v1/reseller/accounts/{id}/billing-mode Switch sub-account billing mode #
GET /v1/reseller/accounts/{id} Get sub-account detail #
PATCH /v1/reseller/accounts/{id} Update sub-account #
DELETE /v1/reseller/accounts/{id} Delete sub-account #
POST /v1/reseller/domain Set custom domain #
GET /v1/reseller/domain/status Check custom domain status #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/winnr-app:winnr-app-reseller-api"
All apis
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.

Get an API 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 Specification

winnr-app-reseller-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Winnr Reseller 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: Reseller
paths:
  /v1/reseller/profile:
    get:
      tags:
      - Reseller
      summary: Get reseller profile
      description: Returns the reseller profile for the authenticated account. Requires account_type = "reseller".
      operationId: getResellerProfile
      responses:
        '200':
          description: Reseller profile
        '403':
          description: Not a reseller account
    patch:
      tags:
      - Reseller
      summary: Update reseller profile
      description: Update branding, settings, and defaults on the reseller profile.
      operationId: updateResellerProfile
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                company_name:
                  type: string
                support_email:
                  type: string
                default_domain_limit:
                  type: integer
                default_email_user_limit:
                  type: integer
                self_signup_enabled:
                  type: boolean
      responses:
        '200':
          description: Updated profile
  /v1/reseller/accounts:
    get:
      tags:
      - Reseller
      summary: List sub-accounts
      description: List all sub-accounts owned by this reseller. Supports search and pagination.
      operationId: listResellerAccounts
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
          default: 50
      - name: offset
        in: query
        schema:
          type: integer
          default: 0
      - name: search
        in: query
        schema:
          type: string
      - name: status
        in: query
        schema:
          type: string
      responses:
        '200':
          description: List of sub-accounts
    post:
      tags:
      - Reseller
      summary: Create sub-account
      description: Create a new sub-account with a Firebase Auth user and Firestore account doc.
      operationId: createResellerAccount
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - email
              - first_name
              properties:
                email:
                  type: string
                first_name:
                  type: string
                last_name:
                  type: string
                company_name:
                  type: string
                password:
                  type: string
                domain_limit:
                  type: integer
                email_user_limit:
                  type: integer
      responses:
        '200':
          description: Created sub-account with user details and optional reset link
  /v1/reseller/accounts/{id}/usage:
    get:
      tags:
      - Reseller
      summary: Get sub-account usage
      description: Get detailed usage metrics for a single sub-account.
      operationId: getResellerAccountUsage
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Sub-account usage metrics
  /v1/reseller/usage:
    get:
      tags:
      - Reseller
      summary: Get aggregate usage
      description: Get aggregate usage across all sub-accounts (total domains, email users, warming, etc.).
      operationId: getResellerUsage
      responses:
        '200':
          description: Aggregate reseller usage
  /v1/reseller/audit-log:
    get:
      tags:
      - Reseller
      summary: List audit log
      description: List audit log entries for this reseller's actions.
      operationId: listResellerAuditLog
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
          default: 50
      - name: offset
        in: query
        schema:
          type: integer
          default: 0
      responses:
        '200':
          description: Audit log entries
  /v1/reseller/impersonate:
    post:
      tags:
      - Reseller
      summary: Impersonate sub-account
      description: 'Generate a Firebase custom token to impersonate a sub-account''s admin user.

        Opens in a new tab with a 55-minute session cap.'
      operationId: impersonateSubAccount
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - account_id
              properties:
                account_id:
                  type: string
                duration_minutes:
                  type: integer
                  default: 55
                  maximum: 55
      responses:
        '200':
          description: Impersonation token generated
        '400':
          description: Account suspended/deleted or no admin user
        '403':
          description: Not a reseller or doesn't own account
  /v1/reseller/accounts/{id}/suspend:
    post:
      tags:
      - Reseller
      summary: Suspend sub-account
      description: Suspend a sub-account and disable all its Firebase Auth users.
      operationId: suspendSubAccount
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Account suspended
        '400':
          description: Already suspended or deleted
  /v1/reseller/accounts/{id}/reactivate:
    post:
      tags:
      - Reseller
      summary: Reactivate sub-account
      description: Reactivate a suspended sub-account and re-enable its Firebase Auth users.
      operationId: reactivateSubAccount
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Account reactivated
        '400':
          description: Not currently suspended
  /v1/reseller/accounts/{id}/billing-mode:
    post:
      tags:
      - Reseller
      summary: Switch sub-account billing mode
      description: Switch a sub-account between self-serve billing (customer subscribes via the reseller's Stripe Connected Account) and external billing (reseller invoices the customer out-of-band; the account becomes billing_exempt on-platform). Switching to external cancels the sub-account's active Connected-Account subscriptions and voids open invoices; limits, domains, and warming are preserved. If the account was domain-disabled by past-due enforcement, the daily billing cron re-enables it within 24h.
      operationId: setSubAccountBillingMode
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - mode
              properties:
                mode:
                  type: string
                  enum:
                  - external
                  - self_serve
      responses:
        '200':
          description: Billing mode updated; returns account, cancelled_subscriptions, voided_invoices
        '400':
          description: Invalid mode or deleted account
        '403':
          description: Not a reseller or doesn't own account
  /v1/reseller/accounts/{id}:
    get:
      tags:
      - Reseller
      summary: Get sub-account detail
      operationId: getResellerAccount
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Sub-account detail with admin user and domain breakdown
    patch:
      tags:
      - Reseller
      summary: Update sub-account
      operationId: updateResellerAccount
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_limit:
                  type: integer
                email_user_limit:
                  type: integer
      responses:
        '200':
          description: Updated sub-account
    delete:
      tags:
      - Reseller
      summary: Delete sub-account
      description: 'Soft-delete a sub-account. Sets status to ''deleted'', disables all Firebase Auth users,

        and decrements the reseller''s sub_account_count. 90-day retention.'
      operationId: deleteSubAccount
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Account deleted
        '400':
          description: Already deleted
  /v1/reseller/logo:
    post:
      tags:
      - Reseller
      summary: Upload logo
      description: Upload a logo image (base64 encoded). Max 2MB.
      operationId: uploadResellerLogo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - type
              - content_type
              - data
              properties:
                type:
                  type: string
                  enum:
                  - dark
                  - light
                  - favicon
                  description: Logo variant to upload
                content_type:
                  type: string
                  description: MIME type of the image (e.g. "image/png")
                data:
                  type: string
                  description: Base64-encoded image data
      responses:
        '200':
          description: Logo uploaded successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    $ref: '#/components/schemas/Meta'
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                      type:
                        type: string
                      s3_key:
                        type: string
        '400':
          description: Invalid input or image too large
        '403':
          description: Not a reseller account
  /v1/reseller/domain:
    post:
      tags:
      - Reseller
      summary: Set custom domain
      description: Set custom domain for the reseller. Adds domain to Vercel project.
      operationId: setResellerDomain
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - domain
              properties:
                domain:
                  type: string
                  description: Custom domain to configure (e.g. "app.example.com")
      responses:
        '200':
          description: Domain configured with DNS instructions
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    $ref: '#/components/schemas/Meta'
                  data:
                    type: object
                    properties:
                      domain:
                        type: string
                      dns_instructions:
                        type: object
                        properties:
                          type:
                            type: string
                          name:
                            type: string
                          value:
                            type: string
                      vercel_result:
                        nullable: true
                        type: object
        '400':
          description: Invalid domain
        '403':
          description: Not a reseller account
  /v1/reseller/domain/status:
    get:
      tags:
      - Reseller
      summary: Check custom domain status
      description: Check verification status of the reseller's custom domain.
      operationId: getResellerDomainStatus
      responses:
        '200':
          description: Domain verification status
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    $ref: '#/components/schemas/Meta'
                  data:
                    type: object
                    properties:
                      domain:
                        nullable: true
                        type: string
                      verified:
                        type: boolean
                      vercel_status:
                        nullable: true
                        type: object
        '403':
          description: Not a reseller account
components:
  schemas:
    Meta:
      type: object
      properties:
        request_id:
          type: string
        timestamp:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API token (wnr_xxx...)