PinBridge Billing API
The Billing API from PinBridge — 1 operation(s) for billing.
The Billing API from PinBridge — 1 operation(s) for billing.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/pinbridge-io:pinbridge-io-billing-api"
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.
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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: PinBridge Billing API
description: 'Developer-first Pinterest publishing engine with queues, pacing, and webhooks
## Error contract
Every non-2xx JSON response carries a top-level `error` envelope next to the
legacy `detail` field:
```json
{
"detail": "...",
"error": {
"code": "board_access_denied",
"message": "Pinterest denied access to this board for the connected account.",
"remediation": "Refresh the board list and choose a board owned by this account.",
"request_id": "8c2c1f0e-...",
"board_id": "1234567890",
"account_id": "..."
}
}
```
`error.code` is stable and safe to branch on; `error.message` is for humans;
`error.remediation` says what to change; `error.request_id` matches the
`X-Request-ID` response header for support. Extra keys give machine-readable
context (`board_id`, `account_id`, `retry_after_seconds`, `required_scope`, ...).
Validation failures use `code: validation_error` and list field errors under
`error.errors`.
## Publish headroom headers
Publish-shaped responses (`POST /v1/pins`, `/v1/pins/batch`, `/v1/pins/validate`,
`/v1/pins/{id}/retry`) carry the remaining monthly quota and Pinterest rate
headroom: `X-PinBridge-Quota-Limit`, `X-PinBridge-Quota-Used`,
`X-PinBridge-Quota-Remaining`, `X-Pinterest-RateLimit-Remaining`,
`X-Pinterest-RateLimit-Capacity`, `X-Pinterest-RateLimit-Refill-Per-Second`.
On a batch the rate headers describe the first pin''s account and are omitted
when the batch spans several accounts.
## API key scopes
API keys carry `read`, `write` and `destructive` scopes and an optional Pinterest
account allow-list. A request outside the key''s grants fails with
`403 insufficient_scope` or `403 account_not_permitted`.'
version: 1.93.1
tags:
- name: Billing
paths:
/v1/billing/status:
get:
tags:
- Billing
summary: Get Billing Status
description: 'Current plan, billing status and quota usage for the workspace.
`calls_used` counts the pins published successfully this month (calendar month,
UTC) against `quota_calls_monthly`, and `quota_reset_at` is when it resets.
Only successful new pins count, scheduled pins included when they publish;
reads, failures and retries don''t. Once the quota is used up, credits are
spent one per pin if `credits_enabled`; with no quota or credits left,
publishing returns `402 quota_exceeded` (or `credits_exhausted`) while every
other endpoint keeps working.
It also reports usage against the other plan limits (Pinterest accounts, API
keys, weekly AI assistant requests) and, below the top self-serve plan, the
next plan up with its `upgrade_url`.
The `plan` value `pro` is the Agency plan (`plan_name`). Works with any API key
that has the read scope; a dashboard session needs a role that can manage billing.'
operationId: get_billing_status_v1_billing_status_get
parameters:
- name: x-api-key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Api-Key
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BillingStatusResponse'
'422':
description: Validation Error
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/HTTPValidationError'
- $ref: '#/components/schemas/ErrorResponse'
security:
- ApiKeyAuth: []
- BearerAuth: []
components:
schemas:
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
BillingStatusResponse:
properties:
plan:
$ref: '#/components/schemas/Plan'
description: Current plan. `pro` is the Agency plan
billing_provider:
type: string
title: Billing Provider
description: '`stripe` when billed through Stripe, `database` when the plan is set by PinBridge'
default: database
billing_cycle:
anyOf:
- $ref: '#/components/schemas/BillingCycle'
- type: 'null'
description: '`monthly` or `annual`; null when unknown'
billing_status:
$ref: '#/components/schemas/BillingStatus'
description: Subscription status
trial_active:
type: boolean
title: Trial Active
description: Whether a free trial is running
default: false
trial_ends_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Trial Ends At
description: Set while a trial is active
trial_pins_limit:
anyOf:
- type: integer
- type: 'null'
title: Trial Pins Limit
description: Pins the running trial includes in total (50); null when no trial cap applies. Starting the paid plan lifts it
trial_pins_used:
type: integer
title: Trial Pins Used
description: Pins published since the trial started, plus pins on their way
default: 0
current_period_start:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Current Period Start
description: Start of the current subscription period
current_period_end:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Current Period End
description: End of the current subscription period (next renewal)
subscription_cancel_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Subscription Cancel At
description: When a scheduled cancellation takes effect
scheduled_change:
anyOf:
- $ref: '#/components/schemas/ScheduledPlanChangeResponse'
- type: 'null'
description: A lower plan or shorter billing cycle that starts at the end of the paid period
quota_calls_monthly:
type: integer
title: Quota Calls Monthly
description: Successful pin publishes included per month
calls_used:
type: integer
title: Calls Used
description: Pins published successfully this month (calendar month, UTC)
quota_reset_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Quota Reset At
description: 'When `calls_used` resets: the start of next month (UTC)'
credits_remaining:
type: integer
title: Credits Remaining
description: Prepaid credits left, spent one per pin once the quota is used up
default: 0
credits_enabled:
type: boolean
title: Credits Enabled
description: Whether this workspace spends credits after the quota
default: false
credits_purchase_allowed:
type: boolean
title: Credits Purchase Allowed
description: Whether this workspace can buy credit packs right now
default: false
quota_exhausted:
type: boolean
title: Quota Exhausted
description: True when `calls_used` has reached `quota_calls_monthly`
default: false
plan_consumption_percent:
type: integer
title: Plan Consumption Percent
description: '`calls_used` as a percentage of the monthly quota, 0-100'
default: 0
storage_quota_bytes:
type: integer
title: Storage Quota Bytes
description: Asset library storage limit
default: 0
storage_used_bytes:
type: integer
title: Storage Used Bytes
description: Asset library storage in use
default: 0
storage_used_percent:
type: integer
title: Storage Used Percent
description: '`storage_used_bytes` as a percentage of the storage limit'
default: 0
storage_warning:
anyOf:
- type: string
- type: 'null'
title: Storage Warning
description: '`80`, `95` or `100` once storage use crosses that percentage'
pinterest_accounts_limit:
type: integer
title: Pinterest Accounts Limit
description: Connected Pinterest accounts allowed
uploaded_media_assets:
type: boolean
title: Uploaded Media Assets
description: Whether the plan includes asset uploads
image_uploads_monthly:
anyOf:
- type: integer
- type: 'null'
title: Image Uploads Monthly
description: Images a plan without asset uploads may still upload this month (5 on Playground); null when the plan has no monthly count
image_uploads_used:
type: integer
title: Image Uploads Used
description: Images uploaded this month against `image_uploads_monthly`
default: 0
bulk_imports:
type: boolean
title: Bulk Imports
description: Whether the plan includes bulk JSON and CSV imports
plan_name:
anyOf:
- type: string
- type: 'null'
title: Plan Name
description: The plan's display name, e.g. `Agency` for `pro`
pinterest_accounts_used:
type: integer
title: Pinterest Accounts Used
description: Connected Pinterest accounts in use
default: 0
api_keys_limit:
anyOf:
- type: integer
- type: 'null'
title: Api Keys Limit
description: API keys allowed; null means unlimited
api_keys_used:
type: integer
title: Api Keys Used
description: Active API keys, not counting AI assistant connections
default: 0
assistant_requests_limit:
type: integer
title: Assistant Requests Limit
description: AI assistant (MCP) requests allowed per week; 0 means unlimited
default: 0
assistant_requests_used:
type: integer
title: Assistant Requests Used
description: AI assistant (MCP) requests used this week
default: 0
assistant_requests_reset_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Assistant Requests Reset At
description: When the weekly AI assistant request count resets
recommended_plan:
anyOf:
- $ref: '#/components/schemas/Plan'
- type: 'null'
description: The next self-serve plan up; null on the top self-serve plan
upgrade_url:
anyOf:
- type: string
- type: 'null'
title: Upgrade Url
description: Pricing page link highlighting `recommended_plan`, or null
type: object
required:
- plan
- billing_status
- quota_calls_monthly
- calls_used
- pinterest_accounts_limit
- uploaded_media_assets
- bulk_imports
title: BillingStatusResponse
description: Plan, billing status and quota usage for the current workspace.
ScheduledPlanChangeResponse:
properties:
plan:
$ref: '#/components/schemas/Plan'
plan_name:
type: string
title: Plan Name
billing_cycle:
$ref: '#/components/schemas/BillingCycle'
effective_at:
type: string
format: date-time
title: Effective At
type: object
required:
- plan
- plan_name
- billing_cycle
- effective_at
title: ScheduledPlanChangeResponse
description: A downgrade that takes effect at the end of the paid period.
ErrorResponse:
type: object
title: ErrorResponse
properties:
detail:
description: Legacy detail payload (string, object, or list).
error:
$ref: '#/components/schemas/ErrorEnvelope'
Plan:
type: string
enum:
- free
- starter
- growth
- pro
- enterprise
title: Plan
description: Subscription plan tiers.
BillingStatus:
type: string
enum:
- active
- trialing
- past_due
- canceled
- unpaid
title: BillingStatus
description: Billing status from Stripe.
ErrorEnvelope:
type: object
title: ErrorEnvelope
description: Documented error contract carried by every non-2xx response.
required:
- code
- message
properties:
code:
type: string
description: Stable machine-readable error code.
message:
type: string
description: Human-readable explanation.
remediation:
type: string
nullable: true
description: What to change to make the request succeed.
request_id:
type: string
nullable: true
description: Correlates with the X-Request-ID header; quote it to support.
additionalProperties: true
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
BillingCycle:
type: string
enum:
- monthly
- annual
title: BillingCycle
description: Subscription billing frequency.
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key
description: API key created via `/v1/api-keys`.
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT or API Key
description: 'Auth header: `Authorization: Bearer <jwt-or-api-key>`.'