{"openapi":"3.0.2","servers":[{"url":"https://api.pics.io","description":"Pics.io Api"}],"info":{"title":"Pics.io REST API","version":"1.0.0","description":"The <a href=\"https://pics.io\" target=\"_blank\">Pics.io</a> API is organized around REST. It has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. It uses built-in HTTP features, like HTTP headers and HTTP verbs, which are understood by off-the-shelf HTTP clients. We support cross-origin resource sharing, allowing you to interact securely with our API from a client-side web applications. To secure API user accounts we're relying on secret tokens, those tokens should be passed with each API request. JSON is returned by all API responses, including errors. Each request must contain one of the Headers: 'Content-Type: application/json' OR 'Accept: application/json'","termsOfService":"https://pics.io/terms-of-use","contact":{"name":"Support","url":"https://help.pics.io","email":"support@pics.io"}},"schemes":["https"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"produces":["application/json"],"tags":[{"name":"Assets","description":"Asset is a core Pics.io abstraction. Assets are identified by unique BSON ObjectId `_id` fields. <a href=https://help.pics.io/en/articles/1269246-organizing-assets-in-collections target=_blank>Read more</a>"},{"name":"Auth","description":"Start using Pics.io API from obtaining new API token. To access the API clients you should pass the secret API token in the HTTP `Authorization` header. The API tokens are well-known [JWT-tokens](https://jwt.io/introduction/).  All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without `Authorization` header will fail."},{"name":"Billing","description":"Billing and subscription management endpoints for managing plans, invoices, payments, and subscription features."},{"name":"Collections","description":"Collection (previously Tag) is a core Pics.io abstraction. Collections are identified by unique BSON ObjectId `_id` fields. Collections are organized in a tree hierarchy, collections might have multiple **children collections** and maximum one parent collection. Collections with no parent named **root collections** and in most cases represent the root of connected storage. Collection trees might be retrieved level by level. <a href=https://help.pics.io/en/articles/1269246-organizing-assets-in-collections target=_blank>Read more</a>"},{"name":"Contact","description":"Contact form endpoints for reaching out to the Pics.io team for demos, quotes, enterprise inquiries, and other support requests."},{"name":"CustomFields","description":"Custom Fields is a core Pics.io abstraction. <a href=https://help.pics.io/en/articles/1269146-settings-custom-fields target=_blank>Read more</a>"},{"name":"CustomFieldsValue","description":"Endpoints for managing custom field values attached to assets, including attaching and detaching list items."},{"name":"DownloadPresets","description":"Download presets define how assets are processed and delivered when downloaded. Presets can specify image formats, sizes, quality settings, and other transformation parameters."},{"name":"Events","description":"Event tracking and notification center endpoints for monitoring system events, audit logs, and user notifications."},{"name":"Faces","description":"Face recognition and person management endpoints. Identify and manage people in your assets, merge duplicate persons, and organize face data."},{"name":"Inboxes","description":"Inbox endpoints for managing file upload inboxes, custom fields, themes, and sharing settings."},{"name":"Keywords","description":"Keyword is a core Pics.io abstraction. <a href=https://help.pics.io/en/articles/1269302-keywords-general-info target=_blank>Read more</a>"},{"name":"Lightboards","description":"Lightboard endpoints for creating and managing lightboards, which are collections of assets used for review and approval workflows."},{"name":"LinkedAssets","description":"In Pics.io assets may be linked to each other to keep library organized. <a href=https://help.pics.io/en/articles/1879373-linked-assets target=_blank>Read more</a>"},{"name":"Metrics","description":"Analytics and statistics endpoints for tracking usage, storage, and other metrics across your account."},{"name":"PT-2026Q1","description":"Subset of Pics.io API for PT-2026Q1 pentesting."},{"name":"Passwords","description":"Password management endpoints for resetting passwords and handling password-related operations."},{"name":"Products","description":"Product management endpoints for e-commerce integration. Manage products, variants, options, and their relationships with assets."},{"name":"Roles","description":"Role and permission management endpoints. Define custom roles with specific permissions and metadata field requirements."},{"name":"SavedSearches","description":"Endpoints for saving and managing search queries for quick access to frequently used search filters."},{"name":"Searches","description":"Search endpoints for finding assets, collections, and other resources using various search criteria and filters."},{"name":"Setup","description":"Setup and onboarding endpoints for configuring storage, teams, and initial account settings."},{"name":"SetupToriut","description":"Toriut-specific setup endpoints for configuring and managing Toriut integrations."},{"name":"Slackbots","description":"Slack integration endpoints for managing Slack bot connections and notifications."},{"name":"Syncs","description":"Synchronization endpoints for managing file sync operations with external storage providers like Google Drive, Dropbox, and S3."},{"name":"Team","description":"Team management endpoints for configuring team settings, branding, webhooks, SSO, and other team-level configurations."},{"name":"Teammates","description":"Teammate management endpoints for inviting, managing, and organizing team members."},{"name":"Users","description":"User account management endpoints for profile settings, preferences, API keys, authentication, and user-specific configurations."},{"name":"Watermarks","description":"Watermark management endpoints for creating, updating, and applying watermarks to assets."},{"name":"WebsiteSettingsPresets","description":"Website settings preset endpoints for managing reusable website configuration templates."},{"name":"Websites","description":"Website management endpoints for creating and managing public-facing websites from your collections."}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Asset":{"Asset":{"type":"object","properties":{"_id":{"type":"string"},"flag":{"type":"string"},"rating":{"type":"number"},"trashed":{"type":"boolean"},"color":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"aiDescription":{"type":"string"},"tags":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"user":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"path":{"type":"string","example":"/root/SomeCollection"},"storageId":{"type":"string"}}}},"lightboards":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"userId":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"path":{"type":"string","example":"→Some Lightboard"}}}},"keywords":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"usedAt":{"type":"string","format":"date-time"},"userId":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"path":{"type":"string","example":"→Some Keyword"},"isNew":{"type":"boolean"}}}},"comments":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"userId":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"text":{"type":"string","description":"Text of the comment"},"markers":{"type":"array","items":{"type":"object","required":["createdAt","number","x","y"],"properties":{"createdAt":{"type":"string","format":"date-time"},"number":{"type":"number","description":"Index number (starts from 1)"},"x":{"type":"number"},"x2":{"type":"number"},"y":{"type":"number"},"y2":{"type":"number"}}}},"reactions":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"displayName":{"type":"string","description":"User display name"},"value":{"type":"string","example":"+1"},"isGuest":{"type":"boolean"}}}}}}},"revisions":{"type":"array","items":{"type":"object","properties":{"revisionId":{"type":"string"},"userId":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"}}}},"userOrientation":{"type":"object","properties":{"rotation":{"type":"number"},"flipX":{"type":"boolean"},"flipY":{"type":"boolean"}}},"storageType":{"type":"string"},"storageId":{"type":"string"},"name":{"type":"string"},"imageMediaMetadata":{"type":"object","properties":{"rotation":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}}},"headRevisionId":{"type":"string"},"md5Checksum":{"type":"string"},"fileSize":{"type":"string"},"fileExtension":{"type":"string"},"mimeType":{"type":"string"},"assignees":{"type":"array","items":{"type":"object","properties":{"assignedAt":{"type":"string","format":"date-time"},"assigneeId":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"assignerId":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"}}}},"meta":{"type":"object","additionalProperties":{"type":"string"}},"modifiedMetaFields":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}},"user":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"keywording":{"type":"string","description":"Keywording status"},"keywordingReason":{"type":"array","items":{"type":"string"}},"metadating":{"type":"string","description":"Metadating status"},"metadatingReason":{"type":"array","items":{"type":"string"}},"contenting":{"type":"string","description":"Contenting status"},"contentingReason":{"type":"array","items":{"type":"string"}},"transcoding":{"type":"string","description":"Transcoding status"},"transcodingReason":{"type":"array","items":{"type":"string"}},"describing":{"type":"string","description":"Describing status"},"describingReason":{"type":"array","items":{"type":"string"}},"videoPreviewing":{"type":"string","description":"Video previewing status"},"thumbnailing":{"type":"string","description":"Thumbnailing status"},"thumbnailingReason":{"type":"array","items":{"type":"string"}},"transcribing":{"type":"string","description":"Transcribing status"},"transcribingReason":{"type":"array","items":{"type":"string"}},"embedding":{"type":"string","description":"AI-powered search status"},"embeddingReason":{"type":"array","items":{"type":"string"}},"CLIPEmbedding":{"type":"string","description":"Indexing AI-powered search status"},"faceIndexing":{"type":"string","description":"Face indexing status"},"faceIndexingReason":{"type":"array","items":{"type":"string"}},"faceRecognizing":{"type":"string","description":"Face recognition status"},"faceRecognizingReason":{"type":"array","items":{"type":"string"}},"metadatedAt":{"type":"string","format":"date-time"},"videoPreviewedAt":{"type":"string","format":"date-time"},"videoPreviews":{"type":"object","additionalProperties":{"type":"string"}},"autosyncedAt":{"type":"string","format":"date-time"},"singleSharingSettings":{"type":"object"},"permissions":{"type":"object","properties":{"upload":{"type":"boolean"},"websites":{"type":"boolean"},"createCollections":{"type":"boolean"},"editCollections":{"type":"boolean"},"deleteCollections":{"type":"boolean"},"downloadFiles":{"type":"boolean"},"editAssetFilename":{"type":"boolean"},"editAssetTitle":{"type":"boolean"},"editAssetDescription":{"type":"boolean"},"editAssetKeywords":{"type":"boolean"},"autogenerateKeywords":{"type":"boolean"},"editAssetCollections":{"type":"boolean"},"editAssetAssignees":{"type":"boolean"},"editAssetLinkedAssets":{"type":"boolean"},"editAssetMarks":{"type":"boolean"},"editAssetMetadata":{"type":"boolean"},"allowEditor":{"type":"boolean"},"deleteAssets":{"type":"boolean"},"approveAssets":{"type":"boolean"},"moveCollections":{"type":"boolean"}}}}}},"Assignee":{"type":"object","properties":{"assignedAt":{"type":"string","format":"date-time"},"assigneeId":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"assignerId":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"}}},"Auth":{"Auth":{"type":"object"}},"Collection":{"AssetCollection":{"type":"object","properties":{"_id":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"user":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"path":{"type":"string","example":"/root/SomeCollection"},"storageId":{"type":"string"}}},"Collection":{"type":"object","properties":{"_id":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"user":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"path":{"type":"string","example":"/SomeCollection"},"storageId":{"type":"string"},"hasChild":{"type":"boolean"},"permissions":{"type":"object","properties":{"upload":{"type":"boolean"},"websites":{"type":"boolean"},"createCollections":{"type":"boolean"},"editCollections":{"type":"boolean"},"deleteCollections":{"type":"boolean"},"downloadFiles":{"type":"boolean"},"editAssetFilename":{"type":"boolean"},"editAssetTitle":{"type":"boolean"},"editAssetDescription":{"type":"boolean"},"editAssetKeywords":{"type":"boolean"},"autogenerateKeywords":{"type":"boolean"},"editAssetCollections":{"type":"boolean"},"editAssetAssignees":{"type":"boolean"},"editAssetLinkedAssets":{"type":"boolean"},"editAssetMarks":{"type":"boolean"},"editAssetMetadata":{"type":"boolean"},"allowEditor":{"type":"boolean"},"deleteAssets":{"type":"boolean"},"approveAssets":{"type":"boolean"},"moveCollections":{"type":"boolean"}}},"name":{"type":"string","example":"SomeInnerCollection"},"sortType":{"type":"object","properties":{"type":{"type":"string"},"order":{"type":"string","enum":["asc","desc"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"user":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"}}}}},"CollectionWithWebsite":{"type":"object","properties":{"_id":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"user":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"path":{"type":"string","example":"/SomeCollection"},"storageId":{"type":"string"},"hasChild":{"type":"boolean"},"name":{"type":"string","example":"SomeInnerCollection"},"website":{"type":"object","description":"Fields the collection tree needs. Load the full website with GET /websites/:collectionId.","properties":{"_id":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"alias":{"type":"string","example":"show.pics.io/website"},"expiresAt":{"type":"string","format":"date-time"},"customGalleryTitle":{"type":"string","example":"Title"},"logoUrl":{"type":"string","example":"show.pics.io/logo.jpg"}}},"permissions":{"type":"object","properties":{"upload":{"type":"boolean"},"websites":{"type":"boolean"},"createCollections":{"type":"boolean"},"editCollections":{"type":"boolean"},"deleteCollections":{"type":"boolean"},"downloadFiles":{"type":"boolean"},"editAssetFilename":{"type":"boolean"},"editAssetTitle":{"type":"boolean"},"editAssetDescription":{"type":"boolean"},"editAssetKeywords":{"type":"boolean"},"autogenerateKeywords":{"type":"boolean"},"editAssetCollections":{"type":"boolean"},"editAssetAssignees":{"type":"boolean"},"editAssetLinkedAssets":{"type":"boolean"},"editAssetMarks":{"type":"boolean"},"editAssetMetadata":{"type":"boolean"},"allowEditor":{"type":"boolean"},"deleteAssets":{"type":"boolean"},"approveAssets":{"type":"boolean"},"moveCollections":{"type":"boolean"}}},"sortType":{"type":"object","properties":{"type":{"type":"string"},"order":{"type":"string","enum":["asc","desc"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"user":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"}}}}}},"Comment":{"Comment":{"type":"object","properties":{"_id":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"updatedAt":{"type":"string","format":"date-time"},"text":{"type":"string","description":"Text of the comment"},"userId":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"userDisplayName":{"type":"string"},"userEmail":{"type":"string"},"userAvatar":{"type":"string","description":"Link to the user avatar image"},"markers":{"type":"array","items":{"type":"object","required":["createdAt","number","x","y"],"properties":{"createdAt":{"type":"string","format":"date-time"},"number":{"type":"number","description":"Index number (starts from 1)"},"x":{"type":"number"},"x2":{"type":"number"},"y":{"type":"number"},"y2":{"type":"number"}}}},"reactions":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"displayName":{"type":"string","description":"User display name"},"value":{"type":"string","example":"+1"},"isGuest":{"type":"boolean"}}}}}},"AssetComment":{"type":"object","properties":{"_id":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"userId":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"text":{"type":"string","description":"Text of the comment"},"markers":{"type":"array","items":{"type":"object","required":["createdAt","number","x","y"],"properties":{"createdAt":{"type":"string","format":"date-time"},"number":{"type":"number","description":"Index number (starts from 1)"},"x":{"type":"number"},"x2":{"type":"number"},"y":{"type":"number"},"y2":{"type":"number"}}}},"reactions":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"displayName":{"type":"string","description":"User display name"},"value":{"type":"string","example":"+1"},"isGuest":{"type":"boolean"}}}}}}},"CustomField":{"CustomField":{"type":"object","properties":{"title":{"type":"string"},"order":{"type":"number"},"type":{"type":"string","enum":["enum","input","int","boolean","date","separator"]},"writable":{"type":"boolean"},"visibility":{"type":"string","enum":["visible","hidden","hidden_while_empty"]},"options":{"type":"array","description":"Only for type `enum`","items":{"type":"string"}},"description":{"type":"string"},"multiple":{"type":"boolean","description":"Only for type `enum`"}}}},"Keyword":{"Keyword":{"type":"object","properties":{"_id":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"usedAt":{"type":"string","format":"date-time"},"userId":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"path":{"type":"string","example":"→Some Keyword"},"name":{"type":"string","example":"Some Keyword"},"count":{"type":"number"},"isFavorite":{"type":"boolean"}}},"AssetKeyword":{"type":"object","properties":{"_id":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"usedAt":{"type":"string","format":"date-time"},"userId":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"path":{"type":"string","example":"→Some Keyword"},"isNew":{"type":"boolean"}}}},"Lightboard":{"AssetLightboard":{"type":"object","properties":{"_id":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"userId":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"path":{"type":"string","example":"→Some Lightboard"}}},"Lightboard":{"type":"object","properties":{"_id":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"userId":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"path":{"type":"string","example":"→Some Lightboard"},"name":{"type":"string","example":"Some Lightboard"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"sortType":{"type":"object","properties":{"type":{"type":"string"},"order":{"type":"string","enum":["desc","asc"]}}}}}},"LinkedAsset":{"LinkedAsset":{"type":"object","properties":{"_id":{"type":"string","example":"500000000000000000000001"},"userId":{"type":"string","example":"500000000000000000000001"},"createdAt":{"type":"string","example":"2012-12-31T11:15:17.678Z"},"pair":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string","example":"500000000000000000000001"},"name":{"type":"string","example":"example.jpg"}}}},"_pair":{"deprecated":true,"type":"string","example":"500000000000000000000001500000000000000000000002"}}}},"Login":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string","default":"user@mail.com"},"password":{"type":"string","default":"password"}}},"Permissions":{"CollectionPermissions":{"type":"object","properties":{"upload":{"type":"boolean"},"websites":{"type":"boolean"},"createCollections":{"type":"boolean"},"editCollections":{"type":"boolean"},"deleteCollections":{"type":"boolean"},"downloadFiles":{"type":"boolean"},"editAssetFilename":{"type":"boolean"},"editAssetTitle":{"type":"boolean"},"editAssetDescription":{"type":"boolean"},"editAssetKeywords":{"type":"boolean"},"autogenerateKeywords":{"type":"boolean"},"editAssetCollections":{"type":"boolean"},"editAssetAssignees":{"type":"boolean"},"editAssetLinkedAssets":{"type":"boolean"},"editAssetMarks":{"type":"boolean"},"editAssetMetadata":{"type":"boolean"},"allowEditor":{"type":"boolean"},"deleteAssets":{"type":"boolean"},"approveAssets":{"type":"boolean"},"moveCollections":{"type":"boolean"}}},"UserPermissions":{"type":"object","parameters":{"sync":{"type":"boolean"},"manageTeam":{"type":"boolean"},"manageIntegrations":{"type":"boolean"},"manageBilling":{"type":"boolean"},"manageStorage":{"type":"boolean"},"manageKeywords":{"type":"boolean"},"manageInboxes":{"type":"boolean"},"manageTeamSavedSearches":{"type":"boolean"},"editCustomFieldsSchema":{"type":"boolean"},"upload":{"type":"boolean"},"websites":{"type":"boolean"},"manageTags":{"type":"boolean"},"createCollections":{"type":"boolean"},"editCollections":{"type":"boolean"},"moveCollections":{"type":"boolean"},"deleteCollections":{"type":"boolean"},"downloadFiles":{"type":"boolean"},"editAssetFilename":{"type":"boolean"},"editAssetTitle":{"type":"boolean"},"editAssetDescription":{"type":"boolean"},"editAssetKeywords":{"type":"boolean"},"autogenerateKeywords":{"type":"boolean"},"editAssetCollections":{"type":"boolean"},"editAssetAssignees":{"type":"boolean"},"editAssetLinkedAssets":{"type":"boolean"},"editAssetMarks":{"type":"boolean"},"editAssetMetadata":{"type":"boolean"},"allowEditor":{"type":"boolean"},"deleteAssets":{"type":"boolean"},"approveAssets":{"type":"boolean"},"manageAssetRestrictSettings":{"type":"boolean"},"restrictedDownload":{"type":"boolean"},"restrictedApprove":{"type":"boolean"},"restrictedChangeMetadata":{"type":"boolean"},"restrictedMoveOrDelete":{"type":"boolean"},"accessAuditTrail":{"type":"boolean"},"viewArchive":{"type":"boolean"},"manageArchive":{"type":"boolean"},"downloadArchive":{"type":"boolean"},"deleteArchive":{"type":"boolean"}}}},"Revision":{"Revision":{"type":"object","properties":{"id":{"type":"string"},"md5Checksum":{"type":"string"},"key":{"type":"string","description":"Only for s3"},"modifiedTime":{"type":"string","format":"date-time"},"originalFilename":{"type":"string"},"size":{"type":["string","number"]},"keepForever":{"type":"boolean","description":"Only for Google Drive"},"mimeType":{"type":"string","description":"Only for Google Drive"},"technical":{"type":"boolean","description":"Only for s3"},"uploader":{"type":"object","properties":{"displayName":{"type":"string"}}}}},"AssetRevision":{"type":"object","properties":{"revisionId":{"type":"string"},"userId":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"}}}},"Search":{"type":"object","properties":{"from":{"type":"number","default":0,"description":"A cursor for use in pagination. Defines initial place in the list to return assets from"},"size":{"type":"number","default":50,"description":"A limit on the number of assets to be returned. Keep it below 50."},"tagId":{"type":"string","description":"Collection id to recursively search in"},"inboxId":{"type":"string","description":"Inbox id to recursively search in"},"lightboardId":{"type":"string","description":"Lightboard id to recursively search in"},"type":{"type":"string","description":"Filter assets by type","example":"images","enum":["images","video","audio","text","pdf","sketch","raw","photoshop"]},"text":{"type":"string","description":"Text query to search. Search fields managed by `searchIn` parameter","example":"my text to search"},"searchIn":{"description":"Specifies field to search `text` at ","type":"string","example":"name,title,description,keywords,meta,content,tagName","default":"All fields","enum":["name","title","description","keywords","meta","content","tagName"]},"flag":{"description":"Filter assets by flag","type":"string","enum":["flagged","unflagged","rejected"],"example":"flagged"},"rating":{"description":"Filter assets by stars rating","type":"number","example":5},"color":{"description":"Filter assets by color","type":"string","enum":["yellow","orange","red","green","aqua","blue","purple","nocolor"],"example":"green"},"createdAt":{"description":"Search by creation date. May be of predefined aliases or specific range\n\n                  Custom date format is similar to HTTP Range header `/^([-0-9]*)_([-0-9]*)$/)`. \n                  Contains of two timestamps (milliseconds) separated by underscode symbol.\n                  Any timestamp can be postponed to allow specify 'before' and 'after' date ranges.  \n\n                  Using alias: `createdAt: today`  \n                  Between two dates: `createdAt: 1450650500000_1460650500000`  \n                  After date: `createdAt: 1450650500000_`  \n                  Before date: `createdAt: _1460650500000`\n","type":"string","enum":["today","yesterday","lastweek","lastmonth","last90days","custom"],"example":"1450650500000_1460650500000"},"productSelection":{"description":"Scope the search to an explicit bulk selection of Toriut product/variant records (Toriut only).\n\n                  An asset is returned when it is linked to ANY selected product OR ANY selected variant,\n                  and each asset is returned once no matter how many selected records it is attached to.\n                  `total` therefore counts unique assets, not product-media associations.\n\n                  The scope comes from the ids passed here, never from the current product search query,\n                  filters or page. `layer` and `recordState` are single-valued, so a selection cannot\n                  span two channels or mix draft with published records.\n\n                  Combined `productIds` + `variantIds` length is capped (50000 by default,\n                  `middlewares.assetsSearch.maxProductSelectionItems`). An empty selection is rejected.\n","type":"object","required":["layer"],"properties":{"layer":{"description":"Product data layer the selection belongs to: the literal `master`, or a salesChannelId","type":"string","example":"master"},"recordState":{"description":"Record state within a channel layer. Required when `layer` is a salesChannelId, forbidden for `master`","type":"string","enum":["draft","published"],"example":"draft"},"productIds":{"description":"Selected master product or listing ids. At least one of `productIds` / `variantIds` is required","type":"array","items":{"type":"string"},"example":["6a27eb2b4ee225366f4657c3"]},"variantIds":{"description":"Selected master variant or listing variant ids","type":"array","items":{"type":"string"},"example":["6a27eb2b4ee225366f4657e5"]}}}}},"Website":{"Website":{"type":"object","properties":{"_id":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"userId":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"},"aboutShow":{"type":"boolean","example":true},"actionConsentEnable":{"type":"boolean","example":false},"actionConsentMessage":{"type":"string","example":"Consent message"},"actionConsentTitle":{"type":"string","example":"Are you sure?"},"alias":{"type":"string","example":"show.pics.io/website"},"avatarUrl":{"type":"string","example":"show.pics.io/avatar.jpg"},"backgroundLoginPageUrl":{"type":"string","example":"show.pics.io/background.jpg"},"blogLinkShow":{"type":"boolean","example":false},"color":{"type":"boolean","example":false},"colorShow":{"type":"boolean","example":false},"comment":{"type":"boolean","example":false},"commentShow":{"type":"boolean","example":false},"hideInternalComments":{"type":"boolean","example":false},"contactsShow":{"type":"boolean","example":true},"customFieldsShow":{"type":"boolean","example":false},"customGalleryTitle":{"type":"string","example":"Title"},"descriptionEditable":{"type":"boolean","example":false},"descriptionShow":{"type":"boolean","example":false},"download":{"type":"boolean","example":true},"downloadLinkShow":{"type":"boolean","example":true},"downloadSingleFile":{"type":"boolean","example":true},"downloadAsOriginalOnly":{"type":"boolean","example":false},"emailEventTypes":{"type":"array","example":[]},"emailShow":{"type":"boolean","example":false},"emails":{"type":"array","example":[]},"fbLinkShow":{"type":"boolean","example":false},"fileNameShow":{"type":"boolean","example":false},"flag":{"type":"boolean","example":false},"flagShow":{"type":"boolean","example":false},"googleAnalyticsIdentifier":{"type":"string","example":""},"instagramLinkShow":{"type":"boolean","example":false},"keywordsEditable":{"type":"boolean","example":false},"keywordsShow":{"type":"boolean","example":false},"logoUrl":{"type":"string","example":"show.pics.io/logo.jpg"},"noFollow":{"type":"boolean","example":false},"noIndex":{"type":"boolean","example":false},"overridedDisplayName":{"type":"string","example":"Name"},"overridedTagname":{"type":"string","example":"Name"},"phoneShow":{"type":"boolean","example":false},"rating":{"type":"boolean","example":false},"ratingShow":{"type":"boolean","example":false},"revisionsShow":{"type":"boolean","example":false},"searchShow":{"type":"boolean","example":false},"sharingButtonsShow":{"type":"string","example":""},"showFlagged":{"type":"boolean","example":false},"tagsTreeShow":{"type":"boolean","example":false},"unfoldAllCollections":{"type":"boolean","example":false},"template":{"type":"string","example":"oldFashionBlack","enum":["default","oldFashion","oldFashionBlack","nasa","mosaic","metro","antique","square","space","simple","lumiere","lumiereBlack"]},"titleEditable":{"type":"boolean","example":false},"titleShow":{"type":"boolean","example":false},"twitterLinkShow":{"type":"boolean","example":false},"visitingConsentEnable":{"type":"boolean","example":false},"visitingConsentMessage":{"type":"string","example":"Consent message"},"visitingConsentTitle":{"type":"string","example":"Are you sure?"},"websiteFileNameShow":{"type":"boolean","example":false},"websiteDescriptionShow":{"type":"boolean","example":false},"sortType":{"type":"object","properties":{"type":{"type":"string"},"order":{"type":"string","enum":["asc","desc"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"user":{"type":"string","example":"xxxxxxxxxxxxxxxxxxxxxxxx"}}}}}}}},"paths":{"/websites/{collectionId}":{"put":{"summary":"Update website","tags":["Websites"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"collectionId","in":"path","type":"string","format":"/^[0-9a-fA-F]{24}$/","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"alias":{"type":"string","required":true},"template":{"type":"string","description":"Template","enum":["default","oldFashion","oldFashionBlack","nasa","mosaic","metro","antique","square","space","simple","lumiere","lumiereBlack"]},"emails":{"type":"array"},"download":{"type":"boolean"},"password":{"type":"string"},"revisionsShow":{"type":"boolean"},"actionConsentEnable":{"type":"boolean"},"actionConsentMessage":{"type":"string"},"actionConsentTitle":{"type":"string"},"commentShow":{"type":"boolean"},"hideInternalComments":{"type":"boolean"},"comment":{"type":"boolean"},"titleShow":{"type":"boolean"},"titleEditable":{"type":"boolean"},"descriptionShow":{"type":"boolean"},"descriptionEditable":{"type":"boolean"},"customFieldsShow":{"type":"boolean"},"searchShow":{"type":"boolean"},"fileNameShow":{"type":"boolean"},"flagShow":{"type":"boolean"},"flag":{"type":"boolean"},"ratingShow":{"type":"boolean"},"rating":{"type":"boolean"},"colorShow":{"type":"boolean"},"color":{"type":"boolean"},"tagsTreeShow":{"type":"boolean"},"unfoldAllCollections":{"type":"boolean"},"logoUrl":{"type":"string"},"avatarUrl":{"type":"string"},"backgroundLoginPageUrl":{"type":"string"},"baseColor":{"type":"string"},"fbLinkShow":{"type":"boolean"},"twitterLinkShow":{"type":"boolean"},"instagramLinkShow":{"type":"boolean"},"phoneShow":{"type":"boolean"},"emailShow":{"type":"boolean"},"blogLinkShow":{"type":"boolean"},"showFlagged":{"type":"boolean"},"websiteFileNameShow":{"type":"boolean"},"websiteDescriptionShow":{"type":"boolean"},"aboutShow":{"type":"boolean"},"contactsShow":{"type":"boolean"},"downloadLinkShow":{"type":"boolean"},"downloadSingleFile":{"type":"boolean"},"downloadAsOriginalOnly":{"type":"boolean"},"sharingButtonsShow":{"type":"string"},"googleAnalyticsIdentifier":{"type":"string"},"customGalleryTitle":{"type":"string"},"noFollow":{"type":"boolean"},"noIndex":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}},"delete":{"summary":"Unpublish website","tags":["Websites"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"collectionId","in":"path","type":"string","format":"/^[0-9a-fA-F]{24}$/","required":true}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}},"post":{"summary":"Publish collection as a website","tags":["Websites"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"collectionId","in":"path","type":"string","format":"/^[0-9a-fA-F]{24}$/","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"alias":{"type":"string","required":true},"template":{"type":"string","description":"Template","enum":["default","oldFashion","oldFashionBlack","nasa","mosaic","metro","antique","square","space","simple","lumiere","lumiereBlack"]},"emails":{"type":"array"},"download":{"type":"boolean"},"password":{"type":"string"},"revisionsShow":{"type":"boolean"},"actionConsentEnable":{"type":"boolean"},"actionConsentMessage":{"type":"string"},"actionConsentTitle":{"type":"string"},"commentShow":{"type":"boolean"},"hideInternalComments":{"type":"boolean"},"comment":{"type":"boolean"},"titleShow":{"type":"boolean"},"titleEditable":{"type":"boolean"},"descriptionShow":{"type":"boolean"},"descriptionEditable":{"type":"boolean"},"customFieldsShow":{"type":"boolean"},"searchShow":{"type":"boolean"},"fileNameShow":{"type":"boolean"},"flagShow":{"type":"boolean"},"flag":{"type":"boolean"},"ratingShow":{"type":"boolean"},"rating":{"type":"boolean"},"colorShow":{"type":"boolean"},"color":{"type":"boolean"},"tagsTreeShow":{"type":"boolean"},"unfoldAllCollections":{"type":"boolean"},"logoUrl":{"type":"string"},"avatarUrl":{"type":"string"},"backgroundLoginPageUrl":{"type":"string"},"baseColor":{"type":"string"},"fbLinkShow":{"type":"boolean"},"twitterLinkShow":{"type":"boolean"},"instagramLinkShow":{"type":"boolean"},"phoneShow":{"type":"boolean"},"emailShow":{"type":"boolean"},"blogLinkShow":{"type":"boolean"},"showFlagged":{"type":"boolean"},"websiteFileNameShow":{"type":"boolean"},"websiteDescriptionShow":{"type":"boolean"},"aboutShow":{"type":"boolean"},"contactsShow":{"type":"boolean"},"downloadLinkShow":{"type":"boolean"},"downloadSingleFile":{"type":"boolean"},"downloadAsOriginalOnly":{"type":"boolean"},"sharingButtonsShow":{"type":"string"},"googleAnalyticsIdentifier":{"type":"string"},"customGalleryTitle":{"type":"string"},"noFollow":{"type":"boolean"},"noIndex":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/Website"}}}}}}},"/login":{"post":{"summary":"Sign in with email and password","description":"Authenticates a user using email and password credentials and returns a pair of access and refresh tokens for subsequent API calls.","x-picsio-rate-limit":false,"x-picsio-api-tests":true,"x-picsio-permissions":"no team permissions required","tags":["Auth","PT-2026Q1"],"consumes":["application/json"],"parameters":[{"in":"header","name":"X-Picsio-App-Id","description":"Pics.io app id","required":true,"type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}}},"responses":{"200":{"description":"In the response you will receive field named `tokens` than contains `accessToken` and `refreshToken`. Access token has limited lifetime, after invalidation you need to refresh tokens using `refreshToken`"}}}},"/users/refreshToken":{"post":{"tags":["Auth"],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["refreshToken"],"properties":{"refreshToken":{"type":"string"}}}}}},"responses":{"200":{"description":"Ok"}}}},"/logout":{"post":{"tags":["Auth"],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["refreshToken"],"properties":{"refreshToken":{"type":"string"}}}}}},"responses":{"200":{"description":"Ok"}}}},"/products/csvSchema":{"get":{"summary":"Get products CSV column schema","description":"Returns the canonical CSV column schema (locked system columns, media columns, built-in fields, and the team's custom attributes) used by both POST /products/exportCSV and POST /products/batchImport column mapping.","x-picsio-rate-limit":true,"x-picsio-api-tests":false,"x-picsio-permissions":"no team permissions required","tags":["Products","PCS-11321"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"number"},"columns":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"}},"scope":{"type":"string","enum":["product","variant","shared"]},"kind":{"type":"string","enum":["system","media","builtin","custom","option"]},"type":{"type":"string"},"part":{"type":"string","enum":["value","unit","currency"]},"attributeTitle":{"type":"string"},"locked":{"type":"boolean"},"cellBehaviors":{"type":"array","items":{"type":"string"}}}}}}}}}}}}},"/products/aggregatedDetails":{"post":{"summary":"Get aggregated Product / Variant details for a bulk selection","description":"Accepts either explicit record ids (`items`, up to 50000) or the current products search (`query`). Ids are loaded from the database in chunks with a field projection. Select All must send `query` (the same body as POST /products/search). Optional `recordState` (`draft` or `published`) forces that catalog layer: Has published reads each record's live snapshot and Has draft reads the working copy, even when stored listingStatus values differ. Without `recordState`, the layer is inferred from the documents and mixed Draft/Published statuses are rejected. Same values become state=common; differing or partially empty values become state=multiple; all-empty becomes state=empty. Missing/deleted ids are listed in selection.missing. Incompatible mixed contexts are rejected. Published aggregation uses each record's live snapshot and is read-only.","x-picsio-rate-limit":true,"x-picsio-api-tests":false,"x-picsio-permissions":"no team permissions required","tags":["Products","PCS-11332"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["master","channel"]},"items":{"type":"array","minItems":1,"maxItems":50000,"items":{"type":"string"}},"query":{"type":"object"},"recordState":{"type":"string","enum":["draft","published"]}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"context":{"type":"object"},"selection":{"type":"object"},"product":{"type":"object"},"variant":{"type":"object"},"editable":{"type":"boolean"},"productsHaveVariants":{"type":"boolean"}}}}}},"400":{"description":"Selection contains records from incompatible contexts","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"404":{"description":"Product not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"409":{"description":"Can not get aggregated product details","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}},"/products/exportCSV":{"post":{"summary":"Export selected products and variants as CSV","description":"Exports the given Master Product / Master Variant ids as a CSV. Reads product documents, custom-attribute schema, and linked assets from the database. Scope is recordIds only — there is no search-query export. Media cells use preview URLs joined by `;`. Toriut Record ID and SKU are always included. Parent SKU, Toriut Parent Record ID, and Product Option columns are included only when the selection contains at least one Master Variant. A non-empty `fields` array is validated against the export-time schema; unrecognized keys return 400 and no CSV.","x-picsio-rate-limit":true,"x-picsio-api-tests":false,"x-picsio-permissions":"batchImportProducts","tags":["Products","PCS-11321"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["recordIds"],"properties":{"recordIds":{"type":"array","minItems":1,"maxItems":50000,"items":{"type":"string"}},"fields":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Ok","content":{"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Over-limit recordIds (subcode: ProductsExportCsvLimitExceededApiError), missing/invalid recordIds, or fields contains keys that are not in the export-time CSV schema","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"msg":{"type":"string"},"subcode":{"type":"string"}}}}}},"409":{"description":"Can not export products CSV","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}},"/productVendors/{productVendorId}":{"put":{"summary":"Rename vendor","description":"Renames a vendor registry entry and propagates the new title onto the team master products and listing draft overrides holding the old title. Published live snapshots are retained.","x-picsio-rate-limit":true,"x-picsio-api-tests":false,"x-picsio-permissions":"productDataManagement","tags":["ProductVendors","PT-2026Q1"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"productVendorId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string"}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}},"404":{"description":"Vendor not found"},"409":{"description":"Vendor already exists"}}},"delete":{"summary":"Delete vendor","description":"Deletes a vendor registry entry and clears its title from the team master products and listing draft overrides. Published live snapshots are retained.","x-picsio-rate-limit":true,"x-picsio-api-tests":false,"x-picsio-permissions":"productDataManagement","tags":["ProductVendors","PT-2026Q1"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"productVendorId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"}}}}}},"404":{"description":"Vendor not found"}}}},"/productVendors":{"get":{"summary":"List vendors","description":"Returns the team vendor registry (the autocomplete pick-list), sorted by title. Supports an optional typed-text `search` plus offset pagination (`from`/`size`).","x-picsio-rate-limit":true,"x-picsio-api-tests":false,"x-picsio-permissions":"no team permissions required","tags":["ProductVendors","PT-2026Q1"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Typed text; keeps vendors whose value contains it (case/space-insensitive)."},{"name":"from","in":"query","required":false,"schema":{"type":"integer","minimum":0},"description":"Pagination offset."},{"name":"size","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200},"description":"Page size (default 50)."}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}}}}},"post":{"summary":"Create vendor","description":"Creates a vendor registry entry for the team. Title is unique per team (case/whitespace-insensitive).","x-picsio-rate-limit":true,"x-picsio-api-tests":false,"x-picsio-permissions":"productDataManagement","tags":["ProductVendors","PT-2026Q1"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string"}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}},"409":{"description":"Vendor already exists"}}}},"/productTypes/{productTypeId}":{"put":{"summary":"Rename product type","description":"Renames a product-type registry entry and propagates the new title onto the team master products holding the old title. Listings are untouched.","x-picsio-rate-limit":true,"x-picsio-api-tests":false,"x-picsio-permissions":"productDataManagement","tags":["ProductTypes","PT-2026Q1"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"productTypeId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string"}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}},"404":{"description":"Product type not found"},"409":{"description":"Product type already exists"}}},"delete":{"summary":"Delete product type","description":"Deletes a product-type registry entry and clears its title from the team master products. Listings keep their own copy.","x-picsio-rate-limit":true,"x-picsio-api-tests":false,"x-picsio-permissions":"productDataManagement","tags":["ProductTypes","PT-2026Q1"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"productTypeId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"}}}}}},"404":{"description":"Product type not found"}}}},"/productTypes":{"get":{"summary":"List product types","description":"Returns the team product-type registry (the UI pick-list), sorted by title.","x-picsio-rate-limit":true,"x-picsio-api-tests":false,"x-picsio-permissions":"no team permissions required","tags":["ProductTypes","PT-2026Q1"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}}}}},"post":{"summary":"Create product type","description":"Creates a product-type registry entry for the team. Title is unique per team (case-sensitive).","x-picsio-rate-limit":true,"x-picsio-api-tests":false,"x-picsio-permissions":"productDataManagement","tags":["ProductTypes","PT-2026Q1"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string"}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}},"409":{"description":"Product type already exists"}}}},"/productAttributes":{"post":{"summary":"Update product attributes","description":"Updates one or more product attributes. Scope is required and immutable after creation.","x-picsio-rate-limit":true,"x-picsio-api-tests":false,"x-picsio-permissions":"manageProductCustomFields","tags":["ProductAttributes","PT-2026Q1"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["customFields"],"properties":{"customFields":{"type":"array","items":{"type":"object","required":["title","type","order","visibility","writable","scope"],"properties":{"title":{"type":"string"},"type":{"type":"string"},"order":{"type":"number"},"visibility":{"type":"string"},"writable":{"type":"boolean"},"scope":{"type":"string","enum":["product","variant"]}}}}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"}}}}}}},"get":{"summary":"Get product attributes schema","description":"Returns the team product attributes schema. Fields without scope include a schemaWarnings array.","x-picsio-rate-limit":true,"x-picsio-api-tests":false,"x-picsio-permissions":"no team permissions required","tags":["ProductAttributes","PT-2026Q1"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"type":{"type":"string"},"scope":{"type":"string","enum":["product","variant"]},"order":{"type":"number"},"visibility":{"type":"string"},"writable":{"type":"boolean"}}}},"schemaWarnings":{"type":"array","items":{"type":"string"}}}}}}}}},"delete":{"summary":"Delete product attribute","description":"Deletes a product attribute identified by title and scope.","x-picsio-rate-limit":true,"x-picsio-api-tests":false,"x-picsio-permissions":"manageProductCustomFields","tags":["ProductAttributes","PT-2026Q1"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["customField"],"properties":{"customField":{"type":"object","required":["title","scope"],"properties":{"title":{"type":"string"},"scope":{"type":"string","enum":["product","variant"]}}}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object"}}}}}},"put":{"summary":"Create product attribute","description":"Creates a product or variant scoped attribute in the team schema.","x-picsio-rate-limit":true,"x-picsio-api-tests":false,"x-picsio-permissions":"manageProductCustomFields","tags":["ProductAttributes","PT-2026Q1"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["customField"],"properties":{"customField":{"type":"object","required":["title","type","order","visibility","writable","scope"],"properties":{"title":{"type":"string"},"type":{"type":"string"},"order":{"type":"number"},"visibility":{"type":"string"},"writable":{"type":"boolean"},"scope":{"type":"string","enum":["product","variant"]}}}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/linkedAssets/unlinkFrom/{assetId}":{"post":{"summary":"Unlink all assets from specified asset","tags":["LinkedAssets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"assetId","in":"path","type":"string","format":"/^[0-9a-fA-F]{24}$/","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{"200":{"description":"Ok"}}}},"/linkedAssets/unlink":{"post":{"summary":"Unlinks assets from each other","tags":["LinkedAssets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["assetIds"],"properties":{"assetIds":{"type":"array","items":{"type":"string","format":"/^[0-9a-fA-F]{24}$/"}}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","description":"Unlinked assets count"}}}}}}}}},"/linkedAssets/link":{"post":{"summary":"Link assets together","tags":["LinkedAssets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["assetIds"],"properties":{"assetIds":{"type":"array","items":{"type":"string","format":"/^[0-9a-fA-F]{24}$/"}}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LinkedAsset"}}}}}}}},"/linkedAssets/fetch":{"post":{"summary":"Fetch linked assets","tags":["LinkedAssets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["assetIds"],"properties":{"assetIds":{"type":"array","items":{"type":"string","format":"/^[0-9a-fA-F]{24}$/"}}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string","format":"/^[0-9a-fA-F]{24}$/"},"name":{"type":"string"},"linkedAssets":{"type":"array","items":{"$ref":"#/components/schemas/LinkedAsset"}}}}}}}}}}},"/keywords/rename/{keywordId}":{"put":{"summary":"Rename keyword","tags":["Keywords"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"keywordId","in":"path","type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}},"/keywords/deleteKeywords":{"post":{"summary":"Delete multiple keywords","tags":["Keywords"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["keywordIds"],"properties":{"keywordIds":{"type":"array","items":{"type":"string"},"example":["5faab088a101a761ac66b06d","5faab088a101a761ac66b06e"],"description":"Keywords ids to remove"}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"keywordIds":{"type":"array","items":{"type":"string"},"example":["5faab088a101a761ac66b06d","5faab088a101a761ac66b06e"],"description":"Removed keyword ids"}}}}}}}}},"/keywords/delete/{keywordId}":{"delete":{"summary":"Delete keyword","tags":["Keywords"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"keywordId","in":"path","type":"string"}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}},"/keywords/{keywordsIds}":{"get":{"summary":"Get keywords by ids","tags":["Keywords"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"keywordsIds","in":"path","type":"string","description":"Keywords ids separated by comma"}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Keyword"}}}}}}}},"/keywords":{"get":{"summary":"Search for keywords","tags":["Keywords"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"query","in":"query","schema":{"type":"string"},"description":"Search query"},{"name":"from","in":"query","schema":{"type":"integer"},"description":"The number of keywords to skip, 0 by default"},{"name":"size","in":"query","schema":{"type":"integer"},"description":"The number of keywords to return, 100 by default"},{"name":"sortType","in":"query","schema":{"type":"string","enum":["name","createdAt","count","relevance"]},"description":"Sort type, by default type settled in the application or \"name\""},{"name":"sortOrder","in":"query","schema":{"type":"string","enum":["asc","desc"]},"description":"Sort order, by default order settled in the application or \"asc\""},{"name":"returnFavorites","in":"query","schema":{"type":"boolean"},"description":"Return favorites for first page, \"false\" by default"},{"name":"returnChildren","in":"query","schema":{"type":"boolean"},"description":"Return children for found keywords, \"false\" by default"}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Keyword"}}}}}}}},"/keywords/detach/{keywordId}":{"put":{"summary":"Detach keyword from assets","description":"For authenticated requests, detaches the selected keyword and any of its descendants present on the selected assets. The response lists every keyword that was detached.","tags":["Keywords","Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"keywordId","in":"path","type":"string","format":"/^[0-9a-fA-F]{24}$/","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetIds":{"type":"array","items":{"type":"string"},"required":true}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"hasNotPermittedAssets":{"type":"boolean"},"detachedKeywordIds":{"type":"array","items":{"type":"string"},"description":"Every keyword actually detached, including descendants of the requested keyword."},"detachments":{"type":"array","description":"Keywords removed from each asset. An asset is omitted when it did not have the requested keyword.","items":{"type":"object","properties":{"assetId":{"type":"string"},"keywordIds":{"type":"array","items":{"type":"string"}}}}}}}}}}}}},"/keywords/add":{"post":{"summary":"Add keyword","tags":["Keywords"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"parentId":{"type":"string"}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Keyword"}}}},"400":{"description":"Invalid parentId format or keyword already exists","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"}}}}}},"404":{"description":"Parent keyword not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"msg":{"type":"string"},"subcode":{"type":"string"}}}}}}}}},"/keywords/attach":{"put":{"summary":"Attach keyword to assets","tags":["Keywords","Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name","assetIds"],"properties":{"name":{"type":"string","description":"Keyword name"},"assetIds":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Keyword"}}}}}}}},"/customFieldsValue/batch":{"put":{"summary":"Update/add custom field value on assets","tags":["Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["images","title","type","value"],"properties":{"images":{"type":"array","items":{"type":"string","description":"Ids of assets"}},"title":{"type":"string","description":"Title of the custom field"},"type":{"type":"string","description":"Type of the custom field"},"value":{"type":"string","description":"Value of the custom field, depends on custom field type"}}}}}},"responses":{"200":{"description":"Ok"}}}},"/customFields/update":{"post":{"summary":"Update custom field","tags":["CustomFields"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["customField"],"properties":{"force":{"type":"boolean","description":"‼️ Skip checking for changing type of custom field, if type changed -> custom field will be removed from all assets (use with caution)"},"customFields":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["enum","input","int","boolean","date","separator"]},"title":{"type":"string","description":"Use Latin characters, do not put spaces and punctuation"},"description":{"type":"string"},"order":{"type":"number"},"visibility":{"type":"string","enum":["visible","hidden","hidden_while_empty"]},"writable":{"type":"boolean"},"multiple":{"type":"boolean","description":"Only for type `enum`"},"options":{"type":"array","description":"Only for type `enum`","items":{"type":"string"}}}}}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomField"}}}}}}},"/customFields":{"get":{"summary":"Get all custom fields","tags":["CustomFields"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"}}}}}}},"delete":{"summary":"Delete custom field","tags":["CustomFields"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["customField"],"properties":{"customField":{"type":"object","properties":{"title":{"type":"string","description":"Title of the custom field to delete"}}}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"}}}}}}}},"put":{"summary":"Create custom field","tags":["CustomFields"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["customField"],"properties":{"customField":{"type":"object","properties":{"type":{"type":"string","enum":["enum","input","int","boolean","date","separator"]},"title":{"type":"string","description":"Use Latin characters, do not put spaces and punctuation"},"description":{"type":"string"},"order":{"type":"number"},"visibility":{"type":"string","enum":["visible","hidden","hidden_while_empty"]},"writable":{"type":"boolean"},"multiple":{"type":"boolean","description":"Only for type `enum`"},"options":{"type":"array","description":"Only for type `enum`","items":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomField"}}}}}}},"/collections/search":{"get":{"summary":"Search for collections","description":"Finds collections whose name (last path segment) or description contains the query as a case-insensitive substring. Prefer `q` so `/` and `%` stay in the query string; `GET /collections/search/{query}` remains for the web UI. Name matching is limited to the last path segment. Description matching is a substring (e.g. europ matches European). Both queries use a slim projection. `hasChild` is computed at read time from direct children. When `limit` is set, Mongo sorts by last path segment and applies skip/limit; the response is `{ collections, total, offset, limit, has_more, archived_included }`. Without `limit` the response stays a full array for the web UI. `archived=all` is silently treated as `false` when the caller cannot view archives, and `archived_included` on the page wrapper reports the effective inclusion rather than the requested one. `archived=true` without archive access fails. Results are limited to collections the caller can access. Reads from MongoDB.","tags":["Collections"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"x-picsio-api-tests":true,"x-picsio-permissions":"collections the caller can access","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Free-text query matched against collection name and description. Use this instead of the path parameter when the text contains `/` or `%`."},{"name":"archived","in":"query","schema":{"type":"string","enum":["true","false","all"]},"description":"`true` returns only archived collections. `all` includes live and archived, but is silently treated as excluded when the caller cannot view archives. Omitted or `false` excludes archived."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Page size. When set, the response is a page wrapper instead of a bare array."},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0},"description":"Number of matches to skip. Used only with `limit`."}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/Collection"}},{"type":"object","properties":{"collections":{"type":"array","items":{"$ref":"#/components/schemas/Collection"}},"total":{"type":"integer"},"offset":{"type":"integer"},"limit":{"type":"integer"},"has_more":{"type":"boolean"},"archived_included":{"type":"boolean","description":"Effective archive inclusion for this page. `false` when `archived=all` was downgraded because the caller cannot view archives."}}}]}}}},"500":{"description":"Collection search error","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"}}}}}}}}},"/collections/{collectionId}/sync":{"post":{"summary":"Run collection sync (subtree of first level)","tags":["Collections"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"collectionId","in":"path","type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"strategy":{"type":"string","enum":["subtree","firstLevel"]}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}},"/collections/rename/{collectionId}":{"put":{"summary":"Rename collection","tags":["Collections"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"collectionId","in":"path","type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}}}}},"/collections/{collectionId}":{"delete":{"summary":"Delete collection","tags":["Collections"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"collectionId","in":"path","type":"string"}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean"},"msg":{"type":"string"}}}}}}}},"get":{"summary":"Get collection children","tags":["Collections"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"collectionId","in":"path","type":"string","required":true}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Collection"}}}}}}}},"/collections/websites":{"get":{"summary":"Get collections that are web sites","tags":["Collections"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"nodes":{"type":"array","items":{"type":"object","$ref":"#/components/schemas/CollectionWithWebsite"}}}}}}}}}},"/collections/root":{"get":{"summary":"Get root collection","tags":["Collections"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}}}}},"/collections/":{"post":{"summary":"Create collection","tags":["Collections"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"parentId":{"type":"string","example":"55d3b3526fb3a60622000000","description":"Parent collection id"},"name":{"type":"string","example":"My Collection","description":"New collection name"}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Collection"}}}}}}}},"/images/sync":{"post":{"summary":"Sync a single storage object into Pics.io","description":"Reconciles one storage object (by storageId) with Pics.io","x-picsio-rate-limit":true,"x-picsio-api-tests":false,"x-picsio-permissions":"requires sync team permission","tags":["Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["storageId"],"properties":{"storageId":{"type":"string","description":"Storage object id to reconcile with Pics.io. For S3 this is the object ARN relative to bucket root without s3:// prefix and without bucket name (\"folder/subfolder/file-to-sync.jpg\")."}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","required":["action"],"properties":{"action":{"type":"string","enum":["created","updated","unchanged","notFound","skipped"]},"asset":{"type":"object","description":"Present for created/updated/unchanged actions"},"reason":{"type":"string","description":"Present for skipped actions (e.g. blacklistedExtension)"},"storageId":{"type":"string","description":"Present for skipped actions"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"msg":{"type":"string"},"subcode":{"type":"string","description":"Typed error name, e.g. InvalidValidationError"}}}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"}}}}}}}}},"/images/setTitle":{"put":{"summary":"Set title for assets","tags":["Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","value"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"value":{"type":"string"}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}},"/images/setRating":{"put":{"summary":"Set rating for assets","tags":["Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","value"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"value":{"type":"number"}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}},"/images/setFlag":{"put":{"summary":"Set flag for assets","tags":["Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","value"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"value":{"type":"string","enum":["rejected","unflagged","flagged"]}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}},"/images/setDescription":{"put":{"summary":"Set description for assets","tags":["Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","value"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"value":{"type":"string"}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}},"/images/setColor":{"put":{"summary":"Set color for assets","tags":["Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","value"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"value":{"type":"string","enum":["red","yellow","green","blue","purple","nocolor"]}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}},"/images/search":{"post":{"summary":"Search for assets","tags":["Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Search"}}}},"responses":{"200":{"description":"Ok"},"400":{"description":"Invalid search query, or a `productSelection` that is empty, over the selection limit, or mixes incompatible contexts"}}}},"/images/{assetId}/rename":{"put":{"summary":"Rename asset","tags":["Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"assetId","in":"path","type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":"name","properties":{"name":{"type":"string"}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Asset"}}}}}}},"/images/import/csv":{"post":{"summary":"Import metadata from CSV file","tags":["Assets","CustomFields"],"security":[{"bearerAuth":[]}],"consumes":["multipart/form-data"],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"background":{"type":"boolean"},"updatedAssetsCount":{"type":"integer"},"invalidRowsCount":{"type":"integer"},"downloadUrl":{"type":"string"}}}}}}}}},"/images/getAssets":{"post":{"summary":"Get assets by ids","tags":["Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["assetIds"],"properties":{"assetIds":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Ok"}}}},"/images/fetchThumbnails":{"post":{"summary":"Get thumbnails for assets by asset ids","tags":["Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["assetIds"],"properties":{"assetIds":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"mimeType":{"type":"string"},"trashed":{"type":"boolean"},"thumbnailLink":{"type":"string"}}}}}}}}}},"/batch/assets/removeCollection":{"post":{"summary":"Detach assets from collection","tags":["Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","collectionId"],"properties":{"ids":{"type":"array","required":true,"items":{"type":"string"}},"collectionId":{"type":"string","required":true}}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}},"/images/delete":{"delete":{"summary":"Permanently delete assets","tags":["Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["assetIds"],"properties":{"assetIds":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}},"/images":{"post":{"summary":"Create asset in Pics.io","tags":["Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["additionalFields","assetData"],"properties":{"additionalFields":{"type":"object","properties":{"assigneeIds":{"type":"array","items":{"type":"string"}},"keywordsIds":{"type":"array","items":{"type":"string"}},"color":{"type":"string","enum":["red","yellow","green","blue","purple","nocolor"]},"comment":{"type":"string"},"rating":{"type":"number"},"title":{"type":"string"},"description":{"type":"string"},"flag":{"type":"string","enum":["rejected","unflagged","flagged"]}}},"assetData":{"type":"object","description":"All data that returns in response while upload file + storageId","properties":{"storageId":{"type":"string","description":"id field that returns in response while upload file"},"name":{"type":"string"},"fileSize":{"type":"number"},"tags":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string","description":"collection id to attach"}},"description":"Collections to attach, if asset uploaded to the Root collection -> don't use this field"}}}}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Asset"}}}}}}},"/images/completeS3Multipart":{"post":{"summary":"Complete multipart upload (S3 storage only)","description":"Completes a multipart upload by assembling previously uploaded parts. [Upload instruction](https://api.pics.io/docs/how-to-upload-assets)","tags":["Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["parts","uploadId","storageId"],"properties":{"parts":{"type":"array","items":{"properties":{"ETag":{"type":"string"},"PartNumber":{"type":"number"}}}},"uploadId":{"type":"string"},"storageId":{"type":"string"}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}},"/images/buildS3UploadLink/{assetId}":{"post":{"summary":"Get link for uploading (S3 storage only)","description":"Build upload links for multipart upload. [Upload instruction](https://api.pics.io/docs/how-to-upload-assets)","tags":["Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"assetId","in":"path","type":"string","required":false,"description":"Needs to upload revision"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["fileName","fileSize","mimeType","collectionId"],"properties":{"fileName":{"type":"string"},"fileSize":{"type":"number"},"mimeType":{"type":"string"},"collectionId":{"type":"string"}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"type":"string"},"storageId":{"type":"string"},"revisionId":{"type":"string"},"chunkNums":{"type":"number"},"urls":{"type":"array","items":{"properties":{"partNum":{"type":"number"},"url":{"type":"string"}}}}}}}}}}}},"/images/buildGDUploadLink/{assetId}":{"post":{"summary":"Get link for uploading (Google Drive storage only)","description":"[Upload instruction](https://api.pics.io/docs/how-to-upload-assets)","tags":["Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"assetId","in":"path","type":"string","required":false,"description":"Needs to upload revision"},{"in":"header","name":"origin","description":"Origin that will be sent in the next request (upload file request)","required":false,"type":"string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["metadata","contentLength","contentType"],"properties":{"contentType":{"type":"string"},"contentLength":{"type":"number"},"metadata":{"type":"object","properties":{"title":{"type":"string","required":true,"description":"File name"},"mimeType":{"type":"string","required":true},"parents":{"type":"array","required":false,"items":{"type":"object","properties":{"id":{"type":"string","description":"Storage id of collection to upload to"}}}}}},"assetIdToReplace":{"type":"string","description":"Asset id to replace"}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Url for send file to"},"token":{"type":"string","description":"Token needs to put in Authorization header"}}}}}}}}},"/images/buildDownloadLink/{assetId}/{revisionId}":{"get":{"summary":"Get download link for asset","tags":["Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"parameters":[{"name":"assetId","in":"path","type":"string","required":true},{"name":"revisionId","in":"path","type":"string"}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/assets/attachListing":{"post":{"summary":"Attach assets to a listing product","description":"Attaches one or more assets to a listing product gallery and optionally to multiple listing variants. mode=draft writes DB links only (with validation and draft promotion when needed). mode=publish triggers async Shopify upload via attachProducts flow and requires the listing to already have a live snapshot (listing.live). Accesses MongoDB for products, variants, and assets; publish mode is async.","x-picsio-rate-limit":true,"x-picsio-api-tests":false,"x-picsio-permissions":"no team permissions required","tags":["Assets","Products"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["listingId","assetIds"],"properties":{"listingId":{"type":"string"},"assetIds":{"type":"array","items":{"type":"string"}},"variantIds":{"type":"array","items":{"type":"string"}},"listingGallery":{"type":"boolean","description":"When true, attaches assets to listing gallery. Defaults to true when variantIds is empty, false otherwise."},"mode":{"type":"string","enum":["draft","publish"]}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"attachedCount":{"type":"number"},"skipped":{"type":"array"},"assetsToProcessCount":{"type":"number"}}}}}},"404":{"description":"Listing or assets not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"409":{"description":"mode=publish requires listing.live (listing must already be published)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}},"/batch/assets/addCollection":{"post":{"summary":"Attach/Move assets to collection","tags":["Assets"],"security":[{"bearerAuth":[]}],"consumes":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","collectionId"],"properties":{"ids":{"type":"array","required":true,"items":{"type":"string"}},"collectionId":{"type":"string","required":true},"isMove":{"type":"boolean"}}}}}}},"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}}}