{"openapi":"3.1.0","info":{"title":"Pairie Tales Tools API","version":"1.0.0","description":"Manage our own Facebook Page, Instagram account and ad account: comments inbox and replies, publishing, ad status and an audit trail. Every capability is also available as an MCP tool at /mcp. Write actions need confirm=true."},"servers":[{"url":"https://tools.pairietales.com"}],"paths":{"/api/v1/session":{"get":{"operationId":"get_session","summary":"Who am I","description":"Current user, workspace, role and how the call was authenticated.\n\nAccess: read.","tags":["read"],"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/workspaces":{"get":{"operationId":"list_workspaces","summary":"List workspaces","description":"Workspaces (tenants) the signed-in user belongs to.\n\nAccess: read.","tags":["read"],"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/connection":{"get":{"operationId":"get_connection","summary":"Connected Meta assets","description":"The connected Facebook Page, Instagram account and ad account for this workspace, and which permissions the stored token has. The token itself is never returned.\n\nAccess: read.","tags":["read"],"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}},"put":{"operationId":"connect_meta","summary":"Connect Meta assets","description":"Store a Meta System User access token (encrypted, server side) and the asset IDs for this workspace. The token is verified with Meta before saving.\n\nAccess: admin.","tags":["admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string","minLength":20,"maxLength":1000},"page_id":{"type":"string","pattern":"^\\d+$"},"instagram_user_id":{"type":"string","pattern":"^\\d+$"},"ad_account_id":{"type":"string","pattern":"^act_\\d+$"}},"required":["access_token"]}}}},"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}},"delete":{"operationId":"disconnect_meta","summary":"Disconnect Meta","description":"Remove the stored Meta access token and asset ids for this workspace. Cached comments are kept until purged.\n\nAccess: admin. Requires confirm=true to take effect; without it the call returns a preview and changes nothing.","tags":["admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"description":"Must be true to perform the action. When false, returns a preview and changes nothing.","type":"boolean"}},"required":[]}}}},"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/connection/assets":{"get":{"operationId":"discover_assets","summary":"Discover assets from Meta","description":"Calls Meta live to show the profile, the Pages the token can list (with linked Instagram accounts), and the assets owned by the business portfolio.\n\nAccess: read.","tags":["read"],"parameters":[{"name":"business_id","in":"query","required":false,"schema":{"description":"Business portfolio ID","type":"string","pattern":"^\\d+$"}}],"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/comments":{"get":{"operationId":"list_comments","summary":"Comments inbox","description":"Comments on our Facebook Page posts and Instagram media, with a category (question, praise, order_issue, quality_complaint, brand_attack, promo, noise, human). refresh=true reads live from Meta first.\n\nAccess: read.","tags":["read"],"parameters":[{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"channel","in":"query","required":false,"schema":{"type":"string","enum":["facebook","instagram"]}},{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["order_issue","quality_complaint","brand_attack","question","praise","promo","noise","human"]}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}}],"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/comments/compose":{"post":{"operationId":"compose_reply","summary":"Suggest reply texts","description":"Builds a suggested public reply and private reply for a comment category, with optional product link, price and offer. Sends nothing.\n\nAccess: read.","tags":["read"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","enum":["order_issue","quality_complaint","brand_attack","question","praise","promo","noise","human"]},"link":{"type":"string","format":"uri"},"price":{"type":"string","maxLength":40},"offer":{"type":"string","maxLength":120}},"required":["category"]}}}},"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/comments/{comment_id}/reply":{"post":{"operationId":"reply_to_comment","summary":"Public reply","description":"Post a public reply under a comment on our own Page or Instagram post.\n\nAccess: write. Requires confirm=true to take effect; without it the call returns a preview and changes nothing.","tags":["write"],"parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","minLength":5,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":1000},"confirm":{"description":"Must be true to perform the action. When false, returns a preview and changes nothing.","type":"boolean"}},"required":["text"]}}}},"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/comments/{comment_id}/hide":{"post":{"operationId":"hide_comment","summary":"Hide a comment","description":"Hide a comment on our own Page or Instagram post (it stays visible to its author).\n\nAccess: write. Requires confirm=true to take effect; without it the call returns a preview and changes nothing.","tags":["write"],"parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","minLength":5,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"description":"Must be true to perform the action. When false, returns a preview and changes nothing.","type":"boolean"}},"required":[]}}}},"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/comments/{comment_id}/delete":{"post":{"operationId":"delete_comment","summary":"Delete a comment","description":"Permanently delete a comment on our own Page or Instagram post. Cannot be undone.\n\nAccess: write. Requires confirm=true to take effect; without it the call returns a preview and changes nothing.","tags":["write"],"parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","minLength":5,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"description":"Must be true to perform the action. When false, returns a preview and changes nothing.","type":"boolean"}},"required":[]}}}},"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/comments/{comment_id}/private-reply":{"post":{"operationId":"send_private_reply","summary":"Private reply (message)","description":"Send one private message in answer to a customer question or problem raised in a comment. Meta allows one per comment, within 7 days of the comment. We also send at most one per person per post.\n\nAccess: write. Requires confirm=true to take effect; without it the call returns a preview and changes nothing.","tags":["write"],"parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","minLength":5,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":1000},"confirm":{"description":"Must be true to perform the action. When false, returns a preview and changes nothing.","type":"boolean"}},"required":["text"]}}}},"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/drafts":{"get":{"operationId":"list_drafts","summary":"List post drafts","description":"Drafts and published posts for this workspace.\n\nAccess: read.","tags":["read"],"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}},"post":{"operationId":"create_draft","summary":"Create post draft","description":"Draft a post for our Facebook Page. kind: text, photo (media_url = https image), video or reel (media_url = https video). Nothing is published.\n\nAccess: write.","tags":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["text","photo","video","reel"]},"message":{"default":"","type":"string","maxLength":2000},"media_url":{"type":"string","format":"starts_with","pattern":"^https:\\/\\/.*"}},"required":["kind"]}}}},"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/drafts/{draft_id}/approve":{"post":{"operationId":"approve_draft","summary":"Approve a draft","description":"Mark a draft as approved. Publishing requires this step; the approver is recorded.\n\nAccess: write.","tags":["write"],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","minLength":8,"maxLength":40}}],"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/drafts/{draft_id}/publish":{"post":{"operationId":"publish_draft","summary":"Publish to the Page","description":"Publish an approved draft to our own Facebook Page.\n\nAccess: write. Requires confirm=true to take effect; without it the call returns a preview and changes nothing.","tags":["write"],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","minLength":8,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"description":"Must be true to perform the action. When false, returns a preview and changes nothing.","type":"boolean"}},"required":[]}}}},"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/drafts/{draft_id}/edit-post":{"post":{"operationId":"edit_published_post","summary":"Edit a published post","description":"Change the text of a post this app published to our Page.\n\nAccess: write. Requires confirm=true to take effect; without it the call returns a preview and changes nothing.","tags":["write"],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","minLength":8,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":2000},"confirm":{"description":"Must be true to perform the action. When false, returns a preview and changes nothing.","type":"boolean"}},"required":["message"]}}}},"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/drafts/{draft_id}/delete-post":{"post":{"operationId":"delete_published_post","summary":"Delete a published post","description":"Delete a post this app published to our Page (for example a test post).\n\nAccess: write. Requires confirm=true to take effect; without it the call returns a preview and changes nothing.","tags":["write"],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","minLength":8,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"description":"Must be true to perform the action. When false, returns a preview and changes nothing.","type":"boolean"}},"required":[]}}}},"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/page/subscriptions":{"get":{"operationId":"get_page_subscriptions","summary":"Page notification settings","description":"Which notification fields our Page is subscribed to for this app.\n\nAccess: read.","tags":["read"],"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}},"post":{"operationId":"subscribe_page","summary":"Subscribe Page to notifications","description":"Subscribe our own Page to comment and message notifications for this app.\n\nAccess: write. Requires confirm=true to take effect; without it the call returns a preview and changes nothing.","tags":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fields":{"default":["feed","messages"],"minItems":1,"type":"array","items":{"type":"string","enum":["feed","messages"]}},"confirm":{"description":"Must be true to perform the action. When false, returns a preview and changes nothing.","type":"boolean"}},"required":[]}}}},"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/ads":{"get":{"operationId":"ads_performance","summary":"Ad performance","description":"Spend, impressions, clicks and purchases per ad for our own ad account, with delivery status.\n\nAccess: read.","tags":["read"],"parameters":[{"name":"days","in":"query","required":false,"schema":{"default":7,"type":"integer","minimum":1,"maximum":90}}],"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/ads/{ad_id}/status":{"post":{"operationId":"set_ad_status","summary":"Pause or resume an ad","description":"Set an ad in our own ad account to PAUSED or ACTIVE.\n\nAccess: write. Requires confirm=true to take effect; without it the call returns a preview and changes nothing.","tags":["write"],"parameters":[{"name":"ad_id","in":"path","required":true,"schema":{"type":"string","pattern":"^\\d+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["PAUSED","ACTIVE"]},"confirm":{"description":"Must be true to perform the action. When false, returns a preview and changes nothing.","type":"boolean"}},"required":["status"]}}}},"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/coverage":{"get":{"operationId":"permission_coverage","summary":"Permission coverage","description":"For each Meta permission this app requests: whether the token has it and how many successful and failed API calls this app has made with it.\n\nAccess: read.","tags":["read"],"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/audit":{"get":{"operationId":"get_audit_log","summary":"Audit log","description":"Recent actions taken in this workspace, by people and agents.\n\nAccess: read.","tags":["read"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}}],"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/keys":{"get":{"operationId":"list_api_keys","summary":"List API keys","description":"API keys for agents in this workspace. Secrets are never shown after creation.\n\nAccess: admin.","tags":["admin"],"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}},"post":{"operationId":"create_api_key","summary":"Create API key","description":"Create a key for an agent. scope read = read-only; write = can also perform confirmed actions. The secret is shown once.\n\nAccess: admin.","tags":["admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"scope":{"default":"read","type":"string","enum":["read","write"]},"expires_in_days":{"default":90,"type":"integer","minimum":1,"maximum":365}},"required":["name"]}}}},"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/keys/{key_id}":{"delete":{"operationId":"revoke_api_key","summary":"Revoke API key","description":"Revoke an API key immediately.\n\nAccess: admin.","tags":["admin"],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","minLength":8,"maxLength":40}}],"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/members":{"get":{"operationId":"list_members","summary":"List members","description":"People with access to this workspace and pending invites.\n\nAccess: admin.","tags":["admin"],"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/members/invite":{"post":{"operationId":"invite_member","summary":"Invite a person","description":"Allow a Google account to sign in to this workspace.\n\nAccess: admin.","tags":["admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"default":"member","type":"string","enum":["admin","member","reviewer"]}},"required":["email"]}}}},"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/data/deletion-requests/process":{"post":{"operationId":"process_deletion_requests","summary":"Process data deletion requests","description":"Handle pending user data deletion requests received from Meta: delete the cached comments and private-reply records for those people in this workspace, then mark the requests done.\n\nAccess: admin. Requires confirm=true to take effect; without it the call returns a preview and changes nothing.","tags":["admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"description":"Must be true to perform the action. When false, returns a preview and changes nothing.","type":"boolean"}},"required":[]}}}},"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}},"/api/v1/data/purge":{"post":{"operationId":"purge_cached_data","summary":"Delete cached Meta data","description":"Delete all cached comments for this workspace. Audit entries and drafts are kept.\n\nAccess: admin. Requires confirm=true to take effect; without it the call returns a preview and changes nothing.","tags":["admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"description":"Must be true to perform the action. When false, returns a preview and changes nothing.","type":"boolean"}},"required":[]}}}},"security":[{"apiKey":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed for this key or role"},"502":{"description":"Meta returned an error"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Key starting ptk_, created in Settings > API keys. Read keys cannot write."},"sessionCookie":{"type":"apiKey","in":"cookie","name":"sid","description":"Browser sign-in. Changes need the x-csrf-token header."}}}}