Cooper Email Billing API

Billing operations for the Cooper Email API.

GitHub OpenAPI

Operations 6

POST /api/v1/billing/sms-segments Set the 500-segment packs on the subscription #
POST /api/v1/billing/voice-minutes Set the 250-minute packs on the subscription #
POST /api/v1/billing/addons Set extra inbox, domain, and email quantities on the subscription #
GET /api/v1/billing Plan, usage, limits, and upgrade path. #
POST /api/v1/billing/checkout Create a Stripe Checkout session and return its URL. #
POST /api/v1/billing/portal Create a Stripe customer portal session and return its URL #

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/cooperemail-com:cooperemail-com-billing-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. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cooperemail-com-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cooperemail Com Billing API
  version: 1.0.0
  contact:
    name: Avatar 8 LLC
    email: ops@avatar33.com
  license:
    name: Proprietary
    url: https://cooperemail.com/terms
  description: 'Operations tagged Billing across 2 of this provider''s published API definitions: cooperemail-com-openapi.json, cooperemail-com-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://cooperemail.com
  description: This deployment
security:
- bearerAuth: []
tags:
- name: Billing
  description: Billing operations for the Cooper Email API.
paths:
  /api/v1/billing/sms-segments:
    post:
      operationId: setSmsSegmentPacks
      tags:
      - Billing
      summary: Set the 500-segment packs on the subscription
      description: Requires billing_write on the parent account. A sub-account key is HTTP 403 workspace_billing_forbidden. HTTP 404 not_found when COOPER_SMS is off, and also when COOPER_SMS_BILLING is not stripe. Starter or Pro with a Stripe subscription is required (HTTP 402 plan_limit_exceeded otherwise). packs replaces the previous quantity, from 0 to 100. Each pack is $10/month and adds 500 outbound segments. An increase is invoiced immediately, and the pack count is saved only after Stripe confirms payment. A decrease is not credited. Packs already used stay locked until the Stripe period ends (HTTP 409 addon_below_usage). A past_due, unpaid, or incomplete subscription returns HTTP 402 subscription_not_current. A declined invoice is HTTP 402 addon_payment_failed and the quantity is not saved. The response is the new pack count, not a Checkout URL.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                packs:
                  type: integer
                  minimum: 0
                  maximum: 100
              required:
              - packs
      responses:
        '200':
          description: Pack quantity now on the subscription.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmsSegmentPacks'
        '400':
          description: packs outside 0 to 100
        '402':
          description: HTTP 402 plan_limit_exceeded when a Starter or Pro subscription is required. HTTP 402 subscription_not_current when the subscription is past_due, unpaid, or incomplete. HTTP 402 addon_payment_failed when the invoice is not paid.
        '403':
          description: workspace_billing_forbidden or permission_denied
        '404':
          description: not_found when SMS or SMS billing is off
        '409':
          description: HTTP 409 addon_below_usage when packs would drop below segments already sent.
        '503':
          description: sms_billing_failed
    servers:
    - url: https://cooperemail.com
      description: This deployment
  /api/v1/billing/voice-minutes:
    post:
      operationId: setVoiceMinutePacks
      tags:
      - Billing
      summary: Set the 250-minute packs on the subscription
      description: Requires billing_write on the parent account. A sub-account key is HTTP 403 workspace_billing_forbidden. HTTP 404 not_found when voice is off, and also when voice billing is off. Starter or Pro with a Stripe subscription is required (HTTP 402 plan_limit_exceeded otherwise). packs replaces the previous quantity, from 0 to 100. Each pack is $10/month and adds 250 voice minutes. The Stripe price lookup key is cooper_voice_250_monthly. That price is not created by npm run stripe:setup. An increase is invoiced immediately, and the pack count is saved only after Stripe confirms payment. A decrease is not credited. Packs already used stay locked until the Stripe period ends (HTTP 409 addon_below_usage). A past_due, unpaid, or incomplete subscription returns HTTP 402 subscription_not_current. A declined invoice is HTTP 402 addon_payment_failed and the quantity is not saved. The response is the new pack count, not a Checkout URL.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                packs:
                  type: integer
                  minimum: 0
                  maximum: 100
              required:
              - packs
      responses:
        '200':
          description: Pack quantity now on the subscription.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoiceMinutePacks'
        '400':
          description: packs outside 0 to 100
        '402':
          description: HTTP 402 plan_limit_exceeded when a Starter or Pro subscription is required. HTTP 402 subscription_not_current when the subscription is past_due, unpaid, or incomplete. HTTP 402 addon_payment_failed when the invoice is not paid.
        '403':
          description: workspace_billing_forbidden or permission_denied
        '404':
          description: not_found when voice or voice billing is off
        '409':
          description: HTTP 409 addon_below_usage when packs would drop below minutes already used.
        '503':
          description: voice_billing_failed or stripe_price_missing
    servers:
    - url: https://cooperemail.com
      description: This deployment
  /api/v1/billing/addons:
    post:
      operationId: setUsageAddons
      tags:
      - Billing
      summary: Set extra inbox, domain, and email quantities on the subscription
      description: Requires billing_write on the parent account. A sub-account key is HTTP 403 workspace_billing_forbidden. Starter or Pro with a Stripe subscription is required (HTTP 402 plan_limit_exceeded otherwise). Free cannot buy these. inboxes, domains, and email_packs are optional integers from 0 to 100, and at least one is required. Each field replaces the previous quantity. One inbox is $1/month (cooper_overage_inbox_monthly). One custom domain is $1/month (cooper_overage_domain_monthly). One email pack is $1/month and adds 1,000 emails (cooper_overage_sends_1000_monthly). npm run stripe:setup creates those prices. An increase is invoiced immediately, and the cap rises only after Stripe confirms payment. A decrease is not credited. A quantity below live usage returns HTTP 409 addon_below_usage. Email packs already used stay locked until the Stripe period ends. Grandfathered accounts return HTTP 402 plan_limit_exceeded and are not charged. A past_due, unpaid, or incomplete subscription returns HTTP 402 subscription_not_current. A declined invoice is HTTP 402 addon_payment_failed and the quantity is not saved. The response is the new quantities and limits, not a Checkout URL. The customer portal does not change these quantities.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                inboxes:
                  type: integer
                  minimum: 0
                  maximum: 100
                domains:
                  type: integer
                  minimum: 0
                  maximum: 100
                email_packs:
                  type: integer
                  minimum: 0
                  maximum: 100
      responses:
        '200':
          description: Quantities now on the subscription, and the limits those quantities produce.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageAddons'
        '400':
          description: A quantity outside 0 to 100, or no field set
        '402':
          description: HTTP 402 plan_limit_exceeded when a Starter or Pro subscription is required. HTTP 402 subscription_not_current when the subscription is past_due, unpaid, or incomplete. HTTP 402 addon_payment_failed when the invoice is not paid.
        '403':
          description: workspace_billing_forbidden or permission_denied
        '409':
          description: HTTP 409 addon_below_usage when a quantity would drop below live usage.
        '503':
          description: stripe_not_configured, stripe_price_missing, or usage_addon_failed
    servers:
    - url: https://cooperemail.com
      description: This deployment
  /api/v1/billing:
    get:
      tags:
      - Billing
      summary: Plan, usage, limits, and upgrade path.
      operationId: get_api_v1_billing
      responses:
        '200':
          description: Success.
        '400':
          description: Client error. The JSON body uses error.code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    servers:
    - url: https://cooperemail.com
      description: This deployment
  /api/v1/billing/checkout:
    post:
      tags:
      - Billing
      summary: Create a Stripe Checkout session and return its URL.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                plan:
                  enum:
                  - starter
                  - pro
                success_url:
                  type: string
                cancel_url:
                  type: string
                client_id:
                  type: string
                email:
                  type: string
              required:
              - plan
      operationId: post_api_v1_billing_checkout
      responses:
        '200':
          description: Success.
        '400':
          description: Client error. The JSON body uses error.code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    servers:
    - url: https://cooperemail.com
      description: This deployment
  /api/v1/billing/portal:
    post:
      tags:
      - Billing
      summary: Create a Stripe customer portal session and return its URL
      operationId: post_api_v1_billing_portal
      responses:
        '200':
          description: Success.
        '400':
          description: Client error. The JSON body uses error.code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    servers:
    - url: https://cooperemail.com
      description: This deployment
components:
  schemas:
    McpMessageReceivedCallback:
      type: object
      description: Body Cooper POSTs to an MCP event callback for message.received. Metadata only. The subject, body, attachments, and headers are not included.
      properties:
        eventId:
          type: string
          description: Matches the webhook-id header. Stable across retries.
        name:
          const: message.received
        timestamp:
          type: string
          description: ISO 8601.
        cursor:
          type: 'null'
        data:
          type: object
          properties:
            inbox_id:
              type: string
            inbox:
              type: string
              description: Inbox address.
            message_id:
              type: string
            thread_id:
              type: string
            timestamp:
              type: string
              description: ISO 8601 time the message was stored.
            from:
              type: string
            to:
              type: array
              items:
                type: string
            cc:
              type: array
              items:
                type: string
            labels:
              type: array
              items:
                type: string
            channel:
              type: string
              enum:
              - email
              - sms
              - voicemail
              - voice
              description: 'channel is the channel the message arrived on: email, sms, voicemail, or voice.'
          required:
          - inbox_id
          - inbox
          - message_id
          - thread_id
          - timestamp
          - from
          - to
          - cc
          - labels
          - channel
      required:
      - eventId
      - name
      - timestamp
      - data
      - cursor
    NextSteps:
      type: object
      properties:
        instruction:
          type: string
        docs_url:
          type: string
        recommended:
          type: string
          description: Suggests adding a human owner email. A recommendation, not a requirement.
        snippets:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              title:
                type: string
              url:
                type: string
            required:
            - id
            - title
            - url
      required:
      - instruction
      - docs_url
      - recommended
      - snippets
    SendingStatus:
      type: object
      description: Trailing 7-day send health for this account. Counts match GET /api/v1/metrics/rates with no inbox id. Warning does not block. Paused blocks agent email until the rate recovers.
      properties:
        object:
          type: string
          enum:
          - sending_status
        status:
          type: string
          enum:
          - active
          - warning
          - paused
        reason:
          type:
          - string
          - 'null'
          enum:
          - bounce_rate
          - complaint_rate
          - null
        window_days:
          type: integer
          enum:
          - 7
        sent:
          type: integer
        bounced:
          type: integer
        complained:
          type: integer
        bounce_rate:
          type: number
        complaint_rate:
          type: number
        thresholds:
          type: object
          properties:
            min_sent:
              type: integer
            warning_bounce_rate:
              type: number
            warning_complaint_rate:
              type: number
            pause_bounce_rate:
              type: number
            pause_min_bounced:
              type: integer
            pause_complaint_rate:
              type: number
            pause_min_complained:
              type: integer
          required:
          - min_sent
          - warning_bounce_rate
          - warning_complaint_rate
          - pause_bounce_rate
          - pause_min_bounced
          - pause_complaint_rate
          - pause_min_complained
        paused_at:
          type:
          - string
          - 'null'
          format: date-time
        evaluated_at:
          type: string
          format: date-time
        resumes:
          type: string
      required:
      - object
      - status
      - reason
      - window_days
      - sent
      - bounced
      - complained
      - bounce_rate
      - complaint_rate
      - thresholds
      - paused_at
      - evaluated_at
      - resumes
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            code:
              type: string
            message:
              type: string
            param:
              type: string
            retry_after_seconds:
              type: integer
              description: On HTTP 429, and on HTTP 503 when a retry time is known. The same integer as the Retry-After header. Omitted when that header is absent.
            resets_at:
              type: string
              format: date-time
              description: UTC time when the caller may retry, now plus retry_after_seconds. Omitted together with that field when no retry time is known.
            docs_url:
              type: string
            sending:
              $ref: '#/components/schemas/SendingStatus'
              description: Present on HTTP 403 sending_paused. Same object as GET /api/v1/sending-status.
          required:
          - type
          - code
          - message
        related_schemas:
          description: Not returned on the wire. Points at component schemas that the operation descriptions name.
          type: object
          properties:
            McpMessageReceivedCallback:
              $ref: '#/components/schemas/McpMessageReceivedCallback'
            NextSteps:
              $ref: '#/components/schemas/NextSteps'
            Inbox:
              $ref: '#/components/schemas/Inbox'
            Thread:
              $ref: '#/components/schemas/Thread'
            ListEntry:
              $ref: '#/components/schemas/ListEntry'
    SmsSegmentPacks:
      type: object
      properties:
        object:
          const: sms_segment_packs
        packs:
          type: integer
        previous_packs:
          type: integer
        segments_per_pack:
          type: integer
        extra_segments:
          type: integer
        monthly_cents:
          type: integer
        lookup_key:
          const: cooper_sms_500_monthly
      required:
      - object
      - packs
      - previous_packs
      - segments_per_pack
      - extra_segments
      - monthly_cents
      - lookup_key
    Thread:
      type: object
      properties:
        object:
          const: thread
        id:
          type: string
          description: Thread id (thr_…).
        inbox_id:
          type: string
        subject:
          type: string
          description: Subject of the earliest message.
        preview:
          type: string
          description: Preview of the latest message.
        senders:
          type: array
          items:
            type: string
          description: Distinct From values.
        recipients:
          type: array
          items:
            type: string
          description: Distinct To and Cc values.
        message_count:
          type: integer
        last_message_id:
          type: string
        labels:
          type: array
          items:
            type: string
          description: Union of message labels.
        attachment_count:
          type: integer
        received_at:
          type:
          - string
          - 'null'
          format: date-time
        sent_at:
          type:
          - string
          - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        folder:
          type: string
          enum:
          - inbox
          - archive
          - spam
          - trash
          description: inbox when no folder row exists. archive, spam, or trash otherwise.
        purge_after:
          type:
          - string
          - 'null'
          format: date-time
          description: Set only while the thread is in trash. The daily cron hard-deletes the thread after this time.
        assignment:
          description: Null when the thread has no assignment.
          oneOf:
          - $ref: '#/components/schemas/ThreadAssignment'
          - type: 'null'
      required:
      - object
      - id
      - inbox_id
      - subject
      - message_count
      - updated_at
    VoiceMinutePacks:
      type: object
      properties:
        object:
          const: voice_minute_packs
        packs:
          type: integer
        previous_packs:
          type: integer
        minutes_per_pack:
          type: integer
        extra_minutes:
          type: integer
        monthly_cents:
          type: integer
        lookup_key:
          const: cooper_voice_250_monthly
      required:
      - object
      - packs
      - previous_packs
      - minutes_per_pack
      - extra_minutes
      - monthly_cents
      - lookup_key
    ListEntry:
      type: object
      properties:
        object:
          type: string
          enum:
          - list_entry
        direction:
          type: string
          enum:
          - send
          - receive
          - reply
        type:
          type: string
          enum:
          - allow
          - block
        entry:
          type: string
          description: Lowercase email address or domain.
        entry_type:
          type: string
          enum:
          - email
          - domain
        inbox_id:
          type:
          - string
          - 'null'
          description: Null when the entry is account-wide.
        reason:
          type:
          - string
          - 'null'
        created_at:
          type: string
          format: date-time
      required:
      - object
      - direction
      - type
      - entry
      - entry_type
      - created_at
    UsageAddons:
      type: object
      properties:
        object:
          const: usage_addons
        inboxes:
          type: integer
        domains:
          type: integer
        email_packs:
          type: integer
        previous:
          type: object
          properties:
            inboxes:
              type: integer
            domains:
              type: integer
            email_packs:
              type: integer
          required:
          - inboxes
          - domains
          - email_packs
        extra_emails:
          type: integer
        monthly_cents:
          type: integer
        lookup_keys:
          type: object
          properties:
            inboxes:
              const: cooper_overage_inbox_monthly
            domains:
              const: cooper_overage_domain_monthly
            email_packs:
              const: cooper_overage_sends_1000_monthly
          required:
          - inboxes
          - domains
          - email_packs
        limits:
          type: object
          properties:
            inboxes:
              type: integer
            emails_per_month:
              type: integer
            custom_domains:
              type: integer
          required:
          - inboxes
          - emails_per_month
          - custom_domains
      required:
      - object
      - inboxes
      - domains
      - email_packs
      - previous
      - extra_emails
      - monthly_cents
      - lookup_keys
      - limits
    Inbox:
      type: object
      properties:
        id:
          type: string
        username:
          type: string
        email:
          type: string
        display_name:
          type:
          - string
          - 'null'
        created_at:
          type: string
          format: date-time
        require_sender_auth:
          type: boolean
          description: Default true. A verified owner or allowlisted sender creates a task only when DMARC=pass or DKIM=pass aligns with the From domain. Set false to opt this inbox out.
        labels:
          type: array
          items:
            type: string
          description: Labels set at create time. Filter with GET /api/v1/inboxes?label=
        expires_at:
          type:
          - string
          - 'null'
          format: date-time
          description: When set, the inbox is temporary. The daily cron deletes it at this time and it stops counting toward the inbox limit.
        status:
          type: string
          enum:
          - active
          - paused
          description: active sends and stores inbound mail. paused keeps the address and history. A paused inbox still counts toward the plan inbox limit.
        paused_at:
          type:
          - string
          - 'null'
          format: date-time
          description: When the inbox was paused. Null while active. Unchanged if you pause an inbox that is already paused.
        metadata:
          type: object
          additionalProperties: true
          description: Caller data. At most 256 keys. Each key is at most 256 characters. Values are a string, number, or boolean. The JSON form is at most 16 KB. A null value in a PATCH removes that key. Anything else is 400 invalid_metadata.
        client_id:
          type:
          - string
          - 'null'
          description: Idempotency key from POST /api/v1/inboxes, or null. The same client_id on this account returns the original inbox.
        screening:
          type: string
          enum:
          - 'off'
          - observe
          - hold
          description: Inbound prompt-injection screen. Default observe. off skips scoring and records why. observe adds the suspicious label. hold stores suspicious mail with the held label and fires message.held instead of message.received. The screen is a heuristic, not a guarantee. It does not drop mail.
        send_mode:
          type: string
          enum:
          - direct
          - approval
          description: direct sends immediately. approval turns POST /messages, reply, reply-all, and forward into a pending draft and emails verified owners Approve and Reject links. Leaving approval for direct waits for a verified owner. Default direct.
        signature:
          type:
          - object
          - 'null'
          description: Inbox signature applied to later sends, or null when unset. text is plain text. html is null when only text is set.
          properties:
            text:
              type: string
              description: Plain-text signature. At most 2000 characters.
            html:
              type:
              - string
              - 'null'
              description: 'HTML signature, or null. At most 10000 characters. Script tags, on* handlers, and javascript: URLs are removed.'
          required:
          - text
        idempotent:
          type: boolean
          description: True when POST /api/v1/inboxes replayed an existing client_id and returned the original inbox.
    ThreadAssignment:
      type: object
      properties:
        object:
          const: thread_assignment
        inbox_id:
          type: string
        thread_id:
          type: string
        assignee:
          type: string
          description: '1–64 characters: letters, digits, and . _ @ + : -.'
        note:
          type:
          - string
          - 'null'
          description: At most 500 characters.
        claimed_until:
          type:
          - string
          - 'null'
          format: date-time
          description: Null on a plain assignment. An exclusive claim is active while this is in the future.
        claim_active:
          type: boolean
        assigned_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
      - object
      - inbox_id
      - thread_id
      - assignee
      - claim_active
      - assigned_at
      - updated_at
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
x-refined-from:
- cooperemail-com-openapi.json
- cooperemail-com-openapi.yml