PinBridge Assets API
The Assets API from PinBridge — 5 operation(s) for assets.
The Assets API from PinBridge — 5 operation(s) for assets.
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-assets-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 Assets 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: Assets
paths:
/v1/assets:
get:
tags:
- Assets
summary: List Assets
description: 'List all assets for the organization, with optional filters.
`total` in the body (and the `X-Total-Count` header) counts the assets
matching the filters and search, ignoring `limit` and `offset`. Pin images a
plan without uploads made from templates are not listed or counted.'
operationId: list_assets_v1_assets_get
parameters:
- name: workspace_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Workspace Id
- name: sort
in: query
required: false
schema:
enum:
- created_at_desc
- created_at_asc
- name_asc
- name_desc
- size_desc
- size_asc
type: string
description: Sort order
default: created_at_desc
title: Sort
description: Sort order
- name: limit
in: query
required: false
schema:
type: integer
maximum: 200
minimum: 1
default: 50
title: Limit
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
default: 0
title: Offset
- name: q
in: query
required: false
schema:
anyOf:
- type: string
maxLength: 200
- type: 'null'
description: Case-insensitive search on the original file name
title: Q
description: Case-insensitive search on the original file name
- name: asset_type
in: query
required: false
schema:
anyOf:
- $ref: '#/components/schemas/AssetType'
- type: 'null'
description: Only images or videos
title: Asset Type
description: Only images or videos
- name: in_use
in: query
required: false
schema:
anyOf:
- type: boolean
- type: 'null'
description: 'true: only assets used by a pin or a pending scheduled pin; false: only unused assets'
title: In Use
description: 'true: only assets used by a pin or a pending scheduled pin; false: only unused assets'
- name: since
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: 'null'
description: Only assets uploaded at or after this ISO 8601 timestamp
title: Since
description: Only assets uploaded at or after this ISO 8601 timestamp
- name: until
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: 'null'
description: Only assets uploaded before this ISO 8601 timestamp
title: Until
description: Only assets uploaded before this ISO 8601 timestamp
- 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/AssetListResponse'
headers:
X-Total-Count:
description: Rows matching the filters, ignoring limit and offset.
schema:
type: integer
'422':
description: Validation Error
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/HTTPValidationError'
- $ref: '#/components/schemas/ErrorResponse'
security:
- ApiKeyAuth: []
- BearerAuth: []
delete:
tags:
- Assets
summary: Bulk Delete Assets
description: Bulk delete assets. Returns split of deleted vs those requiring confirmation.
operationId: bulk_delete_assets_v1_assets_delete
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
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BulkDeleteRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BulkDeleteResponse'
'422':
description: Validation Error
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/HTTPValidationError'
- $ref: '#/components/schemas/ErrorResponse'
security:
- ApiKeyAuth: []
- BearerAuth: []
/v1/assets/images:
post:
tags:
- Assets
summary: Upload Image Asset
description: 'Upload an image asset for later pin publishing.
Playground may upload 5 images a month (UTC), up to 10 MB each, and use them
in its pins like any plan; deleting one does not give the upload back. A pin
image made from a template is the exception and does not count: once the
workspace has templates, an upload with `template_id` naming a template the
workspace can use is kept as that template''s pin image. It must be a PNG at
the template''s size, 10 MB or less, the workspace needs pins left this month,
and it can upload or draw 20 such images a day (UTC). They are not listed in
Assets, one pin or schedule made with the template can use each, and they are
deleted after 24 hours when nothing uses them.'
operationId: upload_image_asset_v1_assets_images_post
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
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/Body_upload_image_asset_v1_assets_images_post'
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AssetResponse'
'402':
description: '`quota_exceeded`: no pins left this month (Playground).'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: '`feature_unavailable` for an upload the plan doesn''t include, `image_upload_limit` past the 5 images a month Playground may upload, or `template_pin_daily_limit` past 20 pin images from templates a day (Playground).'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'422':
description: '`template_not_found`, `template_version_not_found`, `invalid_image`, and on Playground `template_pin_not_png` or `template_pin_wrong_size`.'
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/HTTPValidationError'
- $ref: '#/components/schemas/ErrorResponse'
security:
- ApiKeyAuth: []
- BearerAuth: []
/v1/assets/videos:
post:
tags:
- Assets
summary: Upload Video Asset
description: Upload a video asset for later pin publishing.
operationId: upload_video_asset_v1_assets_videos_post
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
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/Body_upload_video_asset_v1_assets_videos_post'
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AssetResponse'
'422':
description: Validation Error
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/HTTPValidationError'
- $ref: '#/components/schemas/ErrorResponse'
security:
- ApiKeyAuth: []
- BearerAuth: []
/v1/assets/{asset_id}:
delete:
tags:
- Assets
summary: Delete Asset
description: 'Delete an asset. Returns requires_confirmation=True while it is in use.
In use means referenced by a pin or by a scheduled pin that has not run yet;
`referenced_pin_count` counts both. With `confirm=true` the asset is deleted
anyway: pins keep their record without it, and pending schedules lose it, so
an unpublished pin or schedule that used it fails to publish.'
operationId: delete_asset_v1_assets__asset_id__delete
parameters:
- name: asset_id
in: path
required: true
schema:
type: string
format: uuid
title: Asset Id
- name: confirm
in: query
required: false
schema:
type: boolean
default: false
title: Confirm
- 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/AssetDeleteResponse'
'422':
description: Validation Error
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/HTTPValidationError'
- $ref: '#/components/schemas/ErrorResponse'
security:
- ApiKeyAuth: []
- BearerAuth: []
get:
tags:
- Assets
summary: Get Asset
description: Return metadata for an accessible asset.
operationId: get_asset_v1_assets__asset_id__get
parameters:
- name: asset_id
in: path
required: true
schema:
type: string
format: uuid
title: Asset Id
- 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/AssetResponse'
'422':
description: Validation Error
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/HTTPValidationError'
- $ref: '#/components/schemas/ErrorResponse'
security:
- ApiKeyAuth: []
- BearerAuth: []
/v1/assets/{asset_id}/content:
get:
tags:
- Assets
summary: Get Asset Content
description: Serve the uploaded asset content.
operationId: get_asset_content_v1_assets__asset_id__content_get
parameters:
- name: asset_id
in: path
required: true
schema:
type: string
format: uuid
title: Asset Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
BulkDeleteRequest:
properties:
asset_ids:
items:
type: string
format: uuid
type: array
title: Asset Ids
confirm:
type: boolean
title: Confirm
default: false
type: object
required:
- asset_ids
title: BulkDeleteRequest
description: Request body for bulk asset deletion.
BulkDeleteAssetSummary:
properties:
asset_id:
type: string
format: uuid
title: Asset Id
workspace_id:
type: string
format: uuid
title: Workspace Id
workspace_environment:
anyOf:
- $ref: '#/components/schemas/WorkspaceEnvironment'
- type: 'null'
original_filename:
type: string
title: Original Filename
file_size_bytes:
type: integer
title: File Size Bytes
referenced_pin_count:
type: integer
title: Referenced Pin Count
description: Pins plus scheduled pins that have not run yet using this asset.
default: 0
freed_bytes:
type: integer
title: Freed Bytes
default: 0
type: object
required:
- asset_id
- workspace_id
- original_filename
- file_size_bytes
title: BulkDeleteAssetSummary
description: Summary payload for one bulk asset delete result item.
AssetType:
type: string
enum:
- image
- video
title: AssetType
description: Supported uploaded asset types.
AssetDeleteResponse:
properties:
deleted:
type: boolean
title: Deleted
requires_confirmation:
type: boolean
title: Requires Confirmation
referenced_pin_count:
type: integer
title: Referenced Pin Count
description: Pins plus scheduled pins that have not run yet using this asset.
freed_bytes:
type: integer
title: Freed Bytes
type: object
required:
- deleted
- requires_confirmation
- referenced_pin_count
- freed_bytes
title: AssetDeleteResponse
description: Response for a single asset deletion.
Body_upload_image_asset_v1_assets_images_post:
properties:
file:
type: string
format: binary
title: File
description: Image file to upload
template_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Template Id
description: The template the image was drawn with, if any. The first image saved from one of the workspace's public templates sends it to PinBridge for the gallery
template_version:
anyOf:
- type: integer
minimum: 1.0
- type: 'null'
title: Template Version
description: 'Version of template_id the image was drawn with; defaults to its current version (a gallery template''s: the version the gallery shows)'
type: object
required:
- file
title: Body_upload_image_asset_v1_assets_images_post
Body_upload_video_asset_v1_assets_videos_post:
properties:
file:
type: string
format: binary
title: File
description: Video file to upload
type: object
required:
- file
title: Body_upload_video_asset_v1_assets_videos_post
ErrorResponse:
type: object
title: ErrorResponse
properties:
detail:
description: Legacy detail payload (string, object, or list).
error:
$ref: '#/components/schemas/ErrorEnvelope'
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
AssetListResponse:
properties:
assets:
items:
$ref: '#/components/schemas/AssetResponse'
type: array
title: Assets
total:
type: integer
title: Total
storage_used_bytes:
type: integer
title: Storage Used Bytes
storage_quota_bytes:
type: integer
title: Storage Quota Bytes
storage_used_percent:
type: integer
title: Storage Used Percent
type: object
required:
- assets
- total
- storage_used_bytes
- storage_quota_bytes
- storage_used_percent
title: AssetListResponse
description: Paginated asset list with storage summary.
AssetResponse:
properties:
id:
type: string
format: uuid
title: Id
workspace_id:
type: string
format: uuid
title: Workspace Id
workspace_environment:
anyOf:
- $ref: '#/components/schemas/WorkspaceEnvironment'
- type: 'null'
asset_type:
$ref: '#/components/schemas/AssetType'
original_filename:
type: string
title: Original Filename
stored_filename:
type: string
title: Stored Filename
content_type:
type: string
title: Content Type
file_size_bytes:
type: integer
title: File Size Bytes
file_size_display:
type: string
title: File Size Display
referenced_by_pin_count:
type: integer
title: Referenced By Pin Count
description: Pins plus scheduled pins that have not run yet using this asset.
default: 0
public_url:
type: string
title: Public Url
purpose:
type: string
title: Purpose
description: 'upload: a file in Assets. template_pin: a pin image a plan without uploads made from a template; it is not listed in Assets, one pin or schedule made with template_id can use it, and it is deleted after 24 hours when nothing uses it.'
default: upload
template_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Template Id
description: The template the image was drawn with
created_at:
type: string
format: date-time
title: Created At
updated_at:
type: string
format: date-time
title: Updated At
type: object
required:
- id
- workspace_id
- asset_type
- original_filename
- stored_filename
- content_type
- file_size_bytes
- file_size_display
- public_url
- created_at
- updated_at
title: AssetResponse
description: Response schema for an uploaded asset.
BulkDeleteResponse:
properties:
deleted:
items:
type: string
format: uuid
type: array
title: Deleted
requires_confirmation:
items:
type: string
format: uuid
type: array
title: Requires Confirmation
total_freed_bytes:
type: integer
title: Total Freed Bytes
deleted_items:
items:
$ref: '#/components/schemas/BulkDeleteAssetSummary'
type: array
title: Deleted Items
default: []
requires_confirmation_items:
items:
$ref: '#/components/schemas/BulkDeleteAssetSummary'
type: array
title: Requires Confirmation Items
default: []
type: object
required:
- deleted
- requires_confirmation
- total_freed_bytes
title: BulkDeleteResponse
description: Response for bulk asset deletion.
WorkspaceEnvironment:
type: string
enum:
- production
- sandbox
title: WorkspaceEnvironment
description: Environment mode for an isolated project/workspace.
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
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>`.'