---
title: "Resync Org Products"
method: POST
path: "/api/billing/resync-products"
tags: ["billing"]
---

# Resync Org Products

`POST /api/billing/resync-products`

## Request

- Base URL: `https://platform.verbiflow.com/api/bridge`
- URL: `https://platform.verbiflow.com/api/bridge/api/billing/resync-products`
- Auth: one of:
  - HTTP bearer and API key in header `x-flage-org-id`
  - HTTP bearer and API key in header `x-flage-org-slug`

Force-reconcile this org's billing:
1. Cancel any legacy per-account subs (anything not tagged with billing_model=quantity_v1)
   that's NOT the workspace sub.
2. Run sync_org_product_quantity for all 4 product kinds, which will:
   - Consolidate any duplicate line items on the org sub
   - Set quantities to match actual DB counts

## Response `200`

Successful Response

- ResyncProductsResponse
  - `legacy_canceled` string[], required: Legacy account subscription identifiers canceled during reconciliation.
  - `products_synced` union[], required: Exact outcome for each recurring connected-account product.
    - union
      - ProductSyncFailed
        - `error` string, required: Stable customer-safe reconciliation failure message.
        - `outcome` 'failed', required: Product reconciliation failed.
        - `product` 'oauth_mailbox' | 'purchased_mailbox' | 'linkedin_account', required: Recurring connected-account product being reconciled.
      - ProductSyncNoSubscriptionNeeded
        - `count` integer, required: Observed active account count.
        - `noop` 'no_sub_needed', required: Stable no-change reason.
        - `outcome` 'no_subscription_needed', required: No recurring subscription is needed.
        - `product` 'oauth_mailbox' | 'purchased_mailbox' | 'linkedin_account', required: Recurring connected-account product being reconciled.
        - `target` integer, required: Chargeable target quantity after plan entitlements.
      - ProductSyncSubscriptionCreated
        - `count` integer, required: Observed active account count.
        - `created` string, required: Created Stripe subscription identifier.
        - `outcome` 'subscription_created', required: A subscription was created.
        - `product` 'oauth_mailbox' | 'purchased_mailbox' | 'linkedin_account', required: Recurring connected-account product being reconciled.
        - `product_kind` 'oauth_mailbox' | 'purchased_mailbox' | 'linkedin_account', required: Stripe product category.
        - `quantity` integer, required: New Stripe subscription quantity.
      - ProductSyncNoItemNeeded
        - `count` integer, required: Observed active account count.
        - `noop` 'no_item_needed', required: Stable no-change reason.
        - `outcome` 'no_item_needed', required: No product line item is needed.
        - `product` 'oauth_mailbox' | 'purchased_mailbox' | 'linkedin_account', required: Recurring connected-account product being reconciled.
        - `product_kind` 'oauth_mailbox' | 'purchased_mailbox' | 'linkedin_account', required: Stripe product category.
        - `subscription_id` string, required: Stripe subscription inspected.
        - `target` 0, required: Required Stripe quantity.
      - ProductSyncAlreadyCurrent
        - `count` integer, required: Observed active account count.
        - `noop` 'already_synced', required: Stable no-change reason.
        - `outcome` 'already_current', required: Stripe quantity already matches.
        - `product` 'oauth_mailbox' | 'purchased_mailbox' | 'linkedin_account', required: Recurring connected-account product being reconciled.
        - `product_kind` 'oauth_mailbox' | 'purchased_mailbox' | 'linkedin_account', required: Stripe product category.
        - `quantity` integer, required: Current Stripe product quantity.
        - `subscription_id` string, required: Stripe subscription inspected.
      - ProductSyncItemAdded
        - `count` integer, required: Observed active account count.
        - `item_added` string, required: Created Stripe subscription-item identifier.
        - `outcome` 'item_added', required: A missing product line item was added.
        - `previous_quantity` 0, required: Quantity before the line item existed.
        - `product` 'oauth_mailbox' | 'purchased_mailbox' | 'linkedin_account', required: Recurring connected-account product being reconciled.
        - `product_kind` 'oauth_mailbox' | 'purchased_mailbox' | 'linkedin_account', required: Stripe product category.
        - `quantity` integer, required: New Stripe product quantity.
        - `subscription_id` string, required: Stripe subscription changed.
      - ProductSyncItemRemoved
        - `count` integer, required: Observed active account count.
        - `item_removed` string, required: Removed Stripe subscription-item identifier.
        - `outcome` 'item_removed', required: An unnecessary product line was removed.
        - `previous_quantity` integer, required: Quantity before removal.
        - `product` 'oauth_mailbox' | 'purchased_mailbox' | 'linkedin_account', required: Recurring connected-account product being reconciled.
        - `product_kind` 'oauth_mailbox' | 'purchased_mailbox' | 'linkedin_account', required: Stripe product category.
        - `quantity` 0, required: Quantity after removal.
        - `subscription_id` string, required: Stripe subscription changed.
      - ProductSyncItemUpdated
        - `count` integer, required: Observed active account count.
        - `item_updated` string, required: Updated Stripe subscription-item identifier.
        - `outcome` 'item_updated', required: An existing product quantity changed.
        - `previous_quantity` integer, required: Quantity before the update.
        - `product` 'oauth_mailbox' | 'purchased_mailbox' | 'linkedin_account', required: Recurring connected-account product being reconciled.
        - `product_kind` 'oauth_mailbox' | 'purchased_mailbox' | 'linkedin_account', required: Stripe product category.
        - `quantity` integer, required: New Stripe product quantity.
        - `subscription_id` string, required: Stripe subscription changed.

---

[API](https://skmtc.dev/verbiflow/apis/verbiflow-sdk-http-contract.md) - [All operations](https://skmtc.dev/verbiflow/apis/verbiflow-sdk-http-contract/llms.txt) - [OpenAPI document](https://skmtc.dev/verbiflow/apis/verbiflow-sdk-http-contract/revisions/c80e903ef8f3?raw)
