{"openapi":"3.1.0","info":{"title":"PinBridge API","description":"Developer-first Pinterest publishing engine with queues, pacing, and webhooks\n\n## Error contract\n\nEvery non-2xx JSON response carries a top-level `error` envelope next to the\nlegacy `detail` field:\n\n```json\n{\n  \"detail\": \"...\",\n  \"error\": {\n    \"code\": \"board_access_denied\",\n    \"message\": \"Pinterest denied access to this board for the connected account.\",\n    \"remediation\": \"Refresh the board list and choose a board owned by this account.\",\n    \"request_id\": \"8c2c1f0e-...\",\n    \"board_id\": \"1234567890\",\n    \"account_id\": \"...\"\n  }\n}\n```\n\n`error.code` is stable and safe to branch on; `error.message` is for humans;\n`error.remediation` says what to change; `error.request_id` matches the\n`X-Request-ID` response header for support. Extra keys give machine-readable\ncontext (`board_id`, `account_id`, `retry_after_seconds`, `required_scope`, ...).\nValidation failures use `code: validation_error` and list field errors under\n`error.errors`.\n\n## Publish headroom headers\n\nPublish-shaped responses (`POST /v1/pins`, `/v1/pins/batch`, `/v1/pins/validate`,\n`/v1/pins/{id}/retry`) carry the remaining monthly quota and Pinterest rate\nheadroom: `X-PinBridge-Quota-Limit`, `X-PinBridge-Quota-Used`,\n`X-PinBridge-Quota-Remaining`, `X-Pinterest-RateLimit-Remaining`,\n`X-Pinterest-RateLimit-Capacity`, `X-Pinterest-RateLimit-Refill-Per-Second`.\nOn a batch the rate headers describe the first pin's account and are omitted\nwhen the batch spans several accounts.\n\n## API key scopes\n\nAPI keys carry `read`, `write` and `destructive` scopes and an optional Pinterest\naccount allow-list. A request outside the key's grants fails with\n`403 insufficient_scope` or `403 account_not_permitted`.\n","version":"1.58.0"},"paths":{"/v1/auth/register":{"post":{"tags":["Auth"],"summary":"Register","description":"Register a new user and create production project for their organization.","operationId":"register_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/login":{"post":{"tags":["Auth"],"summary":"Login","description":"Authenticate with email/password and return bearer token.","operationId":"login_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/google/status":{"get":{"tags":["Auth"],"summary":"Google Login Status","description":"Public flag so the webapp shows the Google button only when it will work.","operationId":"google_login_status_v1_auth_google_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Response Google Login Status V1 Auth Google Status Get"}}}}}}},"/v1/auth/google/login":{"get":{"tags":["Auth"],"summary":"Google Login","description":"Begin Sign in with Google: redirect the browser to Google's consent screen.","operationId":"google_login_v1_auth_google_login_get","parameters":[{"name":"next","in":"query","required":false,"schema":{"type":"string","default":"/app","title":"Next"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/google/callback":{"get":{"tags":["Auth"],"summary":"Google Callback","description":"Handle Google's redirect, then hand off to the webapp with a one-time token.\n\nA state carrying ``connector`` claims came from the MCP-connector consent\npage instead, and resumes that authorization.","operationId":"google_callback_v1_auth_google_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/google/complete":{"post":{"tags":["Auth"],"summary":"Google Complete","description":"Exchange a one-time Google handoff token for a full session.\n\n``is_new_user`` is true only when the sign-in that issued the handoff created\nthe account; the handoff is single-use, so it is reported once.","operationId":"google_complete_v1_auth_google_complete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleCompleteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleCompleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/forgot-password":{"post":{"tags":["Auth"],"summary":"Forgot Password","description":"Issue a short-lived password reset token and send reset email.","operationId":"forgot_password_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/reset-password":{"post":{"tags":["Auth"],"summary":"Reset Password","description":"Reset a user's password from a valid single-use token.","operationId":"reset_password_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/change-password":{"post":{"tags":["Auth"],"summary":"Change Password","description":"Change password for an authenticated user without invalidating the current session.","operationId":"change_password_v1_auth_change_password_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/auth/email/verify/request":{"post":{"tags":["Auth"],"summary":"Request Email Verification","description":"Send a fresh verification email for the authenticated user.","operationId":"request_email_verification_v1_auth_email_verify_request_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerificationActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/auth/email/change/request":{"post":{"tags":["Auth"],"summary":"Request Primary Email Change","description":"Send an old-email approval link for changing the primary login email.","operationId":"request_primary_email_change_v1_auth_email_change_request_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrimaryEmailChangeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrimaryEmailChangeRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/auth/email/verify":{"get":{"tags":["Auth"],"summary":"Verify Email","description":"Consume an email verification token.","operationId":"verify_email_v1_auth_email_verify_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","minLength":20,"maxLength":512,"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerificationActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/email/change/confirm":{"get":{"tags":["Auth"],"summary":"Confirm Primary Email Change","description":"Consume an old-email approval link and switch the primary email.","operationId":"confirm_primary_email_change_v1_auth_email_change_confirm_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","minLength":20,"maxLength":512,"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrimaryEmailChangeActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/me":{"get":{"tags":["Auth"],"summary":"Me","description":"Return current user and workspace for JWT-authenticated sessions.","operationId":"me_v1_auth_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/auth/profile":{"get":{"tags":["Auth"],"summary":"Get Profile","description":"Get billing/invoice profile fields for the current authenticated user.","operationId":"get_profile_v1_auth_profile_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]},"put":{"tags":["Auth"],"summary":"Update Profile","description":"Update billing/invoice profile fields for the current authenticated user.","operationId":"update_profile_v1_auth_profile_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/email/unsubscribe":{"get":{"tags":["Email Preferences"],"summary":"Unsubscribe","description":"Public endpoint: validate token and disable emails for a user.","operationId":"unsubscribe_v1_email_unsubscribe_get","parameters":[{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Unsubscribe V1 Email Unsubscribe Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/email/preferences":{"get":{"tags":["Email Preferences"],"summary":"Get Preferences","description":"Return current email preferences for the authenticated user and workspace.","operationId":"get_preferences_v1_email_preferences_get","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPreferencesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]},"patch":{"tags":["Email Preferences"],"summary":"Update Preferences","description":"Update user-scoped email preferences.","operationId":"update_preferences_v1_email_preferences_patch","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPreferencesUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPreferencesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/projects":{"get":{"tags":["Projects"],"summary":"List Projects","description":"List projects for the current organization.","operationId":"list_projects_v1_projects_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/projects/sandbox":{"post":{"tags":["Projects"],"summary":"Create Sandbox Project","description":"Create sandbox project for the current organization (idempotent).","operationId":"create_sandbox_project_v1_projects_sandbox_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSandboxProjectRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/projects/sandbox/reset":{"post":{"tags":["Projects"],"summary":"Reset Sandbox Project Data","description":"Delete all sandbox-scoped resources so users can start fresh for testing.","operationId":"reset_sandbox_project_data_v1_projects_sandbox_reset_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/projects/switch":{"post":{"tags":["Projects"],"summary":"Switch Project","description":"Switch active project for the current session and issue a new JWT.","operationId":"switch_project_v1_projects_switch_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwitchProjectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSwitchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/api-keys":{"post":{"tags":["API Keys"],"summary":"Create Api Key","description":"Create a new API key.\n\nReturns the API key once - save it, it won't be shown again. Keys can be\nrestricted to a subset of scopes (`read`, `write`, `destructive`) and to\nspecific Pinterest accounts; an unrestricted key gets every scope.","operationId":"create_api_key_v1_api_keys_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]},"get":{"tags":["API Keys"],"summary":"List Api Keys","description":"List all API keys for the workspace.","operationId":"list_api_keys_v1_api_keys_get","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/APIKeyResponse"},"title":"Response List Api Keys V1 Api Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/api-keys/{key_id}":{"patch":{"tags":["API Keys"],"summary":"Update Api Key","description":"Update API key name, scopes, or Pinterest account allow-list.","operationId":"update_api_key_v1_api_keys__key_id__patch","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]},"delete":{"tags":["API Keys"],"summary":"Revoke Api Key","description":"Revoke an API key.","operationId":"revoke_api_key_v1_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/pinterest/oauth/start":{"get":{"tags":["Pinterest"],"summary":"Start Oauth","description":"Start Pinterest OAuth flow.\n\nReturns authorization URL to redirect user to. Pass `account_id` when\nreconnecting an account, so a workspace at its plan's account limit can still\nreconnect it.","operationId":"start_oauth_v1_pinterest_oauth_start_get","parameters":[{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"When reconnecting, the connected account being reconnected. It does not count against the plan's Pinterest account limit.","title":"Account Id"},"description":"When reconnecting, the connected account being reconnected. It does not count against the plan's Pinterest account limit."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/pinterest/oauth/callback":{"get":{"tags":["Pinterest"],"summary":"Oauth Callback","description":"Handle Pinterest OAuth callback.\n\nExchanges code for access token and stores account.","operationId":"oauth_callback_v1_pinterest_oauth_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Authorization code from Pinterest","title":"Code"},"description":"Authorization code from Pinterest"},{"name":"state","in":"query","required":true,"schema":{"type":"string","description":"State parameter for CSRF protection","title":"State"},"description":"State parameter for CSRF protection"},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Set by Pinterest when access was refused","title":"Error"},"description":"Set by Pinterest when access was refused"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pinterest/accounts":{"get":{"tags":["Pinterest"],"summary":"List Pinterest Accounts","description":"List connected Pinterest accounts (limited to the API key's allow-list, if any).","operationId":"list_pinterest_accounts_v1_pinterest_accounts_get","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PinterestAccountResponse"},"title":"Response List Pinterest Accounts V1 Pinterest Accounts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/pinterest/accounts/{account_id}":{"delete":{"tags":["Pinterest"],"summary":"Revoke Pinterest Account","description":"Revoke a Pinterest account connection.","operationId":"revoke_pinterest_account_v1_pinterest_accounts__account_id__delete","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/pinterest/boards":{"get":{"tags":["Pinterest"],"summary":"List Boards","description":"List boards for a Pinterest account.\n\nReturns a synthetic local board in sandbox simulation mode, otherwise proxies Pinterest.","operationId":"list_boards_v1_pinterest_boards_get","parameters":[{"name":"account_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Pinterest account ID","title":"Account Id"},"description":"Pinterest account ID"},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BoardResponse"},"title":"Response List Boards V1 Pinterest Boards Get"}}}},"409":{"description":"The Pinterest account must be reconnected (see `error.code`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Pinterest rate limit reached; retry after `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Pinterest was unavailable; retry after `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]},"post":{"tags":["Pinterest"],"summary":"Create Board","description":"Create a board for a connected Pinterest account.\n\n`SECRET` needs Pinterest's `boards:write_secret` scope. Connections made before\nAPI 1.37 lack it and get `409 scope_missing` until they reconnect.","operationId":"create_board_v1_pinterest_boards_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/pinterest/boards/{board_id}/access":{"get":{"tags":["Pinterest"],"summary":"Get Board Access","description":"Check whether an account can publish to a board right now.\n\nRuns the same preflight `POST /v1/pins` uses and reports the outcome\ninstead of failing: `publishable` plus a stable `code` (`board_not_found`,\n`board_not_owned`, `board_deleted`, `scope_missing`, `token_expired`,\n`board_access_denied`, `sandbox_board_not_allowed`, ...) and a remediation\nhint. `status: skipped` means Pinterest was unavailable and only local\nchecks ran.","operationId":"get_board_access_v1_pinterest_boards__board_id__access_get","parameters":[{"name":"board_id","in":"path","required":true,"schema":{"type":"string","title":"Board Id"}},{"name":"account_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Pinterest account ID","title":"Account Id"},"description":"Pinterest account ID"},{"name":"fresh","in":"query","required":false,"schema":{"type":"boolean","description":"Bypass the cached verdict and ask Pinterest again","default":false,"title":"Fresh"},"description":"Bypass the cached verdict and ask Pinterest again"},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardAccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/pinterest/accounts/{account_id}/analytics":{"get":{"tags":["Pinterest"],"summary":"Get Account Analytics","description":"Account-level analytics (impressions, engagement, saves, clicks) over a date range.\n\nPinBridge copies every connected account's analytics nightly, so most reads are\nanswered from that stored history (`source: stored` in the response, with\n`data_as_of`) without calling Pinterest. Live ranges are capped at 90 days,\nstored ranges at 366. Sandbox-simulated workspaces return zeroed metrics.","operationId":"get_account_analytics_v1_pinterest_accounts__account_id__analytics_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive start (YYYY-MM-DD); default 30 days ago","title":"Start Date"},"description":"Inclusive start (YYYY-MM-DD); default 30 days ago"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive end (YYYY-MM-DD); default today","title":"End Date"},"description":"Inclusive end (YYYY-MM-DD); default today"},{"name":"metrics","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated Pinterest metric types, e.g. IMPRESSION,ENGAGEMENT,SAVE,PIN_CLICK,OUTBOUND_CLICK. Defaults to the organic engagement set.","title":"Metrics"},"description":"Comma-separated Pinterest metric types, e.g. IMPRESSION,ENGAGEMENT,SAVE,PIN_CLICK,OUTBOUND_CLICK. Defaults to the organic engagement set."},{"name":"source","in":"query","required":false,"schema":{"enum":["auto","stored","live"],"type":"string","description":"auto (default): PinBridge's stored history when it covers the range, else Pinterest. stored: stored history only (up to 366 days, beyond Pinterest's 90). live: always ask Pinterest (counts against the read limit).","default":"auto","title":"Source"},"description":"auto (default): PinBridge's stored history when it covers the range, else Pinterest. stored: stored history only (up to 366 days, beyond Pinterest's 90). live: always ask Pinterest (counts against the read limit)."},{"name":"include_daily","in":"query","required":false,"schema":{"type":"boolean","description":"false: return only the range totals, with an empty daily list. Use it when the totals are all you need, e.g. over 90 days.","default":true,"title":"Include Daily"},"description":"false: return only the range totals, with an empty daily list. Use it when the totals are all you need, e.g. over 90 days."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountAnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/pinterest/terms/related":{"get":{"tags":["Pinterest"],"summary":"List Related Terms","description":"List Pinterest related terms for a connected account.","operationId":"list_related_terms_v1_pinterest_terms_related_get","parameters":[{"name":"account_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Pinterest account ID","title":"Account Id"},"description":"Pinterest account ID"},{"name":"terms","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"},"description":"Requested term(s). Supports repeated query params or a comma-separated value.","title":"Terms"},"description":"Requested term(s). Supports repeated query params or a comma-separated value."},{"name":"exact_match","in":"query","required":false,"schema":{"type":"boolean","description":"When true, keep only related-term groups whose `term` exactly matches one of the requested `terms` values after trim/casefold normalization.","default":false,"title":"Exact Match"},"description":"When true, keep only related-term groups whose `term` exactly matches one of the requested `terms` values after trim/casefold normalization."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelatedTermsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/pinterest/boards/{board_id}":{"patch":{"tags":["Pinterest"],"summary":"Update Board","description":"Rename a board or change its description or privacy.\n\nThe change is made on Pinterest; fields left out are unchanged. Pins on the\nboard are unaffected.","operationId":"update_board_v1_pinterest_boards__board_id__patch","parameters":[{"name":"board_id","in":"path","required":true,"schema":{"type":"string","title":"Board Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardResponse"}}}},"422":{"description":"Board not found or not owned (see `error.code`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]},"delete":{"tags":["Pinterest"],"summary":"Delete Board","description":"Delete a board on Pinterest, with every pin on it. Irreversible.\n\nPinBridge's published pins on the board keep their records and stored analytics\nand are marked `removed_from_pinterest_at`. Deleting a secret board needs the\n`boards:write_secret` scope (connections made before API 1.37 lack it).","operationId":"delete_board_v1_pinterest_boards__board_id__delete","parameters":[{"name":"board_id","in":"path","required":true,"schema":{"type":"string","title":"Board Id"}},{"name":"account_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Pinterest account ID","title":"Account Id"},"description":"Pinterest account ID"},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/assets":{"get":{"tags":["Assets"],"summary":"List Assets","description":"List all assets for the organization, with optional filters.\n\n`total` in the body (and the `X-Total-Count` header) counts the assets\nmatching the filters and search, ignoring `limit` and `offset`.","operationId":"list_assets_v1_assets_get","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}},{"name":"sort","in":"query","required":false,"schema":{"enum":["created_at_desc","created_at_asc","name_asc","name_desc","size_desc","size_asc"],"type":"string","description":"Sort order","default":"created_at_desc","title":"Sort"},"description":"Sort order"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Case-insensitive search on the original file name","title":"Q"},"description":"Case-insensitive search on the original file name"},{"name":"asset_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AssetType"},{"type":"null"}],"description":"Only images or videos","title":"Asset Type"},"description":"Only images or videos"},{"name":"in_use","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true: only assets used by a pin or a pending scheduled pin; false: only unused assets","title":"In Use"},"description":"true: only assets used by a pin or a pending scheduled pin; false: only unused assets"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only assets uploaded at or after this ISO 8601 timestamp","title":"Since"},"description":"Only assets uploaded at or after this ISO 8601 timestamp"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only assets uploaded before this ISO 8601 timestamp","title":"Until"},"description":"Only assets uploaded before this ISO 8601 timestamp"},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetListResponse"}}},"headers":{"X-Total-Count":{"description":"Rows matching the filters, ignoring limit and offset.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]},"delete":{"tags":["Assets"],"summary":"Bulk Delete Assets","description":"Bulk delete assets. Returns split of deleted vs those requiring confirmation.","operationId":"bulk_delete_assets_v1_assets_delete","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/assets/images":{"post":{"tags":["Assets"],"summary":"Upload Image Asset","description":"Upload an image asset for later pin publishing.","operationId":"upload_image_asset_v1_assets_images_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_image_asset_v1_assets_images_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/assets/videos":{"post":{"tags":["Assets"],"summary":"Upload Video Asset","description":"Upload a video asset for later pin publishing.","operationId":"upload_video_asset_v1_assets_videos_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_video_asset_v1_assets_videos_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/assets/{asset_id}":{"delete":{"tags":["Assets"],"summary":"Delete Asset","description":"Delete an asset. Returns requires_confirmation=True while it is in use.\n\nIn use means referenced by a pin or by a scheduled pin that has not run yet;\n`referenced_pin_count` counts both. With `confirm=true` the asset is deleted\nanyway: pins keep their record without it, and pending schedules lose it, so\nan unpublished pin or schedule that used it fails to publish.","operationId":"delete_asset_v1_assets__asset_id__delete","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"confirm","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Confirm"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]},"get":{"tags":["Assets"],"summary":"Get Asset","description":"Return metadata for an accessible asset.","operationId":"get_asset_v1_assets__asset_id__get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/assets/{asset_id}/content":{"get":{"tags":["Assets"],"summary":"Get Asset Content","description":"Serve the uploaded asset content.","operationId":"get_asset_content_v1_assets__asset_id__content_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pins":{"post":{"tags":["Pins"],"summary":"Create Pin","description":"Create and publish a pin.\n\nThe pin is queued for publishing and processed asynchronously.\nUse idempotency_key to prevent duplicate pins.\n\nBefore the pin is accepted PinBridge checks that the connected account can\npublish to the board. Failures return `422` with a stable `error.code`\n(`board_not_found`, `board_not_owned`, `board_deleted`, `scope_missing`,\n`token_expired`, `token_revoked`, `board_access_denied`, ...) and a\nremediation hint.\n\nEvery response carries `X-PinBridge-Quota-*` and `X-Pinterest-RateLimit-*`\nheaders describing the remaining headroom. To check a request without\npublishing, use `POST /v1/pins/validate`.","operationId":"create_pin_v1_pins_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinResponse"}}},"headers":{"X-PinBridge-Quota-Limit":{"schema":{"type":"string"},"description":"Monthly pin creation quota for the workspace."},"X-PinBridge-Quota-Used":{"schema":{"type":"string"},"description":"Pins created so far in the current period."},"X-PinBridge-Quota-Remaining":{"schema":{"type":"string"},"description":"Pins remaining in the current period."},"X-Pinterest-RateLimit-Remaining":{"schema":{"type":"string"},"description":"Pinterest publish tokens available for the account."},"X-Pinterest-RateLimit-Capacity":{"schema":{"type":"string"},"description":"Token bucket capacity for the account."},"X-Pinterest-RateLimit-Refill-Per-Second":{"schema":{"type":"string"},"description":"Token refill rate for the account."}}},"422":{"description":"Board access preflight failed (see `error.code`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]},"get":{"tags":["Pins"],"summary":"List Pins","description":"List pins for the workspace, newest first by default, with optional filters.\n\nThe `X-Total-Count` response header carries the number of pins matching the\nfilters and search, so clients can page with `limit` and `offset`.","operationId":"list_pins_v1_pins_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Case-insensitive search across title, description and link URL","title":"Q"},"description":"Case-insensitive search across title, description and link URL"},{"name":"sort","in":"query","required":false,"schema":{"enum":["created_at_desc","created_at_asc","published_at_desc","published_at_asc","title_asc","title_desc","status_asc","status_desc"],"type":"string","description":"Sort order","default":"created_at_desc","title":"Sort"},"description":"Sort order"},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only pins for this Pinterest account","title":"Account Id"},"description":"Only pins for this Pinterest account"},{"name":"board_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only pins targeting this board","title":"Board Id"},"description":"Only pins targeting this board"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PinStatus"},{"type":"null"}],"description":"Only pins in this status","title":"Status"},"description":"Only pins in this status"},{"name":"error_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only failed pins with this error code","title":"Error Code"},"description":"Only failed pins with this error code"},{"name":"removed","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true: only published pins that no longer exist on Pinterest; false: exclude them","title":"Removed"},"description":"true: only published pins that no longer exist on Pinterest; false: exclude them"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only pins created at or after this ISO 8601 timestamp","title":"Since"},"description":"Only pins created at or after this ISO 8601 timestamp"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only pins created before this ISO 8601 timestamp","title":"Until"},"description":"Only pins created before this ISO 8601 timestamp"},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PinResponse"},"title":"Response List Pins V1 Pins Get"}}},"headers":{"X-Total-Count":{"description":"Rows matching the filters, ignoring limit and offset.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/pins/validate":{"post":{"tags":["Pins"],"summary":"Validate Pin","description":"Dry-run a pin request.\n\nRuns the full acceptance path — account, media, cover image, board access,\nidempotency, billing, quota and Pinterest rate headroom — and reports each\nstep. Returns the exact payload that would be published. Nothing is queued.","operationId":"validate_pin_v1_pins_validate_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinCreate"}}}},"responses":{"200":{"description":"Validation outcome; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinValidationResponse"}}},"headers":{"X-PinBridge-Quota-Limit":{"schema":{"type":"string"},"description":"Monthly pin creation quota for the workspace."},"X-PinBridge-Quota-Used":{"schema":{"type":"string"},"description":"Pins created so far in the current period."},"X-PinBridge-Quota-Remaining":{"schema":{"type":"string"},"description":"Pins remaining in the current period."},"X-Pinterest-RateLimit-Remaining":{"schema":{"type":"string"},"description":"Pinterest publish tokens available for the account."},"X-Pinterest-RateLimit-Capacity":{"schema":{"type":"string"},"description":"Token bucket capacity for the account."},"X-Pinterest-RateLimit-Refill-Per-Second":{"schema":{"type":"string"},"description":"Token refill rate for the account."}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/pins/batch":{"post":{"tags":["Pins"],"summary":"Create Pins Batch","description":"Create and publish several pins in one call.\n\nEach entry is processed independently and reported with its own outcome\n(`created`, `existing` for an idempotency-key hit, or `failed` with an error\nenvelope). Requires the bulk publishing plan feature and enough monthly quota\nfor every entry that would be created. Quota headers describe the workspace;\nPinterest rate headers are only included when every entry targets one account.","operationId":"create_pins_batch_v1_pins_batch_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinBatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinBatchResponse"}}},"headers":{"X-PinBridge-Quota-Limit":{"schema":{"type":"string"},"description":"Monthly pin creation quota for the workspace."},"X-PinBridge-Quota-Used":{"schema":{"type":"string"},"description":"Pins created so far in the current period."},"X-PinBridge-Quota-Remaining":{"schema":{"type":"string"},"description":"Pins remaining in the current period."},"X-Pinterest-RateLimit-Remaining":{"schema":{"type":"string"},"description":"Pinterest publish tokens available for the account."},"X-Pinterest-RateLimit-Capacity":{"schema":{"type":"string"},"description":"Token bucket capacity for the account."},"X-Pinterest-RateLimit-Refill-Per-Second":{"schema":{"type":"string"},"description":"Token refill rate for the account."}}},"402":{"description":"Not enough monthly quota for the whole batch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/pins/imports/json":{"post":{"tags":["Pins"],"summary":"Create Json Import Job","description":"Queue a bulk pin import from a JSON array.","operationId":"create_json_import_job_v1_pins_imports_json_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPinImportJsonRequest","description":"List of pin objects to import asynchronously"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/pins/imports/csv":{"post":{"tags":["Pins"],"summary":"Create Csv Import Job","description":"Queue a bulk pin import from an uploaded CSV file.","operationId":"create_csv_import_job_v1_pins_imports_csv_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_csv_import_job_v1_pins_imports_csv_post"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/pins/imports/{job_id}":{"get":{"tags":["Pins"],"summary":"Get Import Job","description":"Get a bulk import job and row results.","operationId":"get_import_job_v1_pins_imports__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/pins/imports":{"get":{"tags":["Pins"],"summary":"List Import Jobs","description":"List bulk import jobs for a workspace.","operationId":"list_import_jobs_v1_pins_imports_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ImportJobStatus"},{"type":"null"}],"description":"Filter import jobs by processing status","title":"Status"},"description":"Filter import jobs by processing status"},{"name":"source_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ImportSourceType"},{"type":"null"}],"description":"Filter import jobs by source type","title":"Source Type"},"description":"Filter import jobs by source type"},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ImportJobResponse"},"title":"Response List Import Jobs V1 Pins Imports Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/pins/{pin_id}":{"get":{"tags":["Pins"],"summary":"Get Pin","description":"Get pin status and details.","operationId":"get_pin_v1_pins__pin_id__get","parameters":[{"name":"pin_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pin Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]},"patch":{"tags":["Pins"],"summary":"Update Pin","description":"Edit a pin's title, description, link, alt text, or board before it publishes.\n\nQueued, deferred and failed pins are edited in place and publish with the new\nvalues. A published pin cannot be edited: Pinterest's API does not let\nPinBridge change a pin once it is live, so the call returns\n`409 pin_already_published`; delete the pin and publish a corrected one\ninstead. Pins currently publishing return `409 pin_publishing`. Both refusals\nare recorded in the activity log as `pin.update_rejected`. In a simulated\nsandbox `board_id` cannot change.","operationId":"update_pin_v1_pins__pin_id__patch","parameters":[{"name":"pin_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pin Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinResponse"}}}},"409":{"description":"The pin is already published (`pin_already_published`) or is being published right now (`pin_publishing`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]},"delete":{"tags":["Pins"],"summary":"Delete Pin","description":"Delete a pin.\n\nBy default this removes the PinBridge record only and returns `204`. Pass\n`delete_from_pinterest=true` to also delete the published pin on Pinterest,\nthe proportionate fix for one wrong pin (deleting the board is not); that\nvariant returns `200` with `removed_from_pinterest` so the outcome is visible.","operationId":"delete_pin_v1_pins__pin_id__delete","parameters":[{"name":"pin_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pin Id"}},{"name":"delete_from_pinterest","in":"query","required":false,"schema":{"type":"boolean","description":"Also remove the published pin from Pinterest. Without this flag only the PinBridge record is deleted and the pin stays live on Pinterest.","default":false,"title":"Delete From Pinterest"},"description":"Also remove the published pin from Pinterest. Without this flag only the PinBridge record is deleted and the pin stays live on Pinterest."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"200":{"description":"Returned instead of 204 when `delete_from_pinterest=true`, so the caller can see whether the Pinterest-side delete happened.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinDeleteResponse"}}}},"409":{"description":"Pin is being published right now; retry shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Pinterest was unavailable while removing the pin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/pins/{pin_id}/analytics":{"get":{"tags":["Pins"],"summary":"Get Pin Analytics","description":"Pin-level analytics (impressions, saves, clicks, outbound clicks) over a date range.\n\nPinBridge copies every published pin's analytics nightly, so most reads are\nanswered from that stored history (`source: stored` in the response, with\n`data_as_of`) without calling Pinterest. Live ranges are capped at 90 days,\nstored ranges at 366. Sandbox-simulated pins return zeroed metrics.\n\nA pin deleted on Pinterest (`removed_from_pinterest_at` set) is answered\nfrom the stored history. Without stored history it fails with `409\npin_removed_on_pinterest`, which is also what a live read returns when\nPinterest no longer has the pin.","operationId":"get_pin_analytics_v1_pins__pin_id__analytics_get","parameters":[{"name":"pin_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pin Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive start (YYYY-MM-DD); default 30 days ago","title":"Start Date"},"description":"Inclusive start (YYYY-MM-DD); default 30 days ago"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive end (YYYY-MM-DD); default today","title":"End Date"},"description":"Inclusive end (YYYY-MM-DD); default today"},{"name":"metrics","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated Pinterest metric types, e.g. IMPRESSION,SAVE,PIN_CLICK,OUTBOUND_CLICK. Defaults to the organic engagement set.","title":"Metrics"},"description":"Comma-separated Pinterest metric types, e.g. IMPRESSION,SAVE,PIN_CLICK,OUTBOUND_CLICK. Defaults to the organic engagement set."},{"name":"source","in":"query","required":false,"schema":{"enum":["auto","stored","live"],"type":"string","description":"auto (default): PinBridge's stored history when it covers the range, else Pinterest. stored: stored history only (up to 366 days, beyond Pinterest's 90). live: always ask Pinterest (counts against the read limit).","default":"auto","title":"Source"},"description":"auto (default): PinBridge's stored history when it covers the range, else Pinterest. stored: stored history only (up to 366 days, beyond Pinterest's 90). live: always ask Pinterest (counts against the read limit)."},{"name":"include_daily","in":"query","required":false,"schema":{"type":"boolean","description":"false: return only the range totals, with an empty daily list. Use it when the totals are all you need, e.g. over 90 days.","default":true,"title":"Include Daily"},"description":"false: return only the range totals, with an empty daily list. Use it when the totals are all you need, e.g. over 90 days."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinAnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/pins/{pin_id}/retry":{"post":{"tags":["Pins"],"summary":"Retry Failed Pin","description":"Retry a failed pin.\n\nRe-queues a pin that previously failed for publishing.\nOptionally override the board or Pinterest account to fix\nthe root cause of the failure before retrying. The target board is\npreflighted the same way as on creation.","operationId":"retry_failed_pin_v1_pins__pin_id__retry_post","parameters":[{"name":"pin_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pin Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PinRetryRequest"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinResponse"}}},"headers":{"X-PinBridge-Quota-Limit":{"schema":{"type":"string"},"description":"Monthly pin creation quota for the workspace."},"X-PinBridge-Quota-Used":{"schema":{"type":"string"},"description":"Pins created so far in the current period."},"X-PinBridge-Quota-Remaining":{"schema":{"type":"string"},"description":"Pins remaining in the current period."},"X-Pinterest-RateLimit-Remaining":{"schema":{"type":"string"},"description":"Pinterest publish tokens available for the account."},"X-Pinterest-RateLimit-Capacity":{"schema":{"type":"string"},"description":"Token bucket capacity for the account."},"X-Pinterest-RateLimit-Refill-Per-Second":{"schema":{"type":"string"},"description":"Token refill rate for the account."}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/pins/bulk-delete":{"post":{"tags":["Pins"],"summary":"Bulk Delete Pins","description":"Soft-delete multiple pins in one call (or hard-delete in sandbox).\n\nPer-item outcomes:\n  * succeeded — pin was deleted.\n  * failed (error_code=not_found) — pin not found in workspace or already deleted.","operationId":"bulk_delete_pins_v1_pins_bulk_delete_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkIdsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/pins/bulk-retry":{"post":{"tags":["Pins"],"summary":"Bulk Retry Pins","description":"Retry multiple failed pins in one call.\n\nPer-item outcomes:\n  * succeeded — pin was reset to QUEUED and publish task enqueued.\n  * skipped (error_code=ineligible_status) — pin status is not FAILED.\n  * failed (error_code=not_found) — pin not found in workspace or deleted.","operationId":"bulk_retry_pins_v1_pins_bulk_retry_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkIdsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/analytics/overview":{"get":{"tags":["Analytics"],"summary":"Get Analytics Overview","description":"Account-level Pinterest metrics summed across connected accounts, from stored history.\n\nReturns totals, the same-length previous period's totals (for deltas), a daily\nseries, and each account's collection status. Ranges can span up to 366 days\nand reach back past Pinterest's own 90-day window. Never calls Pinterest.","operationId":"get_analytics_overview_v1_analytics_overview_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive start (YYYY-MM-DD); default 30 days ago","title":"Start Date"},"description":"Inclusive start (YYYY-MM-DD); default 30 days ago"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive end (YYYY-MM-DD); default today","title":"End Date"},"description":"Inclusive end (YYYY-MM-DD); default today"},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Limit to one Pinterest account; default every connected account","title":"Account Id"},"description":"Limit to one Pinterest account; default every connected account"},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsOverviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/analytics/pins":{"get":{"tags":["Analytics"],"summary":"List Pin Analytics","description":"Published pins ranked by a metric summed over the range, from stored history.\n\nOnly pins with at least one non-zero stored day in the range are listed.\nNever calls Pinterest.","operationId":"list_pin_analytics_v1_analytics_pins_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive start (YYYY-MM-DD); default 30 days ago","title":"Start Date"},"description":"Inclusive start (YYYY-MM-DD); default 30 days ago"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive end (YYYY-MM-DD); default today","title":"End Date"},"description":"Inclusive end (YYYY-MM-DD); default today"},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Limit to one Pinterest account; default every connected account","title":"Account Id"},"description":"Limit to one Pinterest account; default every connected account"},{"name":"sort_by","in":"query","required":false,"schema":{"enum":["impression","save","pin_click","outbound_click","total_comments","total_reactions"],"type":"string","description":"Metric to rank pins by","default":"impression","title":"Sort By"},"description":"Metric to rank pins by"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopPinsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/analytics/accounts/{account_id}/collect":{"post":{"tags":["Analytics"],"summary":"Collect Account Analytics","description":"Collect an account's analytics now instead of waiting for the nightly run.\n\nThis is a user action, so PinBridge refreshes the account's Pinterest token\nif needed (the nightly run never does) and queues a sync. A paused account\nresumes, and any missed days (up to 90) are filled in. Limited to once per\naccount every 15 minutes.","operationId":"collect_account_analytics_v1_analytics_accounts__account_id__collect_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsCollectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/schedules":{"post":{"tags":["Schedules"],"summary":"Create Schedule","description":"Schedule a pin for future publishing.\n\nThe pin will be published at the specified run_at time. The target board is\npreflighted at scheduling time so a board the account cannot publish to is\nrejected now rather than when the schedule fires.","operationId":"create_schedule_v1_schedules_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleResponse"}}}},"403":{"description":"`plan_limit` once pending schedules reach twice the monthly pin quota (see `error.upgrade_url`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Board access preflight failed (see `error.code`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]},"get":{"tags":["Schedules"],"summary":"List Schedules","description":"List schedules for the workspace, latest run_at first by default, with optional filters.\n\nThe `X-Total-Count` response header carries the number of schedules matching\nthe filters and search, so clients can page with `limit` and `offset`.","operationId":"list_schedules_v1_schedules_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Case-insensitive search across the pin title, description and link URL","title":"Q"},"description":"Case-insensitive search across the pin title, description and link URL"},{"name":"sort","in":"query","required":false,"schema":{"enum":["run_at_desc","run_at_asc","created_at_desc","created_at_asc","title_asc","title_desc","status_asc","status_desc"],"type":"string","description":"Sort order; run_at_asc lists the next run first","default":"run_at_desc","title":"Sort"},"description":"Sort order; run_at_asc lists the next run first"},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only schedules for this Pinterest account","title":"Account Id"},"description":"Only schedules for this Pinterest account"},{"name":"board_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only schedules targeting this board","title":"Board Id"},"description":"Only schedules targeting this board"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ScheduleStatus"},{"type":"null"}],"description":"Only schedules in this status","title":"Status"},"description":"Only schedules in this status"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only schedules running at or after this ISO 8601 timestamp","title":"Since"},"description":"Only schedules running at or after this ISO 8601 timestamp"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only schedules running before this ISO 8601 timestamp","title":"Until"},"description":"Only schedules running before this ISO 8601 timestamp"},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleResponse"},"title":"Response List Schedules V1 Schedules Get"}}},"headers":{"X-Total-Count":{"description":"Rows matching the filters, ignoring limit and offset.","schema":{"type":"integer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/schedules/validate":{"post":{"tags":["Schedules"],"summary":"Validate Schedule","description":"Dry-run a schedule request.\n\nSame checks as `POST /v1/pins/validate` plus `run_at`. Nothing is stored.","operationId":"validate_schedule_v1_schedules_validate_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCreate"}}}},"responses":{"200":{"description":"Validation outcome; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinValidationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/schedules/{schedule_id}":{"get":{"tags":["Schedules"],"summary":"Get Schedule","description":"Get schedule details.","operationId":"get_schedule_v1_schedules__schedule_id__get","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schedule Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]},"patch":{"tags":["Schedules"],"summary":"Update Schedule","description":"Edit a pending schedule in place.\n\nChange the publish time, board, title, description, link or media of a\nschedule that has not started publishing, keeping its id and history. The\nsame checks as creating a schedule apply to the changed fields: `run_at`\nmust be in the future, a new board is preflighted, and new media is\nresolved. Schedules that already started return `409`; cancel and recreate,\nor edit the resulting pin instead.","operationId":"update_schedule_v1_schedules__schedule_id__patch","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schedule Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleResponse"}}}},"409":{"description":"Schedule is no longer pending (see `error.code`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Board access preflight or validation failed (see `error.code`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]},"delete":{"tags":["Schedules"],"summary":"Delete Schedule","description":"Delete a schedule once it is in a terminal state (done, failed, or canceled).","operationId":"delete_schedule_v1_schedules__schedule_id__delete","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schedule Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/schedules/{schedule_id}/cancel":{"post":{"tags":["Schedules"],"summary":"Cancel Schedule","description":"Cancel a scheduled pin.","operationId":"cancel_schedule_v1_schedules__schedule_id__cancel_post","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schedule Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/schedules/bulk-cancel":{"post":{"tags":["Schedules"],"summary":"Bulk Cancel Schedules","description":"Cancel multiple schedules in one call.\n\nPer-item outcomes:\n  * succeeded — schedule was canceled.\n  * skipped (error_code=ineligible_status) — schedule status is not\n    SCHEDULED/QUEUED/DEFERRED.\n  * failed (error_code=not_found) — schedule not found in workspace.","operationId":"bulk_cancel_schedules_v1_schedules_bulk_cancel_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkIdsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/schedules/{schedule_id}/retry":{"post":{"tags":["Schedules"],"summary":"Retry Schedule","description":"Retry a previously failed schedule.\n\nResets the schedule (and any linked, non-deleted pin) to a runnable state.","operationId":"retry_schedule_v1_schedules__schedule_id__retry_post","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schedule Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/schedules/bulk-retry":{"post":{"tags":["Schedules"],"summary":"Bulk Retry Schedules","description":"Retry multiple failed schedules in one call.\n\nPer-item outcomes:\n  * succeeded — schedule was reset to a runnable state.\n  * skipped (error_code=ineligible_status) — schedule status is not FAILED.\n  * failed (error_code=not_found) — schedule not found in workspace.","operationId":"bulk_retry_schedules_v1_schedules_bulk_retry_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkIdsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/schedules/bulk-delete":{"post":{"tags":["Schedules"],"summary":"Bulk Delete Schedules","description":"Delete multiple terminal-state schedules in one call.\n\nPer-item outcomes:\n  * succeeded — schedule was deleted.\n  * skipped (error_code=ineligible_status) — schedule status is not done,\n    failed, or canceled.\n  * failed (error_code=not_found) — schedule not found in workspace.","operationId":"bulk_delete_schedules_v1_schedules_bulk_delete_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkIdsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/dashboard/summary":{"get":{"tags":["Dashboard"],"summary":"Get Dashboard Summary","description":"Publishing activity for a time range: pin outcomes, an hourly or daily series,\npublished pins per account, the current queue, schedules and import jobs.\n\nOutcomes count by when they happened: a pin is published in the period its\n`published_at` falls in, and failed in the period it failed in (while still\nfailed). `total` counts the pins submitted in the period. The range\ncan span up to 366 days; ranges up to 48 hours get an hourly series. The same\nfigures for the preceding period of equal length come back as\n`previous_pins`, for deltas.","operationId":"get_dashboard_summary_v1_dashboard_summary_get","parameters":[{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Range start, inclusive (ISO 8601). Without an offset it is read in `tz`. Default: 30 days before `end`.","title":"Start"},"description":"Range start, inclusive (ISO 8601). Without an offset it is read in `tz`. Default: 30 days before `end`."},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Range end, exclusive (ISO 8601). Default: now.","title":"End"},"description":"Range end, exclusive (ISO 8601). Default: now."},{"name":"tz","in":"query","required":false,"schema":{"type":"string","maxLength":64,"description":"IANA time zone for the series buckets and offset-less timestamps","default":"UTC","title":"Tz"},"description":"IANA time zone for the series buckets and offset-less timestamps"},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Limit to one Pinterest account; default every account","title":"Account Id"},"description":"Limit to one Pinterest account; default every account"},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/webhooks":{"post":{"tags":["Webhooks"],"summary":"Create Webhook","description":"Create a new webhook endpoint.\n\nWebhooks receive events like pin.published and pin.failed.","operationId":"create_webhook_v1_webhooks_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]},"get":{"tags":["Webhooks"],"summary":"List Webhooks","description":"List all webhooks for workspace.","operationId":"list_webhooks_v1_webhooks_get","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookResponse"},"title":"Response List Webhooks V1 Webhooks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/webhooks/{webhook_id}":{"get":{"tags":["Webhooks"],"summary":"Get Webhook","description":"Get webhook details.","operationId":"get_webhook_v1_webhooks__webhook_id__get","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]},"patch":{"tags":["Webhooks"],"summary":"Update Webhook","description":"Update webhook fields.","operationId":"update_webhook_v1_webhooks__webhook_id__patch","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]},"delete":{"tags":["Webhooks"],"summary":"Delete Webhook","description":"Delete a webhook.","operationId":"delete_webhook_v1_webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/rate-meter":{"get":{"tags":["Rate Limiting"],"summary":"Get Rate Meter","description":"Get current rate limit status for an account.\n\nReturns token bucket state and usage estimates.","operationId":"get_rate_meter_v1_rate_meter_get","parameters":[{"name":"account_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Pinterest account ID","title":"Account Id"},"description":"Pinterest account ID"},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Rate Meter V1 Rate Meter Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/jobs/{job_id}":{"get":{"tags":["Jobs"],"summary":"Get Job Status","description":"Get job status by ID (alias of pin status).","operationId":"get_job_status_v1_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/billing/status":{"get":{"tags":["Billing"],"summary":"Get Billing Status","description":"Current plan, billing status and quota usage for the workspace.\n\n`calls_used` counts the pins published successfully this month (calendar month,\nUTC) against `quota_calls_monthly`, and `quota_reset_at` is when it resets.\nOnly successful new pins count, scheduled pins included when they publish;\nreads, failures and retries don't. Once the quota is used up, credits are\nspent one per pin if `credits_enabled`; with no quota or credits left,\npublishing returns `402 quota_exceeded` (or `credits_exhausted`) while every\nother endpoint keeps working.\n\nIt also reports usage against the other plan limits (Pinterest accounts, API\nkeys, weekly AI assistant requests) and, below the top self-serve plan, the\nnext plan up with its `upgrade_url`.\n\nThe `plan` value `pro` is the Agency plan (`plan_name`). Works with any API key\nthat has the read scope; a dashboard session needs a role that can manage billing.","operationId":"get_billing_status_v1_billing_status_get","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/activity-logs":{"get":{"tags":["Activity Logs"],"summary":"List Activity Logs","description":"List activity logs for the currently authenticated workspace.","operationId":"list_activity_logs_v1_activity_logs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ActivityLogCategory"},{"type":"null"}],"title":"Category"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"Action"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ActivityLogStatus"},{"type":"null"}],"title":"Status"}},{"name":"resource_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"title":"Resource Type"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityLogListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/team/invitations/preview":{"get":{"tags":["Team"],"summary":"Preview Team Invitation","description":"Return a public preview of an invitation token.","operationId":"preview_team_invitation_v1_team_invitations_preview_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","minLength":20,"maxLength":512,"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/team/members":{"get":{"tags":["Team"],"summary":"List Team Members","description":"List accepted organization members.","operationId":"list_team_members_v1_team_members_get","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMembersListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/team/invitations":{"get":{"tags":["Team"],"summary":"List Team Invitations","description":"List pending organization invitations.","operationId":"list_team_invitations_v1_team_invitations_get","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationsListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]},"post":{"tags":["Team"],"summary":"Create Team Invitation Route","description":"Create a new invitation for an organization member.","operationId":"create_team_invitation_route_v1_team_invitations_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/team/invitations/{invitation_id}/resend":{"post":{"tags":["Team"],"summary":"Resend Team Invitation Route","description":"Rotate an invitation token and send a fresh email.","operationId":"resend_team_invitation_route_v1_team_invitations__invitation_id__resend_post","parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/team/invitations/{invitation_id}":{"delete":{"tags":["Team"],"summary":"Revoke Team Invitation Route","description":"Revoke a pending invitation.","operationId":"revoke_team_invitation_route_v1_team_invitations__invitation_id__delete","parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/team/members/{member_id}":{"patch":{"tags":["Team"],"summary":"Update Team Member","description":"Update a member role or transfer ownership.","operationId":"update_team_member_v1_team_members__member_id__patch","parameters":[{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]},"delete":{"tags":["Team"],"summary":"Remove Team Member","description":"Remove a member or allow a non-owner to remove themselves.","operationId":"remove_team_member_v1_team_members__member_id__delete","parameters":[{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/team/invitations/accept":{"post":{"tags":["Team"],"summary":"Accept Team Invitation Route","description":"Accept an invitation for the authenticated user and switch the session context.","operationId":"accept_team_invitation_route_v1_team_invitations_accept_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationAcceptRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationAcceptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/mcp/quota":{"get":{"tags":["MCP"],"summary":"Get Mcp Quota","description":"Return current week MCP request usage and quota for the workspace.\n\nCalled by the MCP server before each tool call to enforce the weekly limit.\nReturns quota_exhausted=true when the limit is reached, with ``upgrade``\ncarrying the message and pricing link to show. A limit of 0 means unlimited.","operationId":"get_mcp_quota_v1_mcp_quota_get","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}},"/v1/mcp/track":{"post":{"tags":["MCP"],"summary":"Track Mcp Request","description":"Increment MCP request counter for the workspace.\n\nCalled by the MCP server after each tool call. Uses an atomic\nINSERT ... ON CONFLICT DO UPDATE to safely upsert the weekly row.\nReturns the updated usage state including whether quota is now exhausted.","operationId":"track_mcp_request_v1_mcp_track_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}]}}},"components":{"schemas":{"APIKeyCreate":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name","description":"Human-readable name for this API key"},"scopes":{"anyOf":[{"items":{"type":"string","enum":["read","write","destructive"]},"type":"array"},{"type":"null"}],"title":"Scopes","description":"Scopes granted to this key. `read` covers list/get endpoints, `write` covers creating and updating pins, schedules, boards, assets and webhooks, and `destructive` covers deletes and revocations. Omit to grant every scope."},"pinterest_account_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Pinterest Account Ids","description":"Optional allow-list of Pinterest account IDs this key may act on. Omit or send null to allow every account in the workspace."}},"type":"object","required":["name"],"title":"APIKeyCreate","description":"Request schema for creating an API key."},"APIKeyCreateResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"pinterest_account_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Pinterest Account Ids"},"api_key":{"type":"string","title":"Api Key","description":"The actual API key - save this, it won't be shown again"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","workspace_id","name","scopes","api_key","created_at"],"title":"APIKeyCreateResponse","description":"Response schema when creating an API key (includes the key once)."},"APIKeyResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"pinterest_account_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Pinterest Account Ids"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"source":{"type":"string","enum":["manual","oauth"],"title":"Source","description":"`manual` for keys created in the dashboard or API, `oauth` for keys minted when an AI agent or app connected through OAuth"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name","description":"Name the OAuth client registered with. Null for manual keys, and for oauth keys whose client registered without a name."},"authorized_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorized By Email","description":"Email of the member who authorized the connection. Null for manual keys, and for oauth keys whose authorizing member no longer exists."}},"type":"object","required":["id","workspace_id","name","scopes","created_at","source"],"title":"APIKeyResponse","description":"Response schema for API key (without the actual key)."},"APIKeyUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name","description":"Human-readable name for this API key"},"scopes":{"anyOf":[{"items":{"type":"string","enum":["read","write","destructive"]},"type":"array"},{"type":"null"}],"title":"Scopes","description":"Scopes granted to this key. `read` covers list/get endpoints, `write` covers creating and updating pins, schedules, boards, assets and webhooks, and `destructive` covers deletes and revocations. Omit to grant every scope."},"pinterest_account_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Pinterest Account Ids","description":"Optional allow-list of Pinterest account IDs this key may act on. Omit or send null to allow every account in the workspace."}},"type":"object","title":"APIKeyUpdate","description":"Request schema for updating API key metadata, scopes, or account allow-list.\n\nFields left out are unchanged. Send ``pinterest_account_ids: null`` to lift an\naccount restriction."},"AccountAnalyticsResponse":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"start_date":{"type":"string","title":"Start Date"},"end_date":{"type":"string","title":"End Date"},"provider_mode":{"type":"string","enum":["pinterest","simulated"],"title":"Provider Mode"},"totals":{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}]},"type":"object","title":"Totals","description":"Summary metrics over the range, lowercase metric names"},"daily":{"items":{"$ref":"#/components/schemas/AnalyticsDailyMetric"},"type":"array","title":"Daily","description":"One entry per day in the range; empty when include_daily=false"},"source":{"type":"string","enum":["live","stored","simulated"],"title":"Source","description":"Where the numbers came from: live (Pinterest, just now), stored (PinBridge's nightly copy), or simulated (sandbox)","default":"live"},"data_as_of":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Data As Of","description":"For stored reads: when PinBridge last fetched this account's analytics"},"history_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"History Start","description":"For stored reads: earliest day PinBridge has stored for this account"}},"type":"object","required":["account_id","start_date","end_date","provider_mode","totals","daily"],"title":"AccountAnalyticsResponse","description":"Normalized Pinterest analytics for a connected account (same shape as pin analytics)."},"ActivityLogActorType":{"type":"string","enum":["user","api_key","system","worker","admin","billing"],"title":"ActivityLogActorType","description":"Canonical actor types shown in the user activity feed."},"ActivityLogCategory":{"type":"string","enum":["security","publishing","billing","configuration","integration"],"title":"ActivityLogCategory","description":"High-level activity feed categories."},"ActivityLogListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ActivityLogResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"current_retention_days":{"type":"integer","title":"Current Retention Days"},"current_retention_label":{"type":"string","title":"Current Retention Label"}},"type":"object","required":["items","current_retention_days","current_retention_label"],"title":"ActivityLogListResponse","description":"Paginated activity log listing for the active workspace."},"ActivityLogResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"actor_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor User Id"},"actor_type":{"$ref":"#/components/schemas/ActivityLogActorType"},"actor_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Label"},"action":{"type":"string","title":"Action"},"category":{"$ref":"#/components/schemas/ActivityLogCategory"},"resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Type"},"resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id"},"status":{"$ref":"#/components/schemas/ActivityLogStatus"},"message":{"type":"string","title":"Message"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"},"retention_days":{"type":"integer","title":"Retention Days"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","actor_type","action","category","status","message","metadata","retention_days","expires_at","created_at"],"title":"ActivityLogResponse","description":"Single user-facing activity log row."},"ActivityLogStatus":{"type":"string","enum":["success","failed","queued","canceled"],"title":"ActivityLogStatus","description":"Stable status values for user-facing actions."},"AnalyticsAccountCollection":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"status":{"type":"string","enum":["collecting","in_progress","paused","reconnect_required","retrying","pending","simulated"],"title":"Status","description":"collecting (updated nightly), in_progress (a collection queued by a connect, reconnect or collect-now has not finished; shown for up to 15 minutes, or up to 60 while its run is still going), paused (the account has not been used recently, so its token is not refreshed; collect now or publish to resume), reconnect_required, retrying (last run failed), pending (first run not done), or simulated (sandbox). New values may be added (in_progress was added in API 1.40): clients must accept a status they do not know, for example by showing `message`."},"message":{"type":"string","title":"Message","description":"A sentence describing the status, suitable for showing to people"},"history_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"History Start","description":"Earliest day PinBridge has stored for this account"},"data_as_of":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Data As Of","description":"When PinBridge last fetched this account's analytics from Pinterest"},"last_sync_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync Status","description":"Raw outcome of the last sync run"},"last_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error Code"}},"type":"object","required":["account_id","status","message"],"title":"AnalyticsAccountCollection","description":"How PinBridge's analytics collection is doing for one connected account."},"AnalyticsCollectResponse":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"status":{"type":"string","const":"queued","title":"Status"},"message":{"type":"string","title":"Message"}},"type":"object","required":["account_id","status","message"],"title":"AnalyticsCollectResponse","description":"Result of asking PinBridge to collect an account's analytics now."},"AnalyticsDailyMetric":{"properties":{"date":{"type":"string","title":"Date"},"data_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Status"},"metrics":{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}]},"type":"object","title":"Metrics"}},"type":"object","required":["date","metrics"],"title":"AnalyticsDailyMetric","description":"Metrics for one day."},"AnalyticsOverviewResponse":{"properties":{"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"previous_start_date":{"type":"string","format":"date","title":"Previous Start Date"},"previous_end_date":{"type":"string","format":"date","title":"Previous End Date"},"metrics":{"items":{"type":"string"},"type":"array","title":"Metrics"},"totals":{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}]},"type":"object","title":"Totals"},"previous_totals":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Previous Totals","description":"Totals for the same-length period just before start_date; null when PinBridge's history does not reach back that far"},"daily":{"items":{"$ref":"#/components/schemas/AnalyticsDailyMetric"},"type":"array","title":"Daily"},"history_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"History Start","description":"Earliest stored day across the selected accounts"},"data_as_of":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Data As Of","description":"Most recent successful collection across the selected accounts"},"accounts":{"items":{"$ref":"#/components/schemas/AnalyticsAccountCollection"},"type":"array","title":"Accounts"}},"type":"object","required":["start_date","end_date","previous_start_date","previous_end_date","metrics","totals","daily","accounts"],"title":"AnalyticsOverviewResponse","description":"Account-level metrics summed across the selected accounts, from stored history."},"AssetDeleteResponse":{"properties":{"deleted":{"type":"boolean","title":"Deleted"},"requires_confirmation":{"type":"boolean","title":"Requires Confirmation"},"referenced_pin_count":{"type":"integer","title":"Referenced Pin Count","description":"Pins plus scheduled pins that have not run yet using this asset."},"freed_bytes":{"type":"integer","title":"Freed Bytes"}},"type":"object","required":["deleted","requires_confirmation","referenced_pin_count","freed_bytes"],"title":"AssetDeleteResponse","description":"Response for a single asset deletion."},"AssetListResponse":{"properties":{"assets":{"items":{"$ref":"#/components/schemas/AssetResponse"},"type":"array","title":"Assets"},"total":{"type":"integer","title":"Total"},"storage_used_bytes":{"type":"integer","title":"Storage Used Bytes"},"storage_quota_bytes":{"type":"integer","title":"Storage Quota Bytes"},"storage_used_percent":{"type":"integer","title":"Storage Used Percent"}},"type":"object","required":["assets","total","storage_used_bytes","storage_quota_bytes","storage_used_percent"],"title":"AssetListResponse","description":"Paginated asset list with storage summary."},"AssetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"workspace_environment":{"anyOf":[{"$ref":"#/components/schemas/WorkspaceEnvironment"},{"type":"null"}]},"asset_type":{"$ref":"#/components/schemas/AssetType"},"original_filename":{"type":"string","title":"Original Filename"},"stored_filename":{"type":"string","title":"Stored Filename"},"content_type":{"type":"string","title":"Content Type"},"file_size_bytes":{"type":"integer","title":"File Size Bytes"},"file_size_display":{"type":"string","title":"File Size Display"},"referenced_by_pin_count":{"type":"integer","title":"Referenced By Pin Count","description":"Pins plus scheduled pins that have not run yet using this asset.","default":0},"public_url":{"type":"string","title":"Public Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","asset_type","original_filename","stored_filename","content_type","file_size_bytes","file_size_display","public_url","created_at","updated_at"],"title":"AssetResponse","description":"Response schema for an uploaded asset."},"AssetType":{"type":"string","enum":["image","video"],"title":"AssetType","description":"Supported uploaded asset types."},"AuthOrganizationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"AuthOrganizationResponse","description":"Organization details."},"AuthOrganizationSessionResponse":{"properties":{"organization":{"$ref":"#/components/schemas/AuthOrganizationResponse"},"organization_role":{"type":"string","title":"Organization Role"},"permissions":{"$ref":"#/components/schemas/AuthPermissionResponse"},"active_project":{"$ref":"#/components/schemas/AuthWorkspaceResponse"},"projects":{"items":{"$ref":"#/components/schemas/AuthWorkspaceResponse"},"type":"array","title":"Projects"}},"type":"object","required":["organization","organization_role","permissions","active_project","projects"],"title":"AuthOrganizationSessionResponse","description":"Accessible organization plus its default project context."},"AuthPermissionResponse":{"properties":{"can_manage_members":{"type":"boolean","title":"Can Manage Members"},"can_manage_billing":{"type":"boolean","title":"Can Manage Billing"},"can_manage_api_keys":{"type":"boolean","title":"Can Manage Api Keys"},"can_manage_integrations":{"type":"boolean","title":"Can Manage Integrations"},"can_publish":{"type":"boolean","title":"Can Publish"},"can_delete_assets":{"type":"boolean","title":"Can Delete Assets"},"can_reset_sandbox":{"type":"boolean","title":"Can Reset Sandbox"},"can_view_reports":{"type":"boolean","title":"Can View Reports"},"can_delete_content":{"type":"boolean","title":"Can Delete Content"}},"type":"object","required":["can_manage_members","can_manage_billing","can_manage_api_keys","can_manage_integrations","can_publish","can_delete_assets","can_reset_sandbox","can_view_reports","can_delete_content"],"title":"AuthPermissionResponse","description":"Resolved role-based permission flags for the current organization."},"AuthResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In"},"user":{"$ref":"#/components/schemas/AuthUserResponse"},"organization":{"$ref":"#/components/schemas/AuthOrganizationResponse"},"organization_role":{"type":"string","title":"Organization Role"},"permissions":{"$ref":"#/components/schemas/AuthPermissionResponse"},"active_project":{"$ref":"#/components/schemas/AuthWorkspaceResponse"},"projects":{"items":{"$ref":"#/components/schemas/AuthWorkspaceResponse"},"type":"array","title":"Projects"},"available_organizations":{"items":{"$ref":"#/components/schemas/AuthOrganizationSessionResponse"},"type":"array","title":"Available Organizations"},"workspace":{"$ref":"#/components/schemas/AuthWorkspaceResponse"}},"type":"object","required":["access_token","expires_in","user","organization","organization_role","permissions","active_project","projects","available_organizations","workspace"],"title":"AuthResponse","description":"Authentication response with bearer token."},"AuthUserResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"timezone":{"type":"string","title":"Timezone"},"email_verified":{"type":"boolean","title":"Email Verified"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","timezone","email_verified","created_at"],"title":"AuthUserResponse","description":"Authenticated user details."},"AuthWorkspaceResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"environment":{"$ref":"#/components/schemas/WorkspaceEnvironment"},"timezone":{"type":"string","title":"Timezone"},"plan":{"$ref":"#/components/schemas/Plan"}},"type":"object","required":["id","name","environment","timezone","plan"],"title":"AuthWorkspaceResponse","description":"Authenticated project/workspace details."},"BillingCycle":{"type":"string","enum":["monthly","annual"],"title":"BillingCycle","description":"Subscription billing frequency."},"BillingStatus":{"type":"string","enum":["active","trialing","past_due","canceled","unpaid"],"title":"BillingStatus","description":"Billing status from Stripe."},"BillingStatusResponse":{"properties":{"plan":{"$ref":"#/components/schemas/Plan","description":"Current plan. `pro` is the Agency plan"},"billing_provider":{"type":"string","title":"Billing Provider","description":"`stripe` when billed through Stripe, `database` when the plan is set by PinBridge","default":"database"},"billing_cycle":{"anyOf":[{"$ref":"#/components/schemas/BillingCycle"},{"type":"null"}],"description":"`monthly` or `annual`; null when unknown"},"billing_status":{"$ref":"#/components/schemas/BillingStatus","description":"Subscription status"},"trial_active":{"type":"boolean","title":"Trial Active","description":"Whether a free trial is running","default":false},"trial_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Ends At","description":"Set while a trial is active"},"current_period_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period Start","description":"Start of the current subscription period"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End","description":"End of the current subscription period (next renewal)"},"subscription_cancel_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Subscription Cancel At","description":"When a scheduled cancellation takes effect"},"quota_calls_monthly":{"type":"integer","title":"Quota Calls Monthly","description":"Successful pin publishes included per month"},"calls_used":{"type":"integer","title":"Calls Used","description":"Pins published successfully this month (calendar month, UTC)"},"quota_reset_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Quota Reset At","description":"When `calls_used` resets: the start of next month (UTC)"},"credits_remaining":{"type":"integer","title":"Credits Remaining","description":"Prepaid credits left, spent one per pin once the quota is used up","default":0},"credits_enabled":{"type":"boolean","title":"Credits Enabled","description":"Whether this workspace spends credits after the quota","default":false},"credits_purchase_allowed":{"type":"boolean","title":"Credits Purchase Allowed","description":"Whether this workspace can buy credit packs right now","default":false},"quota_exhausted":{"type":"boolean","title":"Quota Exhausted","description":"True when `calls_used` has reached `quota_calls_monthly`","default":false},"plan_consumption_percent":{"type":"integer","title":"Plan Consumption Percent","description":"`calls_used` as a percentage of the monthly quota, 0-100","default":0},"storage_quota_bytes":{"type":"integer","title":"Storage Quota Bytes","description":"Asset library storage limit","default":0},"storage_used_bytes":{"type":"integer","title":"Storage Used Bytes","description":"Asset library storage in use","default":0},"storage_used_percent":{"type":"integer","title":"Storage Used Percent","description":"`storage_used_bytes` as a percentage of the storage limit","default":0},"storage_warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Warning","description":"`80`, `95` or `100` once storage use crosses that percentage"},"pinterest_accounts_limit":{"type":"integer","title":"Pinterest Accounts Limit","description":"Connected Pinterest accounts allowed"},"uploaded_media_assets":{"type":"boolean","title":"Uploaded Media Assets","description":"Whether the plan includes asset uploads"},"bulk_imports":{"type":"boolean","title":"Bulk Imports","description":"Whether the plan includes bulk JSON and CSV imports"},"plan_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Name","description":"The plan's display name, e.g. `Agency` for `pro`"},"pinterest_accounts_used":{"type":"integer","title":"Pinterest Accounts Used","description":"Connected Pinterest accounts in use","default":0},"api_keys_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Api Keys Limit","description":"API keys allowed; null means unlimited"},"api_keys_used":{"type":"integer","title":"Api Keys Used","description":"Active API keys, not counting AI assistant connections","default":0},"assistant_requests_limit":{"type":"integer","title":"Assistant Requests Limit","description":"AI assistant (MCP) requests allowed per week; 0 means unlimited","default":0},"assistant_requests_used":{"type":"integer","title":"Assistant Requests Used","description":"AI assistant (MCP) requests used this week","default":0},"assistant_requests_reset_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Assistant Requests Reset At","description":"When the weekly AI assistant request count resets"},"recommended_plan":{"anyOf":[{"$ref":"#/components/schemas/Plan"},{"type":"null"}],"description":"The next self-serve plan up; null on the top self-serve plan"},"upgrade_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upgrade Url","description":"Pricing page link highlighting `recommended_plan`, or null"}},"type":"object","required":["plan","billing_status","quota_calls_monthly","calls_used","pinterest_accounts_limit","uploaded_media_assets","bulk_imports"],"title":"BillingStatusResponse","description":"Plan, billing status and quota usage for the current workspace."},"BoardAccessResponse":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"board_id":{"type":"string","title":"Board Id"},"publishable":{"type":"boolean","title":"Publishable"},"status":{"type":"string","title":"Status","description":"ok, failed, or skipped (upstream unavailable)"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Stable reason code when not publishable"},"message":{"type":"string","title":"Message"},"remediation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remediation"},"checked_at":{"type":"string","format":"date-time","title":"Checked At"},"source":{"type":"string","title":"Source","description":"simulated, local, cache, pinterest, or skipped"},"board":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Board"},"account_health":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Account Health"},"retry_after_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retry After Seconds"}},"type":"object","required":["account_id","board_id","publishable","status","message","checked_at","source"],"title":"BoardAccessResponse","description":"Result of ``GET /v1/pinterest/boards/{board_id}/access``."},"BoardCreateRequest":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id","description":"Pinterest account ID"},"name":{"type":"string","maxLength":180,"minLength":1,"title":"Name","description":"Board name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Board description"},"privacy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Privacy","description":"Board privacy (for example PUBLIC, PROTECTED, SECRET)"}},"type":"object","required":["account_id","name"],"title":"BoardCreateRequest","description":"Request schema for creating a Pinterest board."},"BoardResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"privacy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Privacy"}},"type":"object","required":["id","name"],"title":"BoardResponse","description":"Response schema for a Pinterest board."},"BoardUpdateRequest":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id","description":"Pinterest account that owns the board"},"name":{"anyOf":[{"type":"string","maxLength":180,"minLength":1},{"type":"null"}],"title":"Name","description":"New board name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"New board description"},"privacy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Privacy","description":"New privacy (for example PUBLIC, SECRET)"}},"type":"object","required":["account_id"],"title":"BoardUpdateRequest","description":"Request schema for editing a Pinterest board. At least one field must change."},"Body_create_csv_import_job_v1_pins_imports_csv_post":{"properties":{"file":{"type":"string","format":"binary","title":"File","description":"CSV file containing pin rows"}},"type":"object","required":["file"],"title":"Body_create_csv_import_job_v1_pins_imports_csv_post"},"Body_upload_image_asset_v1_assets_images_post":{"properties":{"file":{"type":"string","format":"binary","title":"File","description":"Image file to upload"}},"type":"object","required":["file"],"title":"Body_upload_image_asset_v1_assets_images_post"},"Body_upload_video_asset_v1_assets_videos_post":{"properties":{"file":{"type":"string","format":"binary","title":"File","description":"Video file to upload"}},"type":"object","required":["file"],"title":"Body_upload_video_asset_v1_assets_videos_post"},"BulkDeleteAssetSummary":{"properties":{"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"workspace_environment":{"anyOf":[{"$ref":"#/components/schemas/WorkspaceEnvironment"},{"type":"null"}]},"original_filename":{"type":"string","title":"Original Filename"},"file_size_bytes":{"type":"integer","title":"File Size Bytes"},"referenced_pin_count":{"type":"integer","title":"Referenced Pin Count","description":"Pins plus scheduled pins that have not run yet using this asset.","default":0},"freed_bytes":{"type":"integer","title":"Freed Bytes","default":0}},"type":"object","required":["asset_id","workspace_id","original_filename","file_size_bytes"],"title":"BulkDeleteAssetSummary","description":"Summary payload for one bulk asset delete result item."},"BulkDeleteRequest":{"properties":{"asset_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Asset Ids"},"confirm":{"type":"boolean","title":"Confirm","default":false}},"type":"object","required":["asset_ids"],"title":"BulkDeleteRequest","description":"Request body for bulk asset deletion."},"BulkDeleteResponse":{"properties":{"deleted":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Deleted"},"requires_confirmation":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Requires Confirmation"},"total_freed_bytes":{"type":"integer","title":"Total Freed Bytes"},"deleted_items":{"items":{"$ref":"#/components/schemas/BulkDeleteAssetSummary"},"type":"array","title":"Deleted Items","default":[]},"requires_confirmation_items":{"items":{"$ref":"#/components/schemas/BulkDeleteAssetSummary"},"type":"array","title":"Requires Confirmation Items","default":[]}},"type":"object","required":["deleted","requires_confirmation","total_freed_bytes"],"title":"BulkDeleteResponse","description":"Response for bulk asset deletion."},"BulkIdsRequest":{"properties":{"ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500,"minItems":1,"title":"Ids","description":"List of resource IDs to act on (up to 500 per request)."}},"type":"object","required":["ids"],"title":"BulkIdsRequest","description":"Request body for bulk endpoints that operate on a list of resource IDs."},"BulkOperationItemResult":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","enum":["succeeded","skipped","failed"],"title":"Status"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["id","status"],"title":"BulkOperationItemResult","description":"Per-item outcome inside a bulk-action response."},"BulkOperationResponse":{"properties":{"succeeded_count":{"type":"integer","title":"Succeeded Count"},"skipped_count":{"type":"integer","title":"Skipped Count"},"failed_count":{"type":"integer","title":"Failed Count"},"results":{"items":{"$ref":"#/components/schemas/BulkOperationItemResult"},"type":"array","title":"Results"}},"type":"object","required":["succeeded_count","skipped_count","failed_count","results"],"title":"BulkOperationResponse","description":"Aggregated bulk-action response."},"BulkPinImportJsonRequest":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"BulkPinImportJsonRequest","description":"Raw JSON pin import payload."},"BulkPinImportRowResult":{"properties":{"row_number":{"type":"integer","title":"Row Number"},"status":{"type":"string","enum":["created","existing","failed"],"title":"Status"},"pin_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Pin Id"},"schedule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Schedule Id"},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["row_number","status"],"title":"BulkPinImportRowResult","description":"Per-row import result."},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","maxLength":255,"minLength":8,"title":"Current Password"},"new_password":{"type":"string","maxLength":255,"minLength":8,"title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest","description":"Request schema for authenticated password changes."},"CreateSandboxProjectRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"}},"type":"object","title":"CreateSandboxProjectRequest","description":"Optional sandbox project creation payload."},"DashboardAccountCount":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"published":{"type":"integer","title":"Published"}},"type":"object","required":["account_id","published"],"title":"DashboardAccountCount"},"DashboardImportJobStats":{"properties":{"by_status":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Status","description":"Import jobs created in the range, per status (all present)"}},"type":"object","required":["by_status"],"title":"DashboardImportJobStats"},"DashboardPinStats":{"properties":{"total":{"type":"integer","title":"Total","description":"Pins counted in by_status (the sum of its values): published or failed in the period, or submitted in it and still waiting"},"submitted":{"type":"integer","title":"Submitted","description":"Pins submitted (created) in the period, whatever their status now"},"by_status":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Status","description":"Count per pin status, every status present. published: pins published in the period (by published_at). failed: pins that failed in the period and are still failed. queued, deferred, publishing: pins submitted in the period still waiting."},"success_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Success Rate","description":"published / (published + failed), from 0 to 1; null when neither occurred"}},"type":"object","required":["total","submitted","by_status"],"title":"DashboardPinStats","description":"Pin outcomes in a period, counted by when they happened."},"DashboardQueue":{"properties":{"queued":{"type":"integer","title":"Queued"},"deferred":{"type":"integer","title":"Deferred"},"publishing":{"type":"integer","title":"Publishing"}},"type":"object","required":["queued","deferred","publishing"],"title":"DashboardQueue","description":"Pins waiting to publish right now, regardless of the requested range."},"DashboardScheduleStats":{"properties":{"by_status":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Status","description":"Schedules whose run time falls in the range, per status (all present)"},"upcoming":{"type":"integer","title":"Upcoming","description":"Scheduled, queued or deferred schedules due from now on, regardless of the range"}},"type":"object","required":["by_status","upcoming"],"title":"DashboardScheduleStats"},"DashboardSeriesPoint":{"properties":{"start":{"type":"string","format":"date-time","title":"Start","description":"Bucket start in the requested time zone"},"created":{"type":"integer","title":"Created","description":"Pins submitted in this bucket"},"published":{"type":"integer","title":"Published","description":"Pins published in this bucket"},"failed":{"type":"integer","title":"Failed","description":"Pins that failed in this bucket and are still failed"}},"type":"object","required":["start","created","published","failed"],"title":"DashboardSeriesPoint","description":"One hour or day of pin activity."},"DashboardSummaryResponse":{"properties":{"start":{"type":"string","format":"date-time","title":"Start","description":"Range start (inclusive) in the requested time zone"},"end":{"type":"string","format":"date-time","title":"End","description":"Range end (exclusive) in the requested time zone"},"timezone":{"type":"string","title":"Timezone"},"granularity":{"type":"string","enum":["hour","day"],"title":"Granularity","description":"Series bucket size: hour for ranges up to 48 hours, else day"},"previous_start":{"type":"string","format":"date-time","title":"Previous Start","description":"Start of the same-length period just before `start`"},"previous_end":{"type":"string","format":"date-time","title":"Previous End"},"account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id","description":"The account filter, when one was given"},"pins":{"$ref":"#/components/schemas/DashboardPinStats"},"previous_pins":{"$ref":"#/components/schemas/DashboardPinStats","description":"The same figures for the previous period, for deltas"},"series":{"items":{"$ref":"#/components/schemas/DashboardSeriesPoint"},"type":"array","title":"Series","description":"Every bucket in the range, oldest first, zero-filled"},"published_by_account":{"items":{"$ref":"#/components/schemas/DashboardAccountCount"},"type":"array","title":"Published By Account","description":"Pins published in the range, per account, most first"},"queue":{"$ref":"#/components/schemas/DashboardQueue"},"schedules":{"$ref":"#/components/schemas/DashboardScheduleStats"},"import_jobs":{"anyOf":[{"$ref":"#/components/schemas/DashboardImportJobStats"},{"type":"null"}],"description":"Null when filtered by account_id: an import job can target several accounts"}},"type":"object","required":["start","end","timezone","granularity","previous_start","previous_end","pins","previous_pins","series","published_by_account","queue","schedules"],"title":"DashboardSummaryResponse","description":"Publishing activity for a time range, for dashboards and reports."},"EmailPreferencesResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"transactional_enabled":{"type":"boolean","title":"Transactional Enabled"},"alerts_enabled":{"type":"boolean","title":"Alerts Enabled"},"verification_enabled":{"type":"boolean","title":"Verification Enabled"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","user_id","transactional_enabled","alerts_enabled","verification_enabled","created_at","updated_at"],"title":"EmailPreferencesResponse","description":"Serialized user email preferences."},"EmailPreferencesUpdateRequest":{"properties":{"transactional_enabled":{"type":"boolean","title":"Transactional Enabled"},"alerts_enabled":{"type":"boolean","title":"Alerts Enabled"},"verification_enabled":{"type":"boolean","title":"Verification Enabled"}},"type":"object","required":["transactional_enabled","alerts_enabled","verification_enabled"],"title":"EmailPreferencesUpdateRequest","description":"Payload for updating user email preferences."},"EmailVerificationActionResponse":{"properties":{"message":{"type":"string","title":"Message"},"retry_after_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retry After Seconds"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Set by GET /v1/auth/email/verify: the address that was verified, so a client signed in as someone else can tell the link belonged to another account"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Set by GET /v1/auth/email/verify: the account that was verified"}},"type":"object","required":["message"],"title":"EmailVerificationActionResponse","description":"Response payload for email verification actions."},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest","description":"Request schema for starting password reset."},"GoogleCompleteRequest":{"properties":{"handoff":{"type":"string","maxLength":4096,"minLength":20,"title":"Handoff"}},"type":"object","required":["handoff"],"title":"GoogleCompleteRequest","description":"Exchange a one-time Google handoff token for a full session."},"GoogleCompleteResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In"},"user":{"$ref":"#/components/schemas/AuthUserResponse"},"organization":{"$ref":"#/components/schemas/AuthOrganizationResponse"},"organization_role":{"type":"string","title":"Organization Role"},"permissions":{"$ref":"#/components/schemas/AuthPermissionResponse"},"active_project":{"$ref":"#/components/schemas/AuthWorkspaceResponse"},"projects":{"items":{"$ref":"#/components/schemas/AuthWorkspaceResponse"},"type":"array","title":"Projects"},"available_organizations":{"items":{"$ref":"#/components/schemas/AuthOrganizationSessionResponse"},"type":"array","title":"Available Organizations"},"workspace":{"$ref":"#/components/schemas/AuthWorkspaceResponse"},"is_new_user":{"type":"boolean","title":"Is New User","description":"True only when this Google sign-in created the PinBridge account (first sign-up); false for an existing account, including one just linked to Google","default":false}},"type":"object","required":["access_token","expires_in","user","organization","organization_role","permissions","active_project","projects","available_organizations","workspace"],"title":"GoogleCompleteResponse","description":"Session for a finished Sign in with Google."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImportJobResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"source_type":{"$ref":"#/components/schemas/ImportSourceType"},"status":{"$ref":"#/components/schemas/ImportJobStatus"},"source_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Filename"},"total_rows":{"type":"integer","title":"Total Rows"},"processed_rows":{"type":"integer","title":"Processed Rows"},"created_rows":{"type":"integer","title":"Created Rows"},"existing_rows":{"type":"integer","title":"Existing Rows"},"failed_rows":{"type":"integer","title":"Failed Rows"},"results":{"items":{"$ref":"#/components/schemas/BulkPinImportRowResult"},"type":"array","title":"Results"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","source_type","status","total_rows","processed_rows","created_rows","existing_rows","failed_rows","created_at","updated_at"],"title":"ImportJobResponse","description":"Bulk import job response."},"ImportJobStatus":{"type":"string","enum":["queued","processing","completed","completed_with_errors","failed"],"title":"ImportJobStatus","description":"Bulk import job status."},"ImportSourceType":{"type":"string","enum":["json","csv"],"title":"ImportSourceType","description":"Accepted bulk import source types."},"JobStatusResponse":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id"},"pin_id":{"type":"string","format":"uuid","title":"Pin Id"},"status":{"$ref":"#/components/schemas/PinStatus"},"submitted_at":{"type":"string","format":"date-time","title":"Submitted At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"pinterest_pin_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pinterest Pin Id"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["job_id","pin_id","status","submitted_at"],"title":"JobStatusResponse","description":"Response schema for job status endpoint."},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":255,"minLength":8,"title":"Password"},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Timezone","description":"Browser IANA timezone used for first-login timezone backfill"},"invite_token":{"anyOf":[{"type":"string","maxLength":512,"minLength":20},{"type":"null"}],"title":"Invite Token","description":"Optional organization invitation token to accept during login."}},"type":"object","required":["email","password"],"title":"LoginRequest","description":"Request schema for logging in."},"MeResponse":{"properties":{"user":{"$ref":"#/components/schemas/AuthUserResponse"},"organization":{"$ref":"#/components/schemas/AuthOrganizationResponse"},"organization_role":{"type":"string","title":"Organization Role"},"permissions":{"$ref":"#/components/schemas/AuthPermissionResponse"},"active_project":{"$ref":"#/components/schemas/AuthWorkspaceResponse"},"projects":{"items":{"$ref":"#/components/schemas/AuthWorkspaceResponse"},"type":"array","title":"Projects"},"available_organizations":{"items":{"$ref":"#/components/schemas/AuthOrganizationSessionResponse"},"type":"array","title":"Available Organizations"},"workspace":{"$ref":"#/components/schemas/AuthWorkspaceResponse"}},"type":"object","required":["user","organization","organization_role","permissions","active_project","projects","available_organizations","workspace"],"title":"MeResponse","description":"Current authenticated session response."},"OAuthStartResponse":{"properties":{"authorization_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Authorization Url"}},"type":"object","required":["authorization_url"],"title":"OAuthStartResponse","description":"Response schema for OAuth start endpoint."},"OrganizationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"OrganizationResponse","description":"Organization summary."},"PasswordResetActionResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"PasswordResetActionResponse","description":"Generic password reset flow response."},"PinAnalyticsResponse":{"properties":{"pin_id":{"type":"string","format":"uuid","title":"Pin Id"},"pinterest_pin_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pinterest Pin Id"},"account_id":{"type":"string","format":"uuid","title":"Account Id"},"start_date":{"type":"string","title":"Start Date"},"end_date":{"type":"string","title":"End Date"},"provider_mode":{"type":"string","enum":["pinterest","simulated"],"title":"Provider Mode"},"totals":{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}]},"type":"object","title":"Totals","description":"Each metric summed over the range, lowercase metric names. total_comments and total_reactions are lifetime counts on live reads and 0 on stored reads, which do not keep them; Pinterest does not report them per day."},"daily":{"items":{"$ref":"#/components/schemas/AnalyticsDailyMetric"},"type":"array","title":"Daily","description":"One entry per day in the range; empty when include_daily=false"},"removed_from_pinterest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Removed From Pinterest At","description":"Set when the pin no longer exists on Pinterest; the numbers then come from PinBridge's stored history"},"source":{"type":"string","enum":["live","stored","simulated"],"title":"Source","description":"Where the numbers came from: live (Pinterest, just now), stored (PinBridge's nightly copy), or simulated (sandbox)","default":"live"},"data_as_of":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Data As Of","description":"For stored reads: when PinBridge last fetched this account's analytics"},"history_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"History Start","description":"For stored reads: earliest day PinBridge has stored for this account"}},"type":"object","required":["pin_id","pinterest_pin_id","account_id","start_date","end_date","provider_mode","totals","daily"],"title":"PinAnalyticsResponse","description":"Normalized Pinterest analytics for one pin."},"PinAnalyticsSummary":{"properties":{"pin_id":{"type":"string","format":"uuid","title":"Pin Id"},"pinterest_pin_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pinterest Pin Id"},"account_id":{"type":"string","format":"uuid","title":"Account Id"},"title":{"type":"string","title":"Title"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"link_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Url"},"media_type":{"type":"string","title":"Media Type"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"totals":{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"integer"},{"type":"null"}]},"type":"object","title":"Totals"}},"type":"object","required":["pin_id","pinterest_pin_id","account_id","title","thumbnail_url","link_url","media_type","published_at","totals"],"title":"PinAnalyticsSummary","description":"One pin's metrics summed over the requested range."},"PinBatchItemResult":{"properties":{"index":{"type":"integer","title":"Index"},"idempotency_key":{"type":"string","title":"Idempotency Key"},"status":{"type":"string","enum":["created","existing","failed"],"title":"Status"},"pin":{"anyOf":[{"$ref":"#/components/schemas/PinResponse"},{"type":"null"}]},"error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error","description":"Error envelope (code, message, remediation) for failed items"}},"type":"object","required":["index","idempotency_key","status"],"title":"PinBatchItemResult","description":"Outcome for one entry of a batch publish."},"PinBatchRequest":{"properties":{"pins":{"items":{"$ref":"#/components/schemas/PinCreate"},"type":"array","minItems":1,"title":"Pins","description":"Pins to create, in order"}},"type":"object","required":["pins"],"title":"PinBatchRequest","description":"Request schema for ``POST /v1/pins/batch``."},"PinBatchResponse":{"properties":{"created_count":{"type":"integer","title":"Created Count"},"existing_count":{"type":"integer","title":"Existing Count"},"failed_count":{"type":"integer","title":"Failed Count"},"results":{"items":{"$ref":"#/components/schemas/PinBatchItemResult"},"type":"array","title":"Results"},"headroom":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Headroom"}},"type":"object","required":["created_count","existing_count","failed_count","results"],"title":"PinBatchResponse","description":"Response schema for ``POST /v1/pins/batch``."},"PinCreate":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id","description":"Pinterest account ID to publish with"},"board_id":{"type":"string","title":"Board Id","description":"Pinterest board ID"},"title":{"type":"string","maxLength":100,"title":"Title","description":"Pin title"},"description":{"anyOf":[{"type":"string","maxLength":800},{"type":"null"}],"title":"Description","description":"Pin description"},"related_terms":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Related Terms","description":"Optional related terms for Pinterest"},"alt_text":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Alt Text","description":"Alternative text used for accessibility"},"dominant_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dominant Color","description":"Dominant hex color of the pin media (for example #6E7874)"},"cover_image_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Cover Image Url","description":"Optional public cover image URL for video pins"},"cover_image_asset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cover Image Asset Id","description":"Optional uploaded image asset ID used as a video cover image"},"link_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Link Url","description":"Destination URL for the pin"},"image_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Image Url","description":"Public URL of the image to pin"},"asset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Asset Id","description":"Uploaded PinBridge asset ID to use for the pin image or video"},"idempotency_key":{"type":"string","maxLength":255,"title":"Idempotency Key","description":"Idempotency key to prevent duplicate pins"}},"type":"object","required":["account_id","board_id","title","idempotency_key"],"title":"PinCreate","description":"Request schema for creating a pin."},"PinDeleteResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"deleted":{"type":"boolean","const":true,"title":"Deleted","default":true},"removed_from_pinterest":{"type":"boolean","title":"Removed From Pinterest","description":"True when the pin was deleted on Pinterest (or was already gone there)"},"pinterest_pin_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pinterest Pin Id"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Why nothing was removed upstream: not_published (no Pinterest pin id) or simulated_sandbox"}},"type":"object","required":["id","removed_from_pinterest"],"title":"PinDeleteResponse","description":"Body returned by ``DELETE /v1/pins/{id}?delete_from_pinterest=true``."},"PinMediaType":{"type":"string","enum":["image","video"],"title":"PinMediaType","description":"Pin media type enum."},"PinResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"pinterest_account_id":{"type":"string","format":"uuid","title":"Pinterest Account Id"},"status":{"$ref":"#/components/schemas/PinStatus"},"media_type":{"$ref":"#/components/schemas/PinMediaType"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"related_terms":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Related Terms"},"alt_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alt Text"},"dominant_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dominant Color"},"cover_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Image Url"},"link_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Url"},"media_url":{"type":"string","title":"Media Url"},"image_url":{"type":"string","title":"Image Url"},"asset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Asset Id"},"board_id":{"type":"string","title":"Board Id"},"pinterest_pin_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pinterest Pin Id"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"idempotency_key":{"type":"string","title":"Idempotency Key"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Failed At","description":"When the pin failed; set only while status is failed and cleared by a retry, like error_code"},"removed_from_pinterest_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Removed From Pinterest At","description":"When PinBridge found that this published pin no longer exists on Pinterest (deleted there by hand or with its board). The pin keeps status published; null means it is live or has not been checked."}},"type":"object","required":["id","workspace_id","pinterest_account_id","status","media_type","title","media_url","image_url","board_id","idempotency_key","created_at","updated_at"],"title":"PinResponse","description":"Response schema for a pin."},"PinRetryRequest":{"properties":{"board_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Board Id","description":"New Pinterest board ID to publish to (overrides original)"},"account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id","description":"New Pinterest account ID to publish with (overrides original)"}},"type":"object","title":"PinRetryRequest","description":"Optional overrides when retrying a failed pin."},"PinStatus":{"type":"string","enum":["queued","deferred","publishing","published","failed"],"title":"PinStatus","description":"Pin status enum."},"PinUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Title","description":"Pin title"},"description":{"anyOf":[{"type":"string","maxLength":800},{"type":"null"}],"title":"Description","description":"Pin description"},"link_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Link Url","description":"Destination URL for the pin"},"alt_text":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Alt Text","description":"Alternative text used for accessibility"},"board_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Board Id","description":"Move the pin to another board"}},"type":"object","title":"PinUpdate","description":"Request schema for editing a pin.\n\nQueued, deferred, or failed pins are edited locally and publish with the new\nvalues. Published pins cannot be edited (``409 pin_already_published``):\nPinterest's API does not let PinBridge edit a live pin. Fields left out are\nunchanged."},"PinValidationCheck":{"properties":{"name":{"type":"string","title":"Name","description":"Check identifier, e.g. board_access"},"status":{"type":"string","enum":["passed","failed","warning","skipped"],"title":"Status"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Stable error code when the check failed"},"message":{"type":"string","title":"Message"},"remediation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remediation"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"}},"type":"object","required":["name","status","message"],"title":"PinValidationCheck","description":"One step of a dry-run validation."},"PinValidationResponse":{"properties":{"valid":{"type":"boolean","title":"Valid","description":"True when no check failed; nothing was written"},"dry_run":{"type":"boolean","const":true,"title":"Dry Run","default":true},"checks":{"items":{"$ref":"#/components/schemas/PinValidationCheck"},"type":"array","title":"Checks"},"resolved":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Resolved","description":"The payload PinBridge would publish after resolving assets and boards"},"existing_pin_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Existing Pin Id","description":"Set when the idempotency key already matches a pin in this workspace"},"headroom":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Headroom","description":"Current PinBridge quota and Pinterest rate headroom"}},"type":"object","required":["valid","checks"],"title":"PinValidationResponse","description":"Result of ``POST /v1/pins/validate`` (also ``POST /v1/pins?dry_run=true``)."},"PinterestAccountResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"pinterest_user_id":{"type":"string","title":"Pinterest User Id"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"scopes":{"type":"string","title":"Scopes","description":"Granted Pinterest OAuth scopes, comma-separated"},"token_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Token Expires At"},"health_status":{"type":"string","title":"Health Status"},"health_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Health Message"},"health_checked_at":{"type":"string","format":"date-time","title":"Health Checked At"},"reconnect_required":{"type":"boolean","title":"Reconnect Required","default":false},"missing_scopes":{"items":{"type":"string"},"type":"array","title":"Missing Scopes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"}},"type":"object","required":["id","workspace_id","pinterest_user_id","scopes","health_status","health_checked_at","created_at","updated_at"],"title":"PinterestAccountResponse","description":"Response schema for a connected Pinterest account."},"Plan":{"type":"string","enum":["free","starter","growth","pro","enterprise"],"title":"Plan","description":"Subscription plan tiers."},"PrimaryEmailChangeActionResponse":{"properties":{"message":{"type":"string","title":"Message"},"new_email":{"type":"string","format":"email","title":"New Email"},"requires_reauthentication":{"type":"boolean","title":"Requires Reauthentication","default":false}},"type":"object","required":["message","new_email"],"title":"PrimaryEmailChangeActionResponse","description":"Response payload for completing a primary email change."},"PrimaryEmailChangeRequest":{"properties":{"new_email":{"type":"string","format":"email","title":"New Email"}},"type":"object","required":["new_email"],"title":"PrimaryEmailChangeRequest","description":"Request schema for starting a primary email change."},"PrimaryEmailChangeRequestResponse":{"properties":{"message":{"type":"string","title":"Message"},"pending_email":{"type":"string","format":"email","title":"Pending Email"},"requested_at":{"type":"string","format":"date-time","title":"Requested At"},"retry_after_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retry After Seconds"}},"type":"object","required":["message","pending_email","requested_at"],"title":"PrimaryEmailChangeRequestResponse","description":"Response payload for requesting a primary email change."},"ProfileResponse":{"properties":{"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"email":{"type":"string","format":"email","title":"Email"},"pending_email_change_to":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Pending Email Change To"},"pending_email_change_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pending Email Change Requested At"},"workspace_name":{"type":"string","title":"Workspace Name"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"company_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Website"},"billing_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Billing Email"},"billing_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Phone"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"tax_id_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id Status","description":"State of `tax_id` as an EU VAT number, when tax is added at checkout. `verified`: VIES, the EU's VAT number database, confirmed it, and invoices carry no VAT. `pending`: VIES could not be reached yet, and VAT is added until it confirms the number. `invalid`: VIES no longer confirms it, and VAT is added. `null`: not an EU VAT number, or not checked."},"tax_id_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Tax Id Checked At","description":"When VIES last confirmed the VAT number"},"tax_id_verified_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id Verified Name","description":"The business name VIES has for the VAT number, when the country shares it"},"tax_id_verified_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id Verified Address","description":"The address VIES has for the VAT number, when the country shares it"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2"},"address_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address City"},"address_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address State"},"address_postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Postal Code"},"address_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Country"}},"type":"object","required":["email","workspace_name"],"title":"ProfileResponse","description":"Workspace billing profile for invoice/customer details."},"ProfileUpdateRequest":{"properties":{"full_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Full Name"},"workspace_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Workspace Name"},"company_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Company Name"},"company_website":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Company Website"},"billing_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Billing Email"},"billing_phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Billing Phone"},"tax_id":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Tax Id"},"address_line1":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line2"},"address_city":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Address City"},"address_state":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Address State"},"address_postal_code":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Address Postal Code"},"address_country":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Address Country"}},"type":"object","title":"ProfileUpdateRequest","description":"Update request for customer profile and invoice details."},"ProjectResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"environment":{"$ref":"#/components/schemas/WorkspaceEnvironment"},"plan":{"$ref":"#/components/schemas/Plan"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","environment","plan","created_at"],"title":"ProjectResponse","description":"Project/workspace summary."},"ProjectSwitchResponse":{"properties":{"organization":{"$ref":"#/components/schemas/OrganizationResponse"},"active_project":{"$ref":"#/components/schemas/ProjectResponse"},"projects":{"items":{"$ref":"#/components/schemas/ProjectResponse"},"type":"array","title":"Projects"},"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["organization","active_project","projects","access_token","expires_in"],"title":"ProjectSwitchResponse","description":"Project switch response including a fresh bearer token."},"ProjectsContextResponse":{"properties":{"organization":{"$ref":"#/components/schemas/OrganizationResponse"},"active_project":{"$ref":"#/components/schemas/ProjectResponse"},"projects":{"items":{"$ref":"#/components/schemas/ProjectResponse"},"type":"array","title":"Projects"}},"type":"object","required":["organization","active_project","projects"],"title":"ProjectsContextResponse","description":"Project context payload for current authenticated user."},"QuotaResponse":{"properties":{"week":{"type":"string","title":"Week"},"requests_used":{"type":"integer","title":"Requests Used"},"requests_limit":{"type":"integer","title":"Requests Limit"},"quota_exhausted":{"type":"boolean","title":"Quota Exhausted"},"resets_at":{"type":"string","title":"Resets At"},"plan":{"type":"string","title":"Plan"},"plan_name":{"type":"string","title":"Plan Name"},"upgrade":{"anyOf":[{"$ref":"#/components/schemas/UpgradeInfo"},{"type":"null"}]}},"type":"object","required":["week","requests_used","requests_limit","quota_exhausted","resets_at","plan","plan_name"],"title":"QuotaResponse"},"RegisterMarketingAttribution":{"properties":{"utm_source":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Utm Campaign"},"utm_term":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Utm Term"},"utm_content":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Utm Content"},"gclid":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Gclid"},"ga_client_id":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Ga Client Id"},"referral_code":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Referral Code","description":"Affiliate referral slug captured from the `?sa=` link."}},"type":"object","title":"RegisterMarketingAttribution","description":"Allowed marketing attribution keys captured at signup."},"RegisterRequest":{"properties":{"full_name":{"type":"string","maxLength":255,"minLength":1,"title":"Full Name"},"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":255,"minLength":8,"title":"Password"},"workspace_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Workspace Name"},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Timezone","description":"Default IANA timezone for the user/workspace (e.g. America/New_York)"},"next_path":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Next Path","description":"Optional relative path to preserve through signup and email verification flows."},"marketing_attribution":{"anyOf":[{"$ref":"#/components/schemas/RegisterMarketingAttribution"},{"type":"null"}],"description":"Optional marketing attribution metadata captured at signup."},"invite_token":{"anyOf":[{"type":"string","maxLength":512,"minLength":20},{"type":"null"}],"title":"Invite Token","description":"Optional organization invitation token to accept during registration."}},"type":"object","required":["full_name","email","password"],"title":"RegisterRequest","description":"Request schema for registering a new user account."},"RelatedTermsItemResponse":{"properties":{"term":{"type":"string","title":"Term","description":"Input term represented by this related-term group"},"related_terms":{"items":{"type":"string"},"type":"array","title":"Related Terms","description":"Terms Pinterest considers logically related to `term`"}},"type":"object","required":["term"],"title":"RelatedTermsItemResponse","description":"A related-term group returned by Pinterest."},"RelatedTermsResponse":{"properties":{"id":{"type":"string","title":"Id","description":"First requested term"},"related_term_count":{"type":"integer","minimum":0.0,"title":"Related Term Count","description":"Total number of related terms after PinBridge normalization/filtering"},"related_terms_list":{"items":{"$ref":"#/components/schemas/RelatedTermsItemResponse"},"type":"array","title":"Related Terms List","description":"Related-term groups keyed by the matched term"},"exact_match":{"type":"boolean","title":"Exact Match","description":"Whether PinBridge filtered the response to groups whose `term` exactly matches one of the requested `terms` values after trim/casefold normalization","default":false}},"type":"object","required":["id","related_term_count"],"title":"RelatedTermsResponse","description":"Normalized response for Pinterest related-term lookups."},"ResetPasswordRequest":{"properties":{"token":{"type":"string","maxLength":512,"minLength":20,"title":"Token"},"password":{"type":"string","maxLength":255,"minLength":8,"title":"Password"}},"type":"object","required":["token","password"],"title":"ResetPasswordRequest","description":"Request schema for completing password reset."},"ScheduleCreate":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id","description":"Pinterest account ID to publish with"},"run_at":{"type":"string","format":"date-time","title":"Run At","description":"When to publish this pin (ISO 8601 timestamp)"},"board_id":{"type":"string","title":"Board Id","description":"Pinterest board ID"},"title":{"type":"string","maxLength":100,"title":"Title","description":"Pin title"},"description":{"anyOf":[{"type":"string","maxLength":800},{"type":"null"}],"title":"Description","description":"Pin description"},"cover_image_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Cover Image Url","description":"Optional public cover image URL for scheduled video pins"},"cover_image_asset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cover Image Asset Id","description":"Optional uploaded image asset ID used as a video cover image"},"link_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Link Url","description":"Destination URL for the pin"},"image_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Image Url","description":"Public URL of the image to pin"},"asset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Asset Id","description":"Uploaded PinBridge asset ID to use for the scheduled image or video"}},"type":"object","required":["account_id","run_at","board_id","title"],"title":"ScheduleCreate","description":"Request schema for creating a scheduled pin."},"ScheduleResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"pinterest_account_id":{"type":"string","format":"uuid","title":"Pinterest Account Id"},"run_at":{"type":"string","format":"date-time","title":"Run At"},"status":{"$ref":"#/components/schemas/ScheduleStatus"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"pin_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Pin Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"warnings":{"items":{"$ref":"#/components/schemas/ScheduleWarning"},"type":"array","title":"Warnings","description":"Set when creating or rescheduling: quota_may_be_exceeded means the schedule's month already has as many pins published or scheduled as the plan includes, so this pin may not publish."}},"type":"object","required":["id","workspace_id","pinterest_account_id","run_at","status","payload","created_at","updated_at"],"title":"ScheduleResponse","description":"Response schema for a schedule."},"ScheduleStatus":{"type":"string","enum":["scheduled","queued","deferred","running","done","failed","canceled"],"title":"ScheduleStatus","description":"Schedule status enum."},"ScheduleUpdate":{"properties":{"run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Run At","description":"New publish time (ISO 8601, with tz)"},"board_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Board Id","description":"Move the schedule to another board"},"title":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Title","description":"Pin title"},"description":{"anyOf":[{"type":"string","maxLength":800},{"type":"null"}],"title":"Description","description":"Pin description"},"link_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Link Url","description":"Destination URL for the pin"},"image_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Image Url","description":"Replace the media with a public URL"},"asset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Asset Id","description":"Replace the media with an uploaded asset"},"cover_image_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Cover Image Url","description":"Video cover image URL"},"cover_image_asset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cover Image Asset Id","description":"Video cover image asset ID"}},"type":"object","title":"ScheduleUpdate","description":"Request schema for editing a pending schedule.\n\nEvery field is optional; fields left out are unchanged. Only schedules in\n``scheduled`` status can be edited. ``description``, ``link_url`` and the\ncover image can be cleared with ``null``; ``title``, ``board_id`` and the\nmedia source cannot. Sending ``image_url`` replaces an ``asset_id`` and\nvice versa."},"ScheduleWarning":{"properties":{"code":{"type":"string","title":"Code","description":"Stable warning code, e.g. quota_may_be_exceeded"},"message":{"type":"string","title":"Message"},"remediation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remediation"},"limit_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Limit Type"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"},"plan_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Name"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Used","description":"Pins already published or scheduled in the schedule's month"},"recommended_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommended Plan"},"recommended_plan_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommended Plan Name"},"recommended_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recommended Limit"},"upgrade_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upgrade Url"}},"type":"object","required":["code","message"],"title":"ScheduleWarning","description":"Something the caller should know about a schedule that was still created."},"SwitchProjectRequest":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"}},"type":"object","required":["project_id"],"title":"SwitchProjectRequest","description":"Switch active project for current session."},"TeamActionResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"TeamActionResponse","description":"Simple success response for team mutations."},"TeamInvitationAcceptRequest":{"properties":{"token":{"type":"string","maxLength":512,"minLength":20,"title":"Token"}},"type":"object","required":["token"],"title":"TeamInvitationAcceptRequest","description":"Payload for accepting an invitation."},"TeamInvitationAcceptResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In"},"user":{"$ref":"#/components/schemas/AuthUserResponse"},"organization":{"$ref":"#/components/schemas/AuthOrganizationResponse"},"organization_role":{"type":"string","title":"Organization Role"},"permissions":{"$ref":"#/components/schemas/AuthPermissionResponse"},"active_project":{"$ref":"#/components/schemas/AuthWorkspaceResponse"},"projects":{"items":{"$ref":"#/components/schemas/AuthWorkspaceResponse"},"type":"array","title":"Projects"},"available_organizations":{"items":{"$ref":"#/components/schemas/AuthOrganizationSessionResponse"},"type":"array","title":"Available Organizations"},"workspace":{"$ref":"#/components/schemas/AuthWorkspaceResponse"}},"type":"object","required":["access_token","expires_in","user","organization","organization_role","permissions","active_project","projects","available_organizations","workspace"],"title":"TeamInvitationAcceptResponse","description":"Auth/session payload returned after accepting an invitation."},"TeamInvitationCreateRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"type":"string","maxLength":32,"minLength":4,"title":"Role"}},"type":"object","required":["email","role"],"title":"TeamInvitationCreateRequest","description":"Payload for creating a team invitation."},"TeamInvitationPreviewResponse":{"properties":{"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"organization_name":{"type":"string","title":"Organization Name"},"email":{"type":"string","format":"email","title":"Email"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"inviter_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inviter Name"},"inviter_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Inviter Email"},"team_access_enabled":{"type":"boolean","title":"Team Access Enabled"}},"type":"object","required":["organization_id","organization_name","email","role","status","expires_at","team_access_enabled"],"title":"TeamInvitationPreviewResponse","description":"Public preview of an invitation link."},"TeamInvitationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"email":{"type":"string","format":"email","title":"Email"},"role":{"type":"string","title":"Role"},"invited_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Invited By User Id"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accepted At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"inviter_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inviter Name"},"inviter_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Inviter Email"}},"type":"object","required":["id","organization_id","email","role","expires_at","created_at","updated_at"],"title":"TeamInvitationResponse","description":"Pending organization invitation."},"TeamInvitationsListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TeamInvitationResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"TeamInvitationsListResponse","description":"Collection of pending invitations."},"TeamMemberResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"role":{"type":"string","title":"Role"},"invited_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Invited By User Id"},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accepted At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"user":{"$ref":"#/components/schemas/AuthUserResponse"},"invited_by":{"anyOf":[{"$ref":"#/components/schemas/AuthUserResponse"},{"type":"null"}]}},"type":"object","required":["id","organization_id","user_id","role","created_at","updated_at","user"],"title":"TeamMemberResponse","description":"Accepted organization member with user details."},"TeamMemberUpdateRequest":{"properties":{"role":{"type":"string","maxLength":32,"minLength":4,"title":"Role"}},"type":"object","required":["role"],"title":"TeamMemberUpdateRequest","description":"Payload for updating a member role."},"TeamMembersListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TeamMemberResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"TeamMembersListResponse","description":"Collection of accepted members."},"TopPinsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PinAnalyticsSummary"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"sort_by":{"type":"string","title":"Sort By"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"}},"type":"object","required":["items","total","limit","offset","sort_by","start_date","end_date"],"title":"TopPinsResponse","description":"Pins ranked by a stored metric over the requested range."},"TrackResponse":{"properties":{"week":{"type":"string","title":"Week"},"requests_used":{"type":"integer","title":"Requests Used"},"requests_limit":{"type":"integer","title":"Requests Limit"},"quota_exhausted":{"type":"boolean","title":"Quota Exhausted"},"resets_at":{"type":"string","title":"Resets At"},"plan":{"type":"string","title":"Plan"},"plan_name":{"type":"string","title":"Plan Name"},"upgrade":{"anyOf":[{"$ref":"#/components/schemas/UpgradeInfo"},{"type":"null"}]}},"type":"object","required":["week","requests_used","requests_limit","quota_exhausted","resets_at","plan","plan_name"],"title":"TrackResponse"},"UpgradeInfo":{"properties":{"message":{"type":"string","title":"Message"},"remediation":{"type":"string","title":"Remediation"},"upgrade_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upgrade Url"},"limit_type":{"type":"string","title":"Limit Type"},"plan":{"type":"string","title":"Plan"},"plan_name":{"type":"string","title":"Plan Name"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Used"},"resets_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resets At"},"recommended_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommended Plan"},"recommended_plan_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommended Plan Name"},"recommended_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recommended Limit"}},"type":"object","required":["message","remediation","limit_type","plan","plan_name"],"title":"UpgradeInfo","description":"What to tell the person once the week's requests are used up."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebhookCreate":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url","description":"Webhook endpoint URL"},"secret":{"type":"string","maxLength":255,"minLength":16,"title":"Secret","description":"Secret for HMAC signing (min 16 chars)"},"events":{"items":{"type":"string"},"type":"array","title":"Events","description":"Event types to subscribe to","default":["pin.published","pin.failed"]},"is_enabled":{"type":"boolean","title":"Is Enabled","description":"Whether this webhook is active","default":true}},"type":"object","required":["url","secret"],"title":"WebhookCreate","description":"Request schema for creating a webhook."},"WebhookResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"is_enabled":{"type":"boolean","title":"Is Enabled"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","url","events","is_enabled","created_at","updated_at"],"title":"WebhookResponse","description":"Response schema for a webhook."},"WebhookUpdate":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Url","description":"Webhook endpoint URL"},"secret":{"anyOf":[{"type":"string","maxLength":255,"minLength":16},{"type":"null"}],"title":"Secret","description":"Secret for HMAC signing (min 16 chars)"},"events":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Events","description":"Event types to subscribe to"},"is_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Enabled","description":"Whether this webhook is active"}},"type":"object","title":"WebhookUpdate","description":"Request schema for updating a webhook."},"WorkspaceEnvironment":{"type":"string","enum":["production","sandbox"],"title":"WorkspaceEnvironment","description":"Environment mode for an isolated project/workspace."},"ErrorEnvelope":{"type":"object","title":"ErrorEnvelope","description":"Documented error contract carried by every non-2xx response.","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code."},"message":{"type":"string","description":"Human-readable explanation."},"remediation":{"type":"string","nullable":true,"description":"What to change to make the request succeed."},"request_id":{"type":"string","nullable":true,"description":"Correlates with the X-Request-ID header; quote it to support."}},"additionalProperties":true},"ErrorResponse":{"type":"object","title":"ErrorResponse","properties":{"detail":{"description":"Legacy detail payload (string, object, or list)."},"error":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"API key created via `/v1/api-keys`."},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT or API Key","description":"Auth header: `Authorization: Bearer <jwt-or-api-key>`."}}}}