# Stigg: API Reference REST > Stigg is a subscription and entitlement management platform for SaaS companies. Model pricing with plans, add-ons, credits, and usage-based billing; provision customers and subscriptions; enforce feature access; render pricing tables, paywalls, and customer portals; and integrate with Stripe, Zuora, HubSpot, Salesforce, and AWS Marketplace. Available as backend SDKs (Node.js, Python, Ruby, Go, Java, .NET), frontend SDKs (React, Vue, Next.js), GraphQL API, and REST API. ## REST ### Get started - [Introduction](https://docs.stigg.io/api-and-sdks/api-reference/rest/introduction.md): Complete guide to the Stigg REST API including authentication, common patterns, rate limits, and error handling ### Essentials - [Authentication](https://docs.stigg.io/api-and-sdks/api-reference/rest/authentication.md): Authenticate REST API requests with Stigg API keys - [Pagination](https://docs.stigg.io/api-and-sdks/api-reference/rest/pagination.md): Cursor-based pagination and filtering for REST list endpoints - [Responses](https://docs.stigg.io/api-and-sdks/api-reference/rest/responses.md): Response and error formats for the Stigg REST API - [Rate Limits](https://docs.stigg.io/api-and-sdks/integration/rest/rate-limits.md) - [Access enforcement at scale](https://docs.stigg.io/api-and-sdks/api-reference/rest/using-at-scale.md): How to handle high-volume entitlement checks without adding latency or REST API overhead ### SDK reference - [Backend](https://docs.stigg.io/api-and-sdks/references/sdk/backend/rest/index.md) - [Agent SDK](https://docs.stigg.io/api-and-sdks/references/sdk/backend/rest/agent-sdk.md): Constructor, methods, context fields and return types of the Stigg Agent SDK. #### Frontend - [JavaScript SDK](https://docs.stigg.io/api-and-sdks/references/sdk/frontend/javascript-rest.md) - [React SDK](https://docs.stigg.io/api-and-sdks/references/sdk/frontend/react-rest.md) - [Vue.js SDK](https://docs.stigg.io/api-and-sdks/references/sdk/frontend/vue-rest.md) - [Embed SDK](https://docs.stigg.io/api-and-sdks/references/sdk/frontend/embed-rest.md) ### CLI reference - [CLI reference](https://docs.stigg.io/api-and-sdks/cli-reference.md) ### SDK documentation #### Frontend - [JavaScript](https://docs.stigg.io/api-and-sdks/integration/frontend/javascript.md) - [React](https://docs.stigg.io/api-and-sdks/integration/frontend/react.md) - [Vue.js](https://docs.stigg.io/api-and-sdks/integration/frontend/vuejs.md) - [Next.js](https://docs.stigg.io/api-and-sdks/integration/frontend/nextjs.md) - [Webflow, Wordpress and plain HTML SDK](https://docs.stigg.io/api-and-sdks/integration/frontend/html.md) - [Hardening client-side access](https://docs.stigg.io/api-and-sdks/integration/frontend/hardening-client-side-access.md) ### Subscriptions - [Get a single subscription by ID](https://docs.stigg.io/api-reference/subscriptions/get-a-single-subscription-by-id.md): Retrieves a subscription by its unique identifier, including plan details, billing period, status, and add-ons. - [Update a subscription](https://docs.stigg.io/api-reference/subscriptions/update-a-subscription.md): Updates an active subscription's properties including billing period, add-ons, unit quantities, and discounts. This is a partial update — only the fields present in the request body change. Object fields such as `metadata` are replaced wholesale rather than merged, and list fields such as `addons` a… - [Get a list of subscriptions](https://docs.stigg.io/api-reference/subscriptions/get-a-list-of-subscriptions.md): Retrieves a paginated list of subscriptions, with optional filters for customer, status, and plan. - [Provision subscription](https://docs.stigg.io/api-reference/subscriptions/provision-subscription.md): Creates a new subscription for an existing customer. When payment is required and no payment method exists, returns a checkout URL. - [Transfer subscription to resource](https://docs.stigg.io/api-reference/subscriptions/transfer-subscription-to-resource.md): Transfers a subscription to a different resource ID. Used for multi-resource products where subscriptions apply to specific entities like websites or apps. - [Migrate subscription to latest plan version](https://docs.stigg.io/api-reference/subscriptions/migrate-subscription-to-latest-plan-version.md): Migrates a subscription to the latest published version of its plan or add-ons. Handles prorated charges or credits automatically. - [Delegate subscription payment to customer](https://docs.stigg.io/api-reference/subscriptions/delegate-subscription-payment-to-customer.md): Delegates a subscription to a different customer, who becomes responsible for managing it. The original customer remains the paying customer for this subscription, unless payment was already delegated to the target customer, in which case the target customer becomes the paying customer as well. - [Cancel pending payment update](https://docs.stigg.io/api-reference/subscriptions/cancel-pending-payment-update.md): Cancels a subscription update that is pending payment completion. - [Cancel scheduled update](https://docs.stigg.io/api-reference/subscriptions/cancel-scheduled-update.md): Cancels a scheduled subscription update, such as a future downgrade or plan change. - [Preview subscription](https://docs.stigg.io/api-reference/subscriptions/preview-subscription.md): Previews the pricing impact of creating or updating a subscription without making changes. Returns estimated costs, taxes, and proration details. - [Cancel subscription](https://docs.stigg.io/api-reference/subscriptions/cancel-subscription.md): Cancels an active subscription, either immediately or at a specified time such as end of billing period. - [Charge subscription usage](https://docs.stigg.io/api-reference/subscriptions/charge-subscription-usage.md): Immediately charges usage for a subscription via the billing integration. Calculates usage since the last charge and creates an invoice. - [Trigger subscription usage sync](https://docs.stigg.io/api-reference/subscriptions/trigger-subscription-usage-sync.md): Triggers a usage sync for a subscription, reporting current usage to the billing provider. - [Mark subscription invoice as paid](https://docs.stigg.io/api-reference/subscriptions/mark-subscription-invoice-as-paid.md): Marks the latest invoice of a subscription as paid in the billing provider. The invoice must exist and have an OPEN status. ### Bulk Import - [Bulk import subscriptions](https://docs.stigg.io/api-reference/bulk-import/bulk-import-subscriptions.md): Imports multiple subscriptions in bulk. Used for migrating subscription data from external systems. - [Bulk import customers](https://docs.stigg.io/api-reference/bulk-import/bulk-import-customers.md): Imports multiple customers in bulk. Used for migrating customer data from external systems. ### Usage - [Get usage history](https://docs.stigg.io/api-reference/usage/get-usage-history.md): Retrieves historical usage data for a customer's metered feature over time. - [Report usage events](https://docs.stigg.io/api-reference/usage/report-usage-events.md): Reports raw usage events for event-based metering. Events are validated and stored synchronously, then aggregated into usage totals asynchronously. - [Estimate event credit cost](https://docs.stigg.io/api-reference/usage/estimate-event-credit-cost.md): Estimates the credit cost of a usage event without ingesting it. Returns the estimated cost per credit currency, the current balance, and the balance after the estimated consumption. - [Report usage measurements](https://docs.stigg.io/api-reference/usage/report-usage-measurements.md): Reports usage measurements for metered features. The reported usage is used to track, limit, and bill customer consumption. Deprecated: use `POST /api/v2/usage`. - [Estimate usage credit cost](https://docs.stigg.io/api-reference/usage/estimate-usage-credit-cost.md): Estimates the credit cost of a usage report without recording it. Returns the estimated cost per credit currency, the current balance, and the balance after the estimated consumption. - [Report usage measurements (v2)](https://docs.stigg.io/api-reference/usage/report-usage-measurements-v2.md): Reports usage measurements for metered features. The reported usage is used to track, limit, and bill customer consumption. Credit balances are returned once per wallet in `credits`, not on each measurement. ### Coupons - [Get a list of coupons](https://docs.stigg.io/api-reference/coupons/get-a-list-of-coupons.md): Retrieves a paginated list of coupons in the environment. - [Create coupon](https://docs.stigg.io/api-reference/coupons/create-coupon.md): Creates a new discount coupon with percentage or fixed amount off, applicable to customer subscriptions. - [Get a single coupon by ID](https://docs.stigg.io/api-reference/coupons/get-a-single-coupon-by-id.md): Retrieves a coupon by its unique identifier. - [Update a coupon](https://docs.stigg.io/api-reference/coupons/update-a-coupon.md): Updates an existing coupon's properties such as name, description, and metadata. - [Archive coupon](https://docs.stigg.io/api-reference/coupons/archive-coupon.md): Archives a coupon, preventing it from being applied to new subscriptions. ### Products - [Get a list of products](https://docs.stigg.io/api-reference/products/get-a-list-of-products.md): Retrieves a paginated list of products in the environment. - [Create product](https://docs.stigg.io/api-reference/products/create-product.md): Creates a new product. - [Update a product](https://docs.stigg.io/api-reference/products/update-a-product.md): Updates an existing product's properties such as display name, description, and metadata. - [Archive product](https://docs.stigg.io/api-reference/products/archive-product.md): Archives a product, preventing new subscriptions. All plans and addons are archived. - [Unarchive product](https://docs.stigg.io/api-reference/products/unarchive-product.md): Restores an archived product, allowing new subscriptions to be created. - [Duplicate product](https://docs.stigg.io/api-reference/products/duplicate-product.md): Duplicates an existing product, including its plans, addons, and configuration. ### Features - [Get a single feature by ID](https://docs.stigg.io/api-reference/features/get-a-single-feature-by-id.md): Retrieves a feature by its unique identifier. - [Update a feature](https://docs.stigg.io/api-reference/features/update-a-feature.md): Updates an existing feature's properties such as display name, description, and configuration. - [Get a list of features](https://docs.stigg.io/api-reference/features/get-a-list-of-features.md): Retrieves a paginated list of features in the environment. - [Create a feature](https://docs.stigg.io/api-reference/features/create-a-feature.md): Creates a new feature with the specified type, metering, and configuration. - [Archive feature](https://docs.stigg.io/api-reference/features/archive-feature.md): Archives a feature, preventing it from being used in new entitlements. - [Unarchive feature](https://docs.stigg.io/api-reference/features/unarchive-feature.md): Restores an archived feature, allowing it to be used in entitlements again. ### Addons - [Get a list of addons](https://docs.stigg.io/api-reference/addons/get-a-list-of-addons.md): Retrieves a paginated list of addons in the environment. - [Create an addon](https://docs.stigg.io/api-reference/addons/create-an-addon.md): Creates a new addon in draft status, associated with a specific product. - [Get a single addon by ID](https://docs.stigg.io/api-reference/addons/get-a-single-addon-by-id.md): Retrieves an addon by its unique identifier, including entitlements and pricing details. - [Update a addon](https://docs.stigg.io/api-reference/addons/update-a-addon.md): Updates an existing addon's properties such as display name, description, and metadata. - [Archive an addon](https://docs.stigg.io/api-reference/addons/archive-an-addon.md): Archives an addon, preventing it from being used in new subscriptions. - [List addon charges](https://docs.stigg.io/api-reference/addons/list-addon-charges.md): Retrieves the list of charges configured on an addon. - [Create addon draft](https://docs.stigg.io/api-reference/addons/create-addon-draft.md): Creates a draft version of an existing addon for modification before publishing. - [Remove addon draft](https://docs.stigg.io/api-reference/addons/remove-addon-draft.md): Removes a draft version of an addon. - [Publish addon](https://docs.stigg.io/api-reference/addons/publish-addon.md): Publishes a draft addon, making it available for use in subscriptions. The required `migrationType` field controls whether subscriptions already using this addon are moved onto the new version immediately (`ALL_CUSTOMERS`) or stay on the version they were using — grandfathered — until you explicitly… ### Plans - [Get a list of plans](https://docs.stigg.io/api-reference/plans/get-a-list-of-plans.md): Retrieves a paginated list of plans in the environment. - [Create plan](https://docs.stigg.io/api-reference/plans/create-plan.md): Creates a new plan in draft status. - [Get a single plan by ID](https://docs.stigg.io/api-reference/plans/get-a-single-plan-by-id.md): Retrieves a plan by its unique identifier, including entitlements and pricing details. - [Update a plan](https://docs.stigg.io/api-reference/plans/update-a-plan.md): Updates an existing plan's properties such as display name, description, and metadata. - [Archive plan](https://docs.stigg.io/api-reference/plans/archive-plan.md): Archives a plan, preventing it from being used in new subscriptions. - [List plan charges](https://docs.stigg.io/api-reference/plans/list-plan-charges.md): Retrieves the list of charges configured on a plan. - [List plan overage charges](https://docs.stigg.io/api-reference/plans/list-plan-overage-charges.md): Retrieves the list of overage charges configured on a plan. - [Create plan draft](https://docs.stigg.io/api-reference/plans/create-plan-draft.md): Creates a draft version of an existing plan for modification before publishing. - [Remove plan draft](https://docs.stigg.io/api-reference/plans/remove-plan-draft.md): Removes a draft version of a plan. - [Publish plan](https://docs.stigg.io/api-reference/plans/publish-plan.md): Publishes a draft plan, making it available for use in subscriptions. The required `migrationType` field controls whether existing subscribers are moved onto the new version immediately (`ALL_CUSTOMERS`) or stay on the version they subscribed to — grandfathered — until you explicitly migrate them, e… ### Promotional Entitlements - [Get a list of promotional entitlements](https://docs.stigg.io/api-reference/promotional-entitlements/get-a-list-of-promotional-entitlements.md): Retrieves a paginated list of a customer's promotional entitlements. - [Create a promotional entitlements](https://docs.stigg.io/api-reference/promotional-entitlements/create-a-promotional-entitlements.md): Grants promotional entitlements to a customer, providing feature access outside their subscription. Entitlements can be time-limited or permanent. - [Revoke promotional entitlement](https://docs.stigg.io/api-reference/promotional-entitlements/revoke-promotional-entitlement.md): Revokes a previously granted promotional entitlement from a customer for a specific feature. ### Customers - [Get a list of customer resources](https://docs.stigg.io/api-reference/customers/get-a-list-of-customer-resources.md): Retrieves a paginated list of resources within the same customer. - [Get a single customer by ID](https://docs.stigg.io/api-reference/customers/get-a-single-customer-by-id.md): Retrieves a customer by their unique identifier, including billing information and subscription status. - [Update a customer](https://docs.stigg.io/api-reference/customers/update-a-customer.md): Updates an existing customer's properties such as name, email, and billing information. - [Get a list of customers](https://docs.stigg.io/api-reference/customers/get-a-list-of-customers.md): Retrieves a paginated list of customers in the environment. - [Provision customer](https://docs.stigg.io/api-reference/customers/provision-customer.md): Creates a new customer. - [Archive customer](https://docs.stigg.io/api-reference/customers/archive-customer.md): Archives a customer, preventing new subscriptions. Optionally cancels existing subscriptions. - [Unarchive customer](https://docs.stigg.io/api-reference/customers/unarchive-customer.md): Restores an archived customer, allowing them to create new subscriptions again. - [Attach payment method](https://docs.stigg.io/api-reference/customers/attach-payment-method.md): Attaches a payment method to a customer for billing. Required for paid subscriptions when integrated with a billing provider. - [Detach payment method](https://docs.stigg.io/api-reference/customers/detach-payment-method.md): Removes the payment method from a customer. Ensure active paid subscriptions have an alternative payment method. ### Customer Integrations - [Get a list of customer integrations](https://docs.stigg.io/api-reference/customer-integrations/get-a-list-of-customer-integrations.md): Retrieves a paginated list of a customer's external integrations (billing, CRM, etc.). - [Link customer integration](https://docs.stigg.io/api-reference/customer-integrations/link-customer-integration.md): Links a customer to an external integration by specifying the vendor and external entity ID. - [Get a single customer integration by ID](https://docs.stigg.io/api-reference/customer-integrations/get-a-single-customer-integration-by-id.md): Retrieves a specific integration for a customer by integration ID. - [Unlink customer integration](https://docs.stigg.io/api-reference/customer-integrations/unlink-customer-integration.md): Removes the link between a customer and an external integration. - [Update a customer integration](https://docs.stigg.io/api-reference/customer-integrations/update-a-customer-integration.md): Updates a customer's integration link, such as changing the synced external entity ID. ### Data Export - [Add data-export destination](https://docs.stigg.io/api-reference/data-export/add-data-export-destination.md): Register a destination on the environment's DATA_EXPORT integration. Lazy-creates the integration row + provider recipient on first call. Idempotent on destinationId. - [Remove data-export destination](https://docs.stigg.io/api-reference/data-export/remove-data-export-destination.md): Disconnect a destination: stops the provider sync (deletes the provider destination) and removes it from the DATA_EXPORT integration. Non-destructive — the warehouse table is left intact. Idempotent. - [Update data-export destination selection](https://docs.stigg.io/api-reference/data-export/update-data-export-destination-selection.md): Update a destination's entity selection. Pushes the new enabled_models to the provider first, then persists the selection. Applies on the next scheduled transfer. - [Trigger data-export sync](https://docs.stigg.io/api-reference/data-export/trigger-data-export-sync.md): Trigger a sync for one destination or all destinations under the provider entity. - [List data-export models](https://docs.stigg.io/api-reference/data-export/list-data-export-models.md): List the catalog of data-export models the customer can opt into when connecting a destination. ### Entitlements - [Get entitlements state](https://docs.stigg.io/api-reference/entitlements/get-entitlements-state.md): Retrieves the effective entitlements for a customer or resource, including feature and credit entitlements. Each call reaches the Stigg API directly, so latency reflects a network round trip. For entitlement checks on a hot path (e.g. gating a request in real time), the Stigg Node Server SDK (with i… - [Check entitlement](https://docs.stigg.io/api-reference/entitlements/check-entitlement.md): Checks a single entitlement (feature or credit) for a customer or resource. Supports `requestedUsage` and `requestedValues` to evaluate against limits or enum values. Pass `dimensions` to also check the governance budgets of the entities the usage is attributed to; the response then includes `chains… ### Plan Entitlements - [Get a list of plan entitlements](https://docs.stigg.io/api-reference/plan-entitlements/get-a-list-of-plan-entitlements.md): Retrieves a list of entitlements for a plan. - [Create plan entitlements](https://docs.stigg.io/api-reference/plan-entitlements/create-plan-entitlements.md): Creates one or more entitlements (feature or credit) on a draft plan. - [Delete plan entitlement](https://docs.stigg.io/api-reference/plan-entitlements/delete-plan-entitlement.md): Deletes an entitlement from a draft plan. - [Update a plan entitlement](https://docs.stigg.io/api-reference/plan-entitlements/update-a-plan-entitlement.md): Updates an existing entitlement on a draft plan. ### Addon Entitlements - [Get a list of addon entitlements](https://docs.stigg.io/api-reference/addon-entitlements/get-a-list-of-addon-entitlements.md): Retrieves a list of entitlements for an addon. - [Create addon entitlements](https://docs.stigg.io/api-reference/addon-entitlements/create-addon-entitlements.md): Creates one or more entitlements (feature or credit) on a draft addon. - [Delete addon entitlement](https://docs.stigg.io/api-reference/addon-entitlements/delete-addon-entitlement.md): Deletes an entitlement from a draft addon. - [Update a addon entitlement](https://docs.stigg.io/api-reference/addon-entitlements/update-a-addon-entitlement.md): Updates an existing entitlement on a draft addon. ### Credit grants - [Get a list of credit grants](https://docs.stigg.io/api-reference/credit-grants/get-a-list-of-credit-grants.md): Retrieves a paginated list of credit grants for a customer. - [Create a credit grant](https://docs.stigg.io/api-reference/credit-grants/create-a-credit-grant.md): Creates a new credit grant for a customer with specified amount, type, and optional billing configuration. - [Void credit grant](https://docs.stigg.io/api-reference/credit-grants/void-credit-grant.md): Voids an existing credit grant, preventing further consumption of the remaining credits. ### Credit consumption - [Consume credits](https://docs.stigg.io/api-reference/credit-consumption/consume-credits.md): Consumes a specified amount of credits directly from a customer wallet, with no feature mapping. Returns the optimistic balance. - [Consume credits asynchronously](https://docs.stigg.io/api-reference/credit-consumption/consume-credits-asynchronously.md): Consumes credits directly from customer wallets asynchronously. Consumptions are reconciled asynchronously into the credit balances. ### Credit reservations - [Release a credit reservation](https://docs.stigg.io/api-reference/credit-reservations/release-a-credit-reservation.md): Releases a credit reservation, consuming the given amount and returning the rest of the held credits to the balance. Retry a failed release with the same reservation ID; it is applied once. ### Credit usage - [Get credit usage](https://docs.stigg.io/api-reference/credit-usage/get-credit-usage.md): Retrieves credit usage time-series data for a customer, grouped by feature, over a specified time range. ### Auto recharge - [Get automatic recharge configuration](https://docs.stigg.io/api-reference/auto-recharge/get-automatic-recharge-configuration.md): Retrieves the automatic recharge configuration for a customer and currency. Returns default settings if no configuration exists. ### Custom currencies - [Get a list of custom currencys](https://docs.stigg.io/api-reference/custom-currencies/get-a-list-of-custom-currencys.md): Retrieves a paginated list of custom currencies in the environment. Archived currencies are excluded by default; pass `status=ARCHIVED` (or `status=ACTIVE,ARCHIVED`) to include them. - [Create custom currency](https://docs.stigg.io/api-reference/custom-currencies/create-custom-currency.md): Creates a new custom currency in the environment. - [Update custom currency](https://docs.stigg.io/api-reference/custom-currencies/update-custom-currency.md): Updates an existing custom currency. Only the supplied fields are modified. - [Archive custom currency](https://docs.stigg.io/api-reference/custom-currencies/archive-custom-currency.md): Archives a custom currency. Fails if the currency is still associated with any active plan or addon — use the associated-entities endpoint first to inspect dependencies. - [Unarchive custom currency](https://docs.stigg.io/api-reference/custom-currencies/unarchive-custom-currency.md): Restores a previously archived custom currency. Fails if another active currency with the same ID already exists. - [List custom currency associated entities](https://docs.stigg.io/api-reference/custom-currencies/list-custom-currency-associated-entities.md): Lists the active plans and addons that reference a custom currency. Useful before archiving to inspect dependencies. ### Credit ledger - [Get a list of credit ledger events](https://docs.stigg.io/api-reference/credit-ledger/get-a-list-of-credit-ledger-events.md): Retrieves a paginated list of credit ledger events for a customer. ### Contracts - [Get a list of contracts](https://docs.stigg.io/api-reference/contracts/get-a-list-of-contracts.md): Retrieves a cursor-paginated list of contracts in the environment. Each contract that has a billing contract is enriched with a preview of its upcoming (next) invoice when one is available. Supports filtering by customer external ID, state, and name. - [Create contract](https://docs.stigg.io/api-reference/contracts/create-contract.md): Creates a contract for a customer together with all of its (custom) subscriptions in a single atomic operation. Every new subscription is created inside one transaction — any validation or creation failure rolls the whole contract back. Each subscription entry is either a new subscription to create… - [List pricing models](https://docs.stigg.io/api-reference/contracts/list-pricing-models.md): Lists the pricing models a contract line item can be priced with. A line item picks one of these and fills the inputs it exposes (editableInputs); it never defines pricing of its own. isPayAsYouGo distinguishes usage-billed models from fixed ones. - [List legal entities](https://docs.stigg.io/api-reference/contracts/list-legal-entities.md): Lists the legal entities invoices are issued from, each with the payment accounts it can bill through. A contract needs a legal entity before it can be published. - [Get a single contract by ID](https://docs.stigg.io/api-reference/contracts/get-a-single-contract-by-id.md): Retrieves a single contract by its ID, enriched with a preview of its upcoming (next) invoice when one is available. Returns 404 when no contract with that ID exists in the environment. - [Update a contract](https://docs.stigg.io/api-reference/contracts/update-a-contract.md): Updates a contract's metadata (name, PO number, activation dates) and optionally re-links its subscriptions. Best-effort re-syncs the change to the connected billing provider. - [Delete contract](https://docs.stigg.io/api-reference/contracts/delete-contract.md): Deletes a contract: cancels the contract in the connected billing provider and cancels every subscription linked to it. - [Add contract line items](https://docs.stigg.io/api-reference/contracts/add-contract-line-items.md): Appends priced line items to the contract's billing. Each item is priced by one of the environment's pricing models, supplying only the row inputs that model exposes — quantity, price, tier bounds, package size. Additive: items already on the contract are left untouched. Requires a contract that has… - [Delete contract line item](https://docs.stigg.io/api-reference/contracts/delete-contract-line-item.md): Removes a line item from the contract's billing. - [Update contract line item rows](https://docs.stigg.io/api-reference/contracts/update-contract-line-item-rows.md): Replaces one line item's rows, leaving the rest of the contract untouched. Use it to re-price a single item, or to restate its tiers. - [Delete contract line item row](https://docs.stigg.io/api-reference/contracts/delete-contract-line-item-row.md): Removes a single row (tier) from a line item, addressed by its position in that item's rows. - [Set contract billing terms](https://docs.stigg.io/api-reference/contracts/set-contract-billing-terms.md): Sets the contract's period, currency and payment terms — the Terms step in the dashboard. Only supplied fields are written, and each applies to the whole contract. Requires a draft with line items: the terms are stored on them, which is also why the contract period reads back from them. - [Set contract billing settings](https://docs.stigg.io/api-reference/contracts/set-contract-billing-settings.md): Sets the legal entity, payment account and note the contract bills through — the Billing settings step. Both a legal entity and one of its payment accounts are needed before the contract can be published; list them with the legal-entities endpoint. Requires a draft with line items. - [List contract credit notes](https://docs.stigg.io/api-reference/contracts/list-contract-credit-notes.md): Lists the credit notes raised against this contract's invoices, newest first as the billing side returns them. - [Get contract invoice schedule](https://docs.stigg.io/api-reference/contracts/get-contract-invoice-schedule.md): The invoices the contract will produce, earliest issue date first — each with the period it covers, its issue and due dates, totals and line items. The complement to the summary: that says whether the money adds up, this says whether the customer will be invoiced when the order form says. On a draft… - [Get contract billing summary](https://docs.stigg.io/api-reference/contracts/get-contract-billing-summary.md): The contract's pre-publish totals — subtotal, discount, tax and total contract value, with a per line item breakdown. Read this before publishing: afterwards, these are the figures the customer is invoiced. Available in any state. - [Publish contract billing](https://docs.stigg.io/api-reference/contracts/publish-contract-billing.md): Publishes the contract's billing, which is what starts invoicing. Only a draft can be published; a contract whose billing is already live is rejected rather than silently reset. - [Edit contract billing in place](https://docs.stigg.io/api-reference/contracts/edit-contract-billing-in-place.md): Amends a contract whose billing is already live: it stays active and the invoices affected by the change are regenerated, which is what editing a live contract does in the dashboard. Invoices that can no longer change are never touched, and what may change is validated — an ongoing period's dates ca… - [Attach subscriptions to contract](https://docs.stigg.io/api-reference/contracts/attach-subscriptions-to-contract.md): Adds subscriptions to the contract, alongside the ones already attached. Each entry either references an existing custom subscription or carries a newSubscription body, which is provisioned and attached in the same call — so a contract can be created first and its subscriptions added after, without… - [Detach subscription from contract](https://docs.stigg.io/api-reference/contracts/detach-subscription-from-contract.md): Detaches a single subscription from the contract. The subscription itself is left untouched and stays active — only its link to the contract is removed. Idempotent: detaching a subscription that is not attached succeeds and changes nothing. - [Refresh contract usage](https://docs.stigg.io/api-reference/contracts/refresh-contract-usage.md): Immediately refreshes the metered usage of the contract's subscriptions in the connected billing provider for the current billing period. Only the usage not yet reported is sent, so the call is safe to repeat. - [List customer contracts](https://docs.stigg.io/api-reference/contracts/list-customer-contracts.md): Retrieves a customer's contracts. Each contract that has a billing contract is enriched with a preview of its upcoming (next) invoice when available. Returns an empty list when the customer has no contracts. ### Invoices - [Get a list of invoices](https://docs.stigg.io/api-reference/invoices/get-a-list-of-invoices.md): Retrieves a cursor-paginated list of a customer's invoices, fetched live from the connected billing provider. Ordered by issue date ascending by default; override with orderBy (issueDate | dueDate | total) and orderDir (ASC | DESC). Optionally narrowed to one contract, an issue-date range, and/or a… - [Get a single invoice by ID](https://docs.stigg.io/api-reference/invoices/get-a-single-invoice-by-id.md): Retrieves a single invoice with its full detail, resolved by its ID. Works for a contract invoice and a subscription invoice alike, since invoices are addressed by their own ID. - [Generate invoice PDF](https://docs.stigg.io/api-reference/invoices/generate-invoice-pdf.md): Starts a render of the invoice's PDF, or reports READY when one is already available. Returns immediately — pair it with the PDF endpoint to poll for the file. Use this when the caller wants to drive the wait itself, for instance to show progress. - [Get invoice PDF status](https://docs.stigg.io/api-reference/invoices/get-invoice-pdf-status.md): Reads the invoice's rendered PDF, returned inline and base64-encoded, or reports PENDING while the render is still in progress. One poll, no waiting — call it again to keep polling. - [Download invoice PDF](https://docs.stigg.io/api-reference/invoices/download-invoice-pdf.md): Retrieves an invoice's PDF in a single call, waiting for the render when it isn't cached yet — the convenient shape for a caller with nowhere to put a polling loop. If the render does not complete in time the call fails with a retryable message. - [Mark invoice as paid](https://docs.stigg.io/api-reference/invoices/mark-invoice-as-paid.md): Marks an invoice as paid and records the payment date, defaulting to now. Addressed by invoice ID, so it reaches a contract's invoices — unlike the subscription-scoped equivalent, which resolves a subscription first. - [Issue credit note](https://docs.stigg.io/api-reference/invoices/issue-credit-note.md): Issues a credit note crediting the invoice in full. This is how a change to a contract that can no longer be amended — one whose invoices have been sent or carry usage reports — gets settled. Usage-based lines are skipped, as they carry no fixed amount to credit against; crediting part of an invoice… ### Governance Entity Types - [Get a list of entity types](https://docs.stigg.io/api-reference/governance-entity-types/get-a-list-of-entity-types.md): Returns a cursor-paginated list of entity types defined in the environment. Entity types are vendor-defined categories of resource that can be governed (e.g. Org, Team, User). Archived entity types are excluded unless includeArchived=true. - [Upsert entity types](https://docs.stigg.io/api-reference/governance-entity-types/upsert-entity-types.md): Batched create-or-update of entity types. Existing types matched by id are updated; new ids are created. Idempotent — re-submitting the same payload converges to the same state. An upsert of an archived entity type restores it. - [Archive entity types](https://docs.stigg.io/api-reference/governance-entity-types/archive-entity-types.md): Archives entity types in bulk by id. An entity type with active entities cannot be archived: archive its entities first, or the whole request fails with 400. - [Check whether an entity type has active entities](https://docs.stigg.io/api-reference/governance-entity-types/check-whether-an-entity-type-has-active-entities.md): Returns whether any active entity of this entity type exists, across every customer. An entity type can be archived only when this is false. An unknown entity type returns false. ### Governance Entity Types (v1-beta) - [Get a list of entity types](https://docs.stigg.io/api-reference/governance-entity-types-v1-beta/get-a-list-of-entity-types.md): Returns a cursor-paginated list of entity types defined in the environment. Entity types are vendor-defined categories of resource that can be governed (e.g. Org, Team, User). Archived entity types are excluded unless includeArchived=true. Deprecated: use `GET /api/v1/entity-types`. - [Upsert entity types](https://docs.stigg.io/api-reference/governance-entity-types-v1-beta/upsert-entity-types.md): Batched create-or-update of entity types. Existing types matched by id are updated; new ids are created. Idempotent — re-submitting the same payload converges to the same state. An upsert of an archived entity type restores it. Deprecated: use `PUT /api/v1/entity-types`. - [Archive entity types](https://docs.stigg.io/api-reference/governance-entity-types-v1-beta/archive-entity-types.md): Archives entity types in bulk by id. An entity type with active entities cannot be archived: archive its entities first, or the whole request fails with 400. Deprecated: use `POST /api/v1/entity-types/archive`. - [Check whether an entity type has active entities](https://docs.stigg.io/api-reference/governance-entity-types-v1-beta/check-whether-an-entity-type-has-active-entities.md): Returns whether any active entity of this entity type exists, across every customer. An entity type can be archived only when this is false. An unknown entity type returns false. Deprecated: use `GET /api/v1/entity-types/{id}/has-active-entities`. ### Governance Entities - [Get a list of entities](https://docs.stigg.io/api-reference/governance-entities/get-a-list-of-entities.md): Retrieves a paginated list of entities for the given customer. - [Upsert entities](https://docs.stigg.io/api-reference/governance-entities/upsert-entities.md): Creates or updates entities in bulk for the given customer. Existing entities matched by id are updated; new ids are created. An upsert of an archived entity restores it. An entity on an archived entity type fails with 400. - [Get a single entity by ID](https://docs.stigg.io/api-reference/governance-entities/get-a-single-entity-by-id.md): Retrieves a single entity for the given customer by its identifier. - [Archive entities](https://docs.stigg.io/api-reference/governance-entities/archive-entities.md): Archives entities in bulk for the given customer by id. Upsert an archived entity to restore it. ### Governance Entities (v1-beta) - [Get a list of entitys](https://docs.stigg.io/api-reference/governance-entities-v1-beta/get-a-list-of-entitys.md): Retrieves a paginated list of entities for the given customer. Deprecated: use `GET /api/v1/customers/{id}/entities`. - [Upsert entities](https://docs.stigg.io/api-reference/governance-entities-v1-beta/upsert-entities.md): Creates or updates entities in bulk for the given customer. Existing entities matched by id are updated; new ids are created. An upsert of an archived entity restores it. An entity on an archived entity type fails with 400. Deprecated: use `PUT /api/v1/customers/{id}/entities`. - [Get a single entity by ID](https://docs.stigg.io/api-reference/governance-entities-v1-beta/get-a-single-entity-by-id.md): Retrieves a single entity for the given customer by its identifier. Deprecated: use `GET /api/v1/customers/{id}/entities/{entityId}`. - [Archive entities](https://docs.stigg.io/api-reference/governance-entities-v1-beta/archive-entities.md): Archives entities in bulk for the given customer by id. Upsert an archived entity to restore it. Deprecated: use `POST /api/v1/customers/{id}/entities/archive`. - [Unarchive entities](https://docs.stigg.io/api-reference/governance-entities-v1-beta/unarchive-entities.md): Deprecated: use `PUT /api/v1/customers/{id}/entities` with the entity id to restore it. Restores previously archived entities in bulk for the given customer by id. ### Governance Entity Entitlements - [Get a list of entity entitlements](https://docs.stigg.io/api-reference/governance-entity-entitlements/get-a-list-of-entity-entitlements.md): Returns a cursor-paginated list of entity entitlements for the given customer. An entity entitlement ties an entity to a feature or currency with a usage limit and reset cadence. - [Upsert entity entitlements](https://docs.stigg.io/api-reference/governance-entity-entitlements/upsert-entity-entitlements.md): Batched create-or-update of entity entitlements. Existing entity entitlements matched by (entityId, featureId or currencyId, scopeEntityIds) are updated; new ones are created. On update, omitted fields (usageLimit, cadence) are preserved; on create both are required. ### Governance Assignments (v1-beta) - [Get a list of assignments](https://docs.stigg.io/api-reference/governance-assignments-v1-beta/get-a-list-of-assignments.md): Returns a cursor-paginated list of capability assignments for the given customer. An assignment ties an entity to a capability with a usage limit and reset cadence. Deprecated: use `GET /api/v1/customers/{id}/entities/entitlements`. - [Upsert assignments](https://docs.stigg.io/api-reference/governance-assignments-v1-beta/upsert-assignments.md): Batched create-or-update of capability assignments. Existing assignments matched by (entityId, capabilityId) are updated; new pairs are created. On update, omitted fields (usageLimit, cadence) are preserved; on create both are required by the governance service. Deprecated: use `PUT /api/v1/customer… ### Governance Hierarchy - [Get a list of governance nodes](https://docs.stigg.io/api-reference/governance-hierarchy/get-a-list-of-governance-nodes.md): Queries the customer's governance hierarchy tree, returning a cursor-paginated list of nodes with their usage configuration (limit, cadence, scope) and current usage, sortable and filterable by usage. Each node carries `parentId` so the tree can be rebuilt client-side. Usage is read from a periodica… ### Governance Entitlements Check (v1-beta) - [Check entitlement (beta)](https://docs.stigg.io/api-reference/governance-entitlements-check-v1-beta/check-entitlement-beta.md): Experimental — request and response shapes may change without notice. Same semantics as `Check entitlement`, plus an optional `dimensions` query param that resolves to per-entity governance limits surfaced as `chains` on the response. Deprecated: use `GET /api/v1/customers/{id}/entitlements/check`. ## OpenAPI Specs - [stigg-api.documented](/openapi/stigg-api.documented.yml)