# Monk API ## Docs - [Archive Meter](https://docs.monk.com/api-reference/archive-meter.md): Archive (soft-delete) a meter. - [Batch Create Events](https://docs.monk.com/api-reference/batch-create-events.md): Create multiple usage events in a single request. - [Cancel Contract](https://docs.monk.com/api-reference/cancel-contract.md): Cancel a subscription at the end of the current billing period. - [Change Plan](https://docs.monk.com/api-reference/change-plan.md): Schedule a plan change for an existing contract. - [Create Contract](https://docs.monk.com/api-reference/create-contract.md): Create a contract (subscription) from a plan for a customer. - [Create Credit Budget](https://docs.monk.com/api-reference/create-credit-budget.md): Add a new credit budget to a contract. - [Create Customer](https://docs.monk.com/api-reference/create-customer.md): Create a new customer. - [Create Event](https://docs.monk.com/api-reference/create-event.md): Create a single usage event for metered billing. - [Create Meter](https://docs.monk.com/api-reference/create-meter.md): Create a meter for tracking usage. - [Create Plan](https://docs.monk.com/api-reference/create-plan.md): Create a plan that bundles pricing configurations. - [Create Pricing](https://docs.monk.com/api-reference/create-pricing.md): Create a pricing configuration, optionally creating a new product. - [Credit Usage Statement](https://docs.monk.com/api-reference/credit-usage-statement.md): Get a credit usage statement (PDF or JSON) showing credit consumption for an invoice. - [Delete Credit Budget](https://docs.monk.com/api-reference/delete-credit-budget.md): Remove a budget from the contract. - [Estimate Event Pricing](https://docs.monk.com/api-reference/estimate-event-pricing.md): Estimate costs for a batch of events in real-time. This is a **stateless** pricing API — you send events directly, and we return estimated costs based on your org-level rate cards. - [Get Budget Usage](https://docs.monk.com/api-reference/get-budget-usage.md): Get real-time consumption for all budgets. Queries ClickHouse — use sparingly. - [Get Contract](https://docs.monk.com/api-reference/get-contract.md): Retrieve a single contract by ID. - [Get Credit Balance and Blocks](https://docs.monk.com/api-reference/get-credit-balance-and-blocks.md): Get the current credit balance and credit blocks (grants) with FIFO deduction priority. - [Get Credit Ledger](https://docs.monk.com/api-reference/get-credit-ledger.md): Get all credit ledger entries for a contract. - [Get Customer](https://docs.monk.com/api-reference/get-customer.md): Retrieve a customer by ID. - [Get Invoice](https://docs.monk.com/api-reference/get-invoice.md): Retrieve a single invoice by ID. - [Get Meter](https://docs.monk.com/api-reference/get-meter.md): Retrieve a meter by ID. - [Get Plan](https://docs.monk.com/api-reference/get-plan.md): Retrieve a plan by ID. - [Get Pricing](https://docs.monk.com/api-reference/get-pricing.md): Retrieve a pricing configuration by ID. - [Get Upcoming Invoice](https://docs.monk.com/api-reference/get-upcoming-invoice.md): Preview the next upcoming invoice with live usage charges. - [Get Usage Cost](https://docs.monk.com/api-reference/get-usage-cost.md): Calculate the actual cost of usage events stored in your account. Unlike the [pricing estimate](/api-reference/pricing/estimate-event-pricing) endpoint (which prices synthetic events you send), this endpoint queries your **real events** from the database and returns accurate costs. - [Grant Promotional Credits](https://docs.monk.com/api-reference/grant-promotional-credits.md): Grant promotional credits to a contract's credit wallet. - [List Contracts](https://docs.monk.com/api-reference/list-contracts.md): Paginated list of contracts with optional filters. - [List Credit Budgets](https://docs.monk.com/api-reference/list-credit-budgets.md): List all configured credit budgets for a contract. Cheap — reads from database only. - [List Customers](https://docs.monk.com/api-reference/list-customers.md): Paginated list of customers. - [List Events](https://docs.monk.com/api-reference/list-events.md): Retrieve a paginated list of events with optional filters. - [List Invoices](https://docs.monk.com/api-reference/list-invoices.md): Paginated list of invoices with optional filters. - [List Meters](https://docs.monk.com/api-reference/list-meters.md): Retrieve all meters. - [List Plans](https://docs.monk.com/api-reference/list-plans.md): Retrieve all plans. - [List Pricing](https://docs.monk.com/api-reference/list-pricing.md): Retrieve all pricing configurations. - [Update Contract Metadata](https://docs.monk.com/api-reference/update-contract-metadata.md): Update user-defined metadata on a contract. - [Update Credit Budget](https://docs.monk.com/api-reference/update-credit-budget.md): Update fields on an existing budget. Partial update. - [Update Customer](https://docs.monk.com/api-reference/update-customer.md): Update a customer. At least one field required. - [Webhook Events](https://docs.monk.com/api-reference/webhooks/events.md): Available webhook events and their payload structures - [Signature Verification](https://docs.monk.com/api-reference/webhooks/verification.md): Verify webhook signatures to ensure requests are from Monk - [Authentication](https://docs.monk.com/authentication.md): Learn how to authenticate with the Monk API - [Contracts](https://docs.monk.com/concepts/contracts.md): Assign plans to customers and manage subscriptions - [Prepaid Credits](https://docs.monk.com/concepts/credits.md): Apply prepaid credits to offset usage-based charges - [Dimensional Pricing](https://docs.monk.com/concepts/dimensional-pricing.md): Charge different rates based on event attributes like region, tier, or call type - [Events](https://docs.monk.com/concepts/events.md): Understanding event ingestion for usage-based billing - [Meters](https://docs.monk.com/concepts/meters.md): Aggregate events into billable usage with meters - [Plans](https://docs.monk.com/concepts/plans.md): Bundle pricing into sellable subscription plans - [Pricing](https://docs.monk.com/concepts/pricing.md): Define how usage is charged with pricing models - [Webhooks](https://docs.monk.com/concepts/webhooks.md): Receive real-time notifications when events occur in your Monk account - [Setting up Auto-Pay](https://docs.monk.com/guides/auto-pay.md): Configure automatic payment collection via Stripe for your customers - [Billing for AI Products](https://docs.monk.com/guides/billing-for-ai.md): End-to-end guide for AI/ML billing with dimensional pricing - [Billing for SaaS Products](https://docs.monk.com/guides/billing-for-saas.md): End-to-end guide for setting up subscription and usage-based billing - [Bulk Event Ingestion](https://docs.monk.com/guides/bulk-event-ingestion.md): Sync events from your database or warehouse to Monk at scale - [Credit Budgets](https://docs.monk.com/guides/credit-budgets.md): Set per-dimension spending caps on shared credit pools - [Set Up Dimensional Pricing](https://docs.monk.com/guides/dimensional-pricing.md): Step-by-step guide to billing different rates based on event attributes - [Enterprise Billing Patterns](https://docs.monk.com/guides/enterprise-billing.md): Handle custom pricing, volume commitments, and per-customer rates without creating new plans - [Create your first Contract](https://docs.monk.com/guides/first-contract.md): Step-by-step guide to subscribing a customer to a plan - [Grant your first Credit](https://docs.monk.com/guides/first-credit.md): Step-by-step guide to setting up prepaid credits when creating a contract - [Send your first Event](https://docs.monk.com/guides/first-event.md): Step-by-step guide to sending usage events to Monk - [Create your first Meter](https://docs.monk.com/guides/first-meter.md): Step-by-step guide to creating a meter in Monk - [Create your first Plan](https://docs.monk.com/guides/first-plan.md): Step-by-step guide to creating a pricing plan in Monk - [How Usage-Based Billing Works](https://docs.monk.com/guides/how-usage-based-billing-works.md): Understand how meters, pricing, plans, contracts, and credits fit together for usage-based billing - [Self-Serve vs Enterprise Workflows](https://docs.monk.com/guides/plg-vs-slg.md): How to use Monk for self-serve and enterprise billing motions - [Set up Prepaid Credits](https://docs.monk.com/guides/prepaid-credits.md): End-to-end guide to implementing prepaid credits for usage-based billing - [Promotional Credits](https://docs.monk.com/guides/promotional-credits.md): Set up sign-up bonuses, referral rewards, and promotional campaigns with credits - [Testing Your Integration](https://docs.monk.com/guides/testing-your-integration.md): Verify your billing integration works correctly before going live - [Introduction](https://docs.monk.com/introduction.md): Welcome to the Monk API documentation - [SDKs](https://docs.monk.com/sdks/overview.md): Official client libraries for the Monk API - [Configuration](https://docs.monk.com/sdks/rust/configuration.md): Customize retries, buffering, timeouts, and backpressure in the Rust SDK - [Error Handling](https://docs.monk.com/sdks/rust/error-handling.md): Handle errors gracefully with typed error variants in the Rust SDK - [Ingesting Events](https://docs.monk.com/sdks/rust/ingesting-events.md): Send usage events to Monk with the Rust SDK - [Rust SDK](https://docs.monk.com/sdks/rust/overview.md): Production-grade Rust client for the Monk Events API - [Querying Data](https://docs.monk.com/sdks/rust/querying.md): List events, query usage, and check service health with the Rust SDK - [Overview](https://docs.monk.com/usage-based-pricing.md): Bill customers based on their actual usage with metered billing ## OpenAPI Specs - [contracts](https://docs.monk.com/openapi/contracts.yaml) - [events](https://docs.monk.com/openapi/events.yaml) - [usage](https://docs.monk.com/openapi/usage.yaml) - [customers](https://docs.monk.com/openapi/customers.yaml) - [pricing](https://docs.monk.com/openapi/pricing.yaml) - [meters](https://docs.monk.com/openapi/meters.yaml) - [plans](https://docs.monk.com/openapi/plans.yaml) - [invoices](https://docs.monk.com/openapi/invoices.yaml) - [openapi](https://docs.monk.com/api-reference/openapi.json)