---
agentTools:
  projectIndex: https://mailivery.readme.io/llms.txt
---

# Get Wallet / Credits Info

Return the current credit balance and usage statistics for inbox-placement testing.

Credits are split into two distinct pools:
* **Monthly pool**: Recurring credits granted from active subscription plans (`monthly_balance` / `monthly_allotment`). Resets to allotment each billing month with no rollover.
* **Pay-as-you-go pool**: Credits purchased outright as packs or migrated (`payg_balance`). Never expires.

When running inbox placement tests, credits drain from monthly pools first (ordered by soonest expiry) before consuming non-expiring pay-as-you-go credits.

> **Note — usage vs. balances.** `used_this_month` reflects total debits across **both** pools during the current **UTC calendar month**, whereas `monthly_balance` and `monthly_allotment` track the **active billing cycle**, which resets at `next_reset_at`. Do not combine these figures for balance arithmetic mid-cycle.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Mailivery API",
    "description": "Welcome to the Mailivery API – the programmatic way to connect mailboxes, automate warm-up, and monitor deliverability from inside your own product or scripts.\n\n> **Terminology note — mailbox vs. campaign.** In the Mailivery dashboard, a connected sending account is called a **mailbox**. In the API, the same entity is modeled as a **campaign** — that's why request paths use `/campaigns/...`, identifiers are named `campaignId` / `campaign_id`, and the response schema is `Campaign`. Throughout this reference, when an endpoint description says \"mailbox,\" it refers to the same underlying record as `campaignId` in the URL or payload. No data difference — just two names for one thing.\n\n## Getting Started\n\nTo start integrating Mailivery into your application, follow these steps:\n\n### 1\\. **Sign Up for API Access**\n\nConnect with Our Product team and get Your API Keys.\n\n### 2\\. **API Documentation**\n\nRefer to our comprehensive API documentation for detailed information on endpoints, request and response formats, and authentication mechanisms. The documentation provides clear guidance on implementing Mailivery's API in your application.\n\n### 3\\. **Explore Code Samples**\n\nAccelerate your integration process by exploring our collection of code samples. These samples cover common use cases and showcase best practices for integrating Mailivery's API seamlessly.\n\n### 4\\. **Support and Resources**\n\nIf you encounter any challenges or have questions during the integration process, our dedicated support team is here to assist you.\n\n## Conclusion\n\nUnlock the full potential of Mailivery's email warm-up tool with our API. By seamlessly integrating our solution into your applications, you improve email deliverability and establish a robust sender reputation that stands the test of SPAM algorithms. Get started today and elevate your email marketing success with Mailivery.",
    "version": "1.1.0",
    "contact": {
      "name": "Suraj Jadhav",
      "email": "suraj@sourceitmarketing.com",
      "url": "https://mailivery.io"
    },
    "termsOfService": "https://mailivery.io",
    "license": {
      "name": "Custom License",
      "url": "https://mailivery.io"
    }
  },
  "servers": [
    {
      "url": "https://app.mailivery.io/api/v1",
      "description": "Production / Live server"
    },
    {
      "url": "https://app-staging.mailivery.io/api/v1",
      "description": "Staging / Testing server"
    }
  ],
  "paths": {
    "/inbox-placement-tests/wallet": {
      "get": {
        "tags": [
          "IPT - Resources"
        ],
        "summary": "Get Wallet / Credits Info",
        "description": "Return the current credit balance and usage statistics for inbox-placement testing.\n\nCredits are split into two distinct pools:\n* **Monthly pool**: Recurring credits granted from active subscription plans (`monthly_balance` / `monthly_allotment`). Resets to allotment each billing month with no rollover.\n* **Pay-as-you-go pool**: Credits purchased outright as packs or migrated (`payg_balance`). Never expires.\n\nWhen running inbox placement tests, credits drain from monthly pools first (ordered by soonest expiry) before consuming non-expiring pay-as-you-go credits.\n\n> **Note — usage vs. balances.** `used_this_month` reflects total debits across **both** pools during the current **UTC calendar month**, whereas `monthly_balance` and `monthly_allotment` track the **active billing cycle**, which resets at `next_reset_at`. Do not combine these figures for balance arithmetic mid-cycle.",
        "operationId": "getWallet",
        "parameters": [
          {
            "$ref": "#/components/parameters/X-Request-ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Wallet information.",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/IPTXRequestID"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/IPTSuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "code": {
                          "example": "IPT_WALLET_FETCHED"
                        },
                        "message": {
                          "example": "Wallet information retrieved successfully"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Wallet"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "success": true,
                  "status": 200,
                  "code": "IPT_WALLET_FETCHED",
                  "message": "Wallet information retrieved successfully",
                  "data": {
                    "available_credits": 45,
                    "used_this_month": 12,
                    "total_allocation": 50,
                    "monthly_balance": 35,
                    "monthly_allotment": 40,
                    "payg_balance": 10,
                    "next_reset_at": "2026-09-27T00:00:00+00:00"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/IPTUnauthorized"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "responses": {
      "IPTUnauthorized": {
        "description": "Authentication required or token invalid.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/IPTErrorEnvelope"
            },
            "example": {
              "success": false,
              "status": 401,
              "code": "UNAUTHENTICATED",
              "message": "Unauthenticated."
            }
          }
        }
      }
    },
    "schemas": {
      "IPTSuccessEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "status": {
            "type": "integer",
            "example": 200
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "IPTErrorEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": false
          },
          "status": {
            "type": "integer"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      },
      "Wallet": {
        "type": "object",
        "description": "Credit balance and pool breakdown for inbox placement testing.",
        "properties": {
          "available_credits": {
            "type": "integer",
            "description": "Total available credits across both monthly subscription and pay-as-you-go pools (`monthly_balance + payg_balance`).",
            "example": 45
          },
          "used_this_month": {
            "type": "integer",
            "description": "Total credits debited across **both** the monthly and pay-as-you-go pools during the current **UTC calendar month**. This is a usage counter on a different clock from `monthly_balance`, which tracks the active billing cycle, so the two cannot be assumed to agree at any point in the cycle — they may coincide, but not reliably.",
            "example": 12
          },
          "total_allocation": {
            "type": "integer",
            "description": "Total credit allocation (`monthly_allotment + payg_balance`).",
            "example": 50
          },
          "monthly_balance": {
            "type": "integer",
            "description": "Remaining credits in the recurring monthly subscription pool (resets each billing cycle).",
            "example": 35
          },
          "monthly_allotment": {
            "type": "integer",
            "description": "Total monthly credits granted per billing cycle from active subscriptions.",
            "example": 40
          },
          "payg_balance": {
            "type": "integer",
            "description": "Non-expiring pay-as-you-go credit balance from one-time pack purchases or migrations.",
            "example": 10
          },
          "next_reset_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "UTC ISO 8601 timestamp when the earliest active monthly pool will reset to its allotment, or null if no active subscription exists.\n\nEach subscription resets on its own billing anchor day rather than a shared calendar boundary, so this date differs from team to team — an anchor day of 1 resets on the 1st, an anchor day of 27 on the 27th. Where the anchor day exceeds the number of days in the target month, the reset falls on the last day of that month instead (an anchor day of 31 resets on 30 September). Read this field rather than deriving the next reset from the current date.",
            "example": "2026-09-27T00:00:00+00:00"
          }
        }
      }
    },
    "parameters": {
      "X-Request-ID": {
        "name": "X-Request-ID",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "example": "43873599-9e19-42e6-9a5b-b2bc0a264a28"
        },
        "description": "Any unique string, timestamp, or UUID for logging."
      }
    },
    "headers": {
      "IPTXRequestID": {
        "description": "Echoed request identifier.",
        "schema": {
          "type": "string"
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "IPT - Resources",
      "description": "Wallet and credit balance information."
    }
  ],
  "x-tagGroups": [
    {
      "name": "Getting Started",
      "tags": [
        "Mailivery API Introduction"
      ]
    },
    {
      "name": "Connecting Mailboxes",
      "tags": [
        "Connecting Mailboxes"
      ]
    },
    {
      "name": "Bulk Import",
      "tags": [
        "Bulk Import"
      ]
    },
    {
      "name": "Warm-Up Controls",
      "tags": [
        "Warm-Up Controls"
      ]
    },
    {
      "name": "Managing Mailboxes",
      "tags": [
        "Managing Mailboxes"
      ]
    },
    {
      "name": "Metrics & Health",
      "tags": [
        "Metrics & Health"
      ]
    },
    {
      "name": "Custom Warm-Up Templates",
      "tags": [
        "Custom Warm-Up Templates"
      ]
    },
    {
      "name": "Yahoo Deliverability Filter",
      "tags": [
        "Yahoo Deliverability Filter"
      ]
    },
    {
      "name": "Warm-Up Audience",
      "tags": [
        "Warm-Up Audience"
      ]
    },
    {
      "name": "Object Structures",
      "tags": [
        "Object Structures"
      ]
    },
    {
      "name": "Webhooks",
      "tags": [
        "Webhooks"
      ]
    },
    {
      "name": "Connection Recheck",
      "tags": [
        "Connection Health"
      ]
    },
    {
      "name": "Inbox Placement Test (Beta)",
      "tags": [
        "IPT - Tests",
        "IPT - Results",
        "IPT - Schedule",
        "IPT - Resources"
      ]
    },
    {
      "name": "Blacklist Monitoring",
      "tags": [
        "Blacklist Monitoring"
      ]
    },
    {
      "name": "Email Verification",
      "tags": [
        "Email Verification"
      ]
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 106,
      "1": 206,
      "2": 145,
      "3": 36,
      "4": 58,
      "5": 253,
      "6": 8,
      "7": 42,
      "8": 44,
      "9": 142,
      "10": 191,
      "11": 142
    }
  }
}
```