{"openapi":"3.1.0","info":{"title":"Salesmorph","description":"The Salesmorph API","version":"0.1.0"},"paths":{"/v1/api_key":{"post":{"tags":["api_key"],"summary":"Create Api Key","description":"Create an API key. The full key appears only in this response.","operationId":"create_api_key_v1_api_key_post","security":[{"JWTBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["api_key"],"summary":"List Api Keys","description":"Paginated list of active keys (name + display prefix only).","operationId":"list_api_keys_v1_api_key_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationSchema_ApiKeyResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api_key/{key_id}":{"delete":{"tags":["api_key"],"summary":"Revoke Api Key","description":"Revoke a key. Takes effect on the next public-API request.","operationId":"revoke_api_key_v1_api_key__key_id__delete","security":[{"JWTBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/whoami":{"get":{"tags":["authentication"],"summary":"Whoami","description":"Get current user.\nArgs:\n    user (User, optional): User object. Defaults to Depends(get_current_user).","operationId":"whoami_v1_auth_whoami_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"JWTBearer":[]}]}},"/v1/auth/user":{"post":{"tags":["authentication"],"summary":"Create User","description":"Create a new user.\nArgs:\n    user (User): User object.\n    session (db, optional): Database session. Defaults to Depends(db).","operationId":"create_user_v1_auth_user_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]},"patch":{"tags":["authentication"],"summary":"Patch User","description":"Partial update a user.\nArgs:\n    user (User): User object.\n    session (db, optional): Database session. Defaults to Depends(db).","operationId":"patch_user_v1_auth_user_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/auth/impersonate/user":{"post":{"tags":["authentication"],"summary":"Impersonate User","description":"Impersonate a user.\nArgs:\n    user_id (int): User ID.\n    session (db, optional): Database session. Defaults to Depends(db).","operationId":"impersonate_user_v1_auth_impersonate_user_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpersonateUserPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/auth/impersonate/user/admin":{"post":{"tags":["authentication"],"summary":"Impersonate User Admin","description":"Impersonate a user for admins.\n\nAccepts EITHER admin Firebase auth (salesmorph-admin) or legacy\nx-admin-api-key (Appsmith / cron). Returns a Firebase custom token the\nadmin tool can hand to console.linktodm.com/impersonate?custom_token=...","operationId":"impersonate_user_admin_v1_auth_impersonate_user_admin_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpersonateUserPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/impersonate/me":{"post":{"tags":["authentication"],"summary":"Impersonate Me","description":"Get impersonate token for current user","operationId":"impersonate_me_v1_auth_impersonate_me_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenSchema"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/auth/users":{"get":{"tags":["authentication"],"summary":"Get Users","description":"Get all users.\nArgs:\n    session (db, optional): Database session. Defaults to Depends(db).","operationId":"get_users_v1_auth_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserResponse"},"type":"array","title":"Response Get Users V1 Auth Users Get"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/auth/{user_id}/delete":{"delete":{"tags":["authentication"],"summary":"Delete User","operationId":"delete_user_v1_auth__user_id__delete_delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/{user_id}/deactivate":{"post":{"tags":["authentication"],"summary":"Deactivate User","description":"Admin only. Deactivate a user and unsubscribe from all their webhooks.","operationId":"deactivate_user_v1_auth__user_id__deactivate_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/activate_me":{"post":{"tags":["authentication"],"summary":"Activate Me","description":"Current user activates their own account (subscribes webhooks).","operationId":"activate_me_v1_auth_activate_me_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"JWTBearer":[]}]}},"/v1/auth/logout_all_devices":{"post":{"tags":["authentication"],"summary":"Logout All Devices","description":"Current user signs out of all devices by revoking their refresh tokens.","operationId":"logout_all_devices_v1_auth_logout_all_devices_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoutAllDevicesResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/auth/delete_me":{"delete":{"tags":["authentication"],"summary":"Delete Me","operationId":"delete_me_v1_auth_delete_me_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"JWTBearer":[]}]}},"/v1/auth/delete_me_async":{"delete":{"tags":["authentication"],"summary":"Delete Me Async","description":"Schedule the current user's account for deletion after a grace period.\n\nQueues a Cloud Task that calls the synchronous `delete_user` endpoint once\nthe grace period elapses. The account keeps working until then.","operationId":"delete_me_async_v1_auth_delete_me_async_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleUserDeletionResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/auth/cancel_my_deletion":{"post":{"tags":["authentication"],"summary":"Cancel My Deletion","description":"Cancel the current user's scheduled account deletion.\n\nDeletes the queued Cloud Task and clears the flag, so the account is no\nlonger on the deletion path.","operationId":"cancel_my_deletion_v1_auth_cancel_my_deletion_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelUserDeletionResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/auth/send_magic_link":{"post":{"tags":["authentication"],"summary":"Send Magic Link","operationId":"send_magic_link_v1_auth_send_magic_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMagicLinkPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/verify_login_otp":{"post":{"tags":["authentication"],"summary":"Verify Login Otp","description":"Exchange the code from the magic link email for custom tokens.","operationId":"verify_login_otp_v1_auth_verify_login_otp_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyLoginOtpPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyLoginOtpResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/send_email_verification":{"post":{"tags":["authentication"],"summary":"Send Email Verification","description":"Email the current user a code to verify the email.","operationId":"send_email_verification_v1_auth_send_email_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailVerificationPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/auth/verify_email":{"post":{"tags":["authentication"],"summary":"Verify Email","description":"Check the emailed code and save the email as verified on the user.","operationId":"verify_email_v1_auth_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/website/join_waitlist":{"post":{"tags":["website"],"summary":"Add Email To Waitlist","operationId":"add_email_to_waitlist_v1_website_join_waitlist_post","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","format":"email","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/website/get_country_code_by_ip":{"get":{"tags":["website"],"summary":"Get Country Code By Ip","operationId":"get_country_code_by_ip_v1_website_get_country_code_by_ip_get","parameters":[{"name":"ip_address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"}},{"name":"X-Forwarded-For","in":"header","required":false,"schema":{"title":"X-Forwarded-For"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/website/ad_campaign_tracker":{"post":{"tags":["website"],"summary":"Upsert Ad Campaign Tracker","operationId":"upsert_ad_campaign_tracker_v1_website_ad_campaign_tracker_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdCampaignTrackerRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/facebook/account":{"post":{"tags":["facebook"],"summary":"Upsert Facebook Account","operationId":"upsert_facebook_account_v1_facebook_account_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacebookAccountPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiModelResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/facebook/link_instagram_with_facebook_account":{"patch":{"tags":["facebook"],"summary":"Link Instagram With Facebook Account","operationId":"link_instagram_with_facebook_account_v1_facebook_link_instagram_with_facebook_account_patch","security":[{"JWTBearer":[]}],"parameters":[{"name":"page_id","in":"query","required":true,"schema":{"type":"string","title":"Page Id"}},{"name":"page_access_token","in":"query","required":true,"schema":{"type":"string","title":"Page Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/facebook/access_tokens":{"get":{"tags":["facebook"],"summary":"Get Facebook Access Token","operationId":"get_facebook_access_token_v1_facebook_access_tokens_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/TokenType"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/facebook/has_valid_user_access_token":{"get":{"tags":["facebook"],"summary":"Has Valid User Access Token","operationId":"has_valid_user_access_token_v1_facebook_has_valid_user_access_token_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Response Has Valid User Access Token V1 Facebook Has Valid User Access Token Get"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/facebook/has_valid_page_access_token":{"get":{"tags":["facebook"],"summary":"Has Valid Page Access Token","operationId":"has_valid_page_access_token_v1_facebook_has_valid_page_access_token_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Response Has Valid Page Access Token V1 Facebook Has Valid Page Access Token Get"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/facebook/access_token":{"post":{"tags":["facebook"],"summary":"Create Facebook Access Token","operationId":"create_facebook_access_token_v1_facebook_access_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacebookAccessTokenPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiModelResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/facebook/oauth/access_token":{"get":{"tags":["facebook"],"summary":"Get Facebook Oauth Access Token","operationId":"get_facebook_oauth_access_token_v1_facebook_oauth_access_token_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"short_lived_access_token","in":"query","required":true,"schema":{"type":"string","title":"Short Lived Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/facebook/oauth/access_token_info":{"get":{"tags":["facebook"],"summary":"Get Facebook Access Token Info","operationId":"get_facebook_access_token_info_v1_facebook_oauth_access_token_info_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"access_token","in":"query","required":true,"schema":{"type":"string","title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/facebook/webhook":{"get":{"tags":["facebook"],"summary":"Facebook Webhook Verify","description":"On webook verification VERIFY_TOKEN has to match the token at the\nconfiguration and send back \"hub.challenge\" as success.","operationId":"facebook_webhook_verify_v1_facebook_webhook_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["facebook"],"summary":"Facebook Webhook","description":"No DB dependency: entries are queued, or processed inline by the fallback.","operationId":"facebook_webhook_v1_facebook_webhook_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/facebook/webhook/entry_action":{"post":{"tags":["facebook"],"summary":"Facebook Webhook Entry Action","description":"Run the webhook entry action for one entry of the given Meta object.","operationId":"facebook_webhook_entry_action_v1_facebook_webhook_entry_action_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacebookWebhookEntryPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/facebook/send_message":{"post":{"tags":["facebook"],"summary":"Send Message","operationId":"send_message_v1_facebook_send_message_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacebookSendMessagePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/facebook/reply_to_comment":{"post":{"tags":["facebook"],"summary":"Reply To Comment","operationId":"reply_to_comment_v1_facebook_reply_to_comment_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacebookCommentReplyPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/facebook/test/otp":{"get":{"tags":["facebook"],"summary":"Get Facebook Test Otp","operationId":"get_facebook_test_otp_v1_facebook_test_otp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Get Facebook Test Otp V1 Facebook Test Otp Get"}}}}}}},"/v1/facebook/test/instagram/nikil123q/otp":{"get":{"tags":["facebook"],"summary":"Get Instagram Test Otp","operationId":"get_instagram_test_otp_v1_facebook_test_instagram_nikil123q_otp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Get Instagram Test Otp V1 Facebook Test Instagram Nikil123Q Otp Get"}}}}}}},"/v1/facebook/test/instagram/ubuntu123q/otp":{"get":{"tags":["facebook"],"summary":"Get Instagram Ubuntu123Q Test Otp","operationId":"get_instagram_ubuntu123q_test_otp_v1_facebook_test_instagram_ubuntu123q_otp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Get Instagram Ubuntu123Q Test Otp V1 Facebook Test Instagram Ubuntu123Q Otp Get"}}}}}}},"/v1/facebook/send_private_reply":{"post":{"tags":["facebook"],"summary":"Send Private Reply","operationId":"send_private_reply_v1_facebook_send_private_reply_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacebookSendPrivateReplyPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/facebook/on_instagram_connect_success":{"post":{"tags":["facebook"],"summary":"On Instagram Connect Success","operationId":"on_instagram_connect_success_v1_facebook_on_instagram_connect_success_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramConnectSuccessPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiModelResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/facebook/disconnect_facebook":{"delete":{"tags":["facebook"],"summary":"Disconnect Facebook","operationId":"disconnect_facebook_v1_facebook_disconnect_facebook_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"JWTBearer":[]}]}},"/v1/facebook/create_subscription":{"post":{"tags":["facebook"],"summary":"Create Subscription","operationId":"create_subscription_v1_facebook_create_subscription_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"JWTBearer":[]}]}},"/v1/facebook/{account_id}/create_subscription_per_page":{"post":{"tags":["facebook"],"summary":"Create Subscription Per Page","operationId":"create_subscription_per_page_v1_facebook__account_id__create_subscription_per_page_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/facebook/valid_user_access_tokens":{"get":{"tags":["facebook"],"summary":"Get Valid Facebook Access Tokens","operationId":"get_valid_facebook_access_tokens_v1_facebook_valid_user_access_tokens_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacebookValidAccessTokenResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/facebook/on_facebook_connect_success":{"post":{"tags":["facebook"],"summary":"On Facebook Connect Success","operationId":"on_facebook_connect_success_v1_facebook_on_facebook_connect_success_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacebookOauthSuccessPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiModelResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/facebook/on_add_instagram_connect_success":{"post":{"tags":["facebook"],"summary":"On Add Instagram Connect Success","operationId":"on_add_instagram_connect_success_v1_facebook_on_add_instagram_connect_success_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacebookOauthSuccessPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/facebook/on_add_facebook_page_connect_success":{"post":{"tags":["facebook"],"summary":"On Add Facebook Page Connect Success","operationId":"on_add_facebook_page_connect_success_v1_facebook_on_add_facebook_page_connect_success_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacebookOauthSuccessPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/facebook/feed":{"get":{"tags":["facebook"],"summary":"Get Facebook Feed","operationId":"get_facebook_feed_v1_facebook_feed_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"instagram_user_id","in":"query","required":true,"schema":{"type":"string","title":"Instagram User Id"}},{"name":"after","in":"query","required":false,"schema":{"type":"string","title":"After"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/facebook/feed/{feed_id}/details":{"get":{"tags":["facebook"],"summary":"Get Facebook Feed Details","operationId":"get_facebook_feed_details_v1_facebook_feed__feed_id__details_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"feed_id","in":"path","required":true,"schema":{"type":"string","title":"Feed Id"}},{"name":"instagram_user_id","in":"query","required":true,"schema":{"type":"string","title":"Instagram User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/facebook/on_facebook_page_oauth_success":{"post":{"tags":["facebook"],"summary":"On Facebook Page Oauth Success","description":"Generate custom firebase token required for login/signup.","operationId":"on_facebook_page_oauth_success_v1_facebook_on_facebook_page_oauth_success_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacebookOauthSuccessPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacebookPageOauthSuccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/next_story/{created_by_user_id}/retry_to_find_new_user_story":{"post":{"tags":["automation","next_story"],"summary":"Retry To Find New User Story","description":"Retry to find new user story.","operationId":"retry_to_find_new_user_story_v1_automation_next_story__created_by_user_id__retry_to_find_new_user_story_post","parameters":[{"name":"created_by_user_id","in":"path","required":true,"schema":{"type":"integer","title":"Created By User Id"}},{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/follow_up/send_follow_up_message":{"post":{"tags":["automation","follow_up"],"summary":"Send Follow Up Message","operationId":"send_follow_up_message_v1_automation_follow_up_send_follow_up_message_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendFollowUpMessagePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/collect_info/on_data_item_collected":{"post":{"tags":["automation","collect_info"],"summary":"On Data Item Collected Async","operationId":"on_data_item_collected_async_v1_automation_collect_info_on_data_item_collected_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataItemCollectedPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/dm_variations/generate":{"post":{"tags":["automation","dm_variations"],"summary":"Generate Dm Variations","description":"Generate slight AI variations of the payload's DM content.\n\nOnly text (message, card titles, button labels) is rewritten — URLs\nand images are copied from the payload verbatim. Not supported for\nAttachment automations (nothing textual to vary). Returns null when\nthe model fails so the client can fall back to manual entry.","operationId":"generate_dm_variations_v1_automation_dm_variations_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DmVariationPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GenerateDmVariationsResponse"},{"type":"null"}],"title":"Response Generate Dm Variations V1 Automation Dm Variations Generate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/automation/quick_reply/perform_quick_reply":{"post":{"tags":["automation","quick_reply"],"summary":"Perform Quick Reply","operationId":"perform_quick_reply_v1_automation_quick_reply_perform_quick_reply_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformQuickReplyPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation":{"post":{"tags":["automation"],"summary":"Create Automation","operationId":"create_automation_v1_automation_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/automation/{automation_id}/update":{"put":{"tags":["automation"],"summary":"Update Automation","operationId":"update_automation_v1_automation__automation_id__update_put","security":[{"JWTBearer":[]}],"parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Automation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["automation"],"summary":"Patch Automation","operationId":"patch_automation_v1_automation__automation_id__update_patch","security":[{"JWTBearer":[]}],"parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Automation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationDBEditPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/{automation_id}/view":{"get":{"tags":["automation"],"summary":"Get Automation","operationId":"get_automation_v1_automation__automation_id__view_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/{automation_id}/delete":{"delete":{"tags":["automation"],"summary":"Delete Automation","operationId":"delete_automation_v1_automation__automation_id__delete_delete","security":[{"JWTBearer":[]}],"parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Automation Id"}},{"name":"soft_delete","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Soft Delete"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/{automation_id}/duplicate":{"post":{"tags":["automation"],"summary":"Duplicate Automation","description":"Duplicate an automation by setting media_id as null.","operationId":"duplicate_automation_v1_automation__automation_id__duplicate_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/perform_auto_dm":{"post":{"tags":["automation"],"summary":"Perform Auto Dm","operationId":"perform_auto_dm_v1_automation_perform_auto_dm_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformAutoDMPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/summary":{"get":{"tags":["automation"],"summary":"Get Automation Summary","operationId":"get_automation_summary_v1_automation_summary_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"facebook_account_id","in":"query","required":false,"schema":{"type":"string","title":"Facebook Account Id"}},{"name":"instagram_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/{automation_id}/rewind":{"post":{"tags":["automation"],"summary":"Rewind Automation Admin","operationId":"rewind_automation_admin_v1_automation__automation_id__rewind_post","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Automation Id"}},{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/perform_share_auto_dm":{"post":{"tags":["automation"],"summary":"Perform Share Auto Dm","operationId":"perform_share_auto_dm_v1_automation_perform_share_auto_dm_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformShareAutoDMPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/send_automation_dm":{"post":{"tags":["automation"],"summary":"Send Automation Dm","operationId":"send_automation_dm_v1_automation_send_automation_dm_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendAutomationDMPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/perform_story_auto_dm":{"post":{"tags":["automation"],"summary":"Perform Story Auto Dm","operationId":"perform_story_auto_dm_v1_automation_perform_story_auto_dm_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformStoryAutoDMPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/perform_story_mention_auto_dm":{"post":{"tags":["automation"],"summary":"Perform Story Mention Auto Dm","operationId":"perform_story_mention_auto_dm_v1_automation_perform_story_mention_auto_dm_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformStoryMentionAutoDMPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/rewind_automation_comments":{"post":{"tags":["automation"],"summary":"Rewind Automation Comments","operationId":"rewind_automation_comments_v1_automation_rewind_automation_comments_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RewindAutomationCommentsPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/automation_rewind/{automation_rewind_id}/feed":{"get":{"tags":["automation"],"summary":"Get Automation Rewind Feed","operationId":"get_automation_rewind_feed_v1_automation_automation_rewind__automation_rewind_id__feed_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"automation_rewind_id","in":"path","required":true,"schema":{"type":"integer","title":"Automation Rewind Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":5,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RewindFeedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/automation_rewind/{automation_rewind_id}/update":{"patch":{"tags":["automation"],"summary":"Update Automation Rewind","operationId":"update_automation_rewind_v1_automation_automation_rewind__automation_rewind_id__update_patch","security":[{"JWTBearer":[]}],"parameters":[{"name":"automation_rewind_id","in":"path","required":true,"schema":{"type":"integer","title":"Automation Rewind Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRewindEditPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/user/{automation_id}/rewind":{"post":{"tags":["automation"],"summary":"Rewind Automation","operationId":"rewind_automation_v1_automation_user__automation_id__rewind_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/get_automations_stats":{"post":{"tags":["automation"],"summary":"Get Automations Stats","operationId":"get_automations_stats_v1_automation_get_automations_stats_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationStatsPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/automation/options":{"get":{"tags":["automation"],"summary":"Get Automation Options","description":"Id and name of the channel's active automations of one kind.","operationId":"get_automation_options_v1_automation_options_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"channel_id","in":"query","required":true,"schema":{"type":"string","title":"Channel Id"}},{"name":"automation_type","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AutomationOptionType"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AutomationOptionSchema"},"title":"Response Get Automation Options V1 Automation Options Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/all":{"get":{"tags":["automation"],"summary":"Get All Automations Legacy","operationId":"get_all_automations_legacy_v1_automation_all_get","deprecated":true,"security":[{"JWTBearer":[]}],"parameters":[{"name":"facebook_account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"}},{"name":"instagram_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"}},{"name":"channel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AutomationCategory"},{"type":"null"}],"title":"Category"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"automation_types[]","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/AutomationTypeFilter"},"default":[],"title":"Automation Types[]"}},{"name":"triggers[]","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/AutomationTriggerFilter"},"default":[],"title":"Triggers[]"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AutomationStatusFilter"},{"type":"null"}],"title":"Status"}},{"name":"include_conversation_starter","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Conversation Starter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagiantionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/all_counts":{"get":{"tags":["automation"],"summary":"Get All Automations Counts Legacy","operationId":"get_all_automations_counts_legacy_v1_automation_all_counts_get","deprecated":true,"security":[{"JWTBearer":[]}],"parameters":[{"name":"facebook_account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"}},{"name":"instagram_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"}},{"name":"channel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AutomationCategory"},{"type":"null"}],"title":"Category"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"automation_types[]","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/AutomationTypeFilter"},"default":[],"title":"Automation Types[]"}},{"name":"triggers[]","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/AutomationTriggerFilter"},"default":[],"title":"Triggers[]"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AutomationStatusFilter"},{"type":"null"}],"title":"Status"}},{"name":"include_conversation_starter","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Conversation Starter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllAutomationsCountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/get_all_automations_stats":{"post":{"tags":["automation"],"summary":"Get All Automations Stats Legacy","operationId":"get_all_automations_stats_legacy_v1_automation_get_all_automations_stats_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllAutomationsStatsPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllAutomationsStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"JWTBearer":[]}]}},"/v1/automation/media_details":{"post":{"tags":["automation"],"summary":"Get Automation Media Details Legacy","operationId":"get_automation_media_details_legacy_v1_automation_media_details_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationMediaDetailsPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationMediaDetailsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"JWTBearer":[]}]}},"/v1/automation/records/{record_id}/pin":{"patch":{"tags":["automation"],"summary":"Pin Automation Record Legacy","operationId":"pin_automation_record_legacy_v1_automation_records__record_id__pin_patch","deprecated":true,"security":[{"JWTBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRecordPinPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRecordPinResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/records/{record_id}/toggle":{"patch":{"tags":["automation"],"summary":"Toggle Automation Record Legacy","operationId":"toggle_automation_record_legacy_v1_automation_records__record_id__toggle_patch","deprecated":true,"security":[{"JWTBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRecordTogglePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRecordToggleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/records/{record_id}/suggest_name":{"post":{"tags":["automation"],"summary":"Suggest Automation Record Name Legacy","operationId":"suggest_automation_record_name_legacy_v1_automation_records__record_id__suggest_name_post","deprecated":true,"security":[{"JWTBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRecordSuggestNameResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/records/{record_id}":{"delete":{"tags":["automation"],"summary":"Delete Automation Record Legacy","operationId":"delete_automation_record_legacy_v1_automation_records__record_id__delete","deprecated":true,"security":[{"JWTBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRecordDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation/inactivate_all":{"post":{"tags":["automation"],"summary":"Inactivate All Automations Legacy","operationId":"inactivate_all_automations_legacy_v1_automation_inactivate_all_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InactivateAllAutomationsPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InactivateAllAutomationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"JWTBearer":[]}]}},"/v1/agent":{"post":{"tags":["agent"],"summary":"Create Agent","operationId":"create_agent_v1_agent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiModelResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/agent/evaluate_like":{"post":{"tags":["agent"],"summary":"Evaluate Like","description":"Decide whether the like agent should like a comment.","operationId":"evaluate_like_v1_agent_evaluate_like_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateCommentPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateCommentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/agent/evaluate_hide":{"post":{"tags":["agent"],"summary":"Evaluate Hide","description":"Decide whether the comment-moderation agent should hide a comment.","operationId":"evaluate_hide_v1_agent_evaluate_hide_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateCommentPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateCommentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/agent/all":{"get":{"tags":["agent"],"summary":"Get All Agents","operationId":"get_all_agents_v1_agent_all_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"channel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"}},{"name":"agent_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentType"},{"type":"null"}],"title":"Agent Type"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationSchema_AgentResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/{agent_id}/view":{"get":{"tags":["agent"],"summary":"Get Agent","operationId":"get_agent_v1_agent__agent_id__view_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/{agent_id}/update":{"put":{"tags":["agent"],"summary":"Update Agent","operationId":"update_agent_v1_agent__agent_id__update_put","security":[{"JWTBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiModelResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/{agent_id}/toggle":{"patch":{"tags":["agent"],"summary":"Toggle Agent","description":"Set the agent's active state (the dashboard on/off switch).","operationId":"toggle_agent_v1_agent__agent_id__toggle_patch","security":[{"JWTBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTogglePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiModelResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/{agent_id}/delete":{"delete":{"tags":["agent"],"summary":"Delete Agent","description":"Soft delete: the agent disappears from every list and is deactivated.","operationId":"delete_agent_v1_agent__agent_id__delete_delete","security":[{"JWTBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiModelResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation_table/rows":{"get":{"tags":["automation_table"],"summary":"Get All Automations","description":"A page of the table: every kind of automation under the search, the\nfilters and the status tab, the conversation starter pinned on top when\nasked for.","operationId":"get_all_automations_v1_automation_table_rows_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"facebook_account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"}},{"name":"instagram_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"}},{"name":"channel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AutomationCategory"},{"type":"null"}],"title":"Category"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"automation_types[]","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/AutomationTypeFilter"},"default":[],"title":"Automation Types[]"}},{"name":"triggers[]","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/AutomationTriggerFilter"},"default":[],"title":"Triggers[]"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AutomationStatusFilter"},{"type":"null"}],"title":"Status"}},{"name":"include_conversation_starter","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Conversation Starter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagiantionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation_table/counts":{"get":{"tags":["automation_table"],"summary":"Get All Automations Counts","description":"Counts for the table's status tabs and filter popup. Takes the same\nquery as the rows; page and limit are ignored.","operationId":"get_all_automations_counts_v1_automation_table_counts_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"facebook_account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"}},{"name":"instagram_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"}},{"name":"channel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AutomationCategory"},{"type":"null"}],"title":"Category"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"automation_types[]","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/AutomationTypeFilter"},"default":[],"title":"Automation Types[]"}},{"name":"triggers[]","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/AutomationTriggerFilter"},"default":[],"title":"Triggers[]"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AutomationStatusFilter"},{"type":"null"}],"title":"Status"}},{"name":"include_conversation_starter","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Conversation Starter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllAutomationsCountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation_table/stats":{"post":{"tags":["automation_table"],"summary":"Get All Automations Stats","description":"Hits, clicks and the last 7 days of a page of rows, by record id.","operationId":"get_all_automations_stats_v1_automation_table_stats_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllAutomationsStatsPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllAutomationsStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/automation_table/media_details":{"post":{"tags":["automation_table"],"summary":"Get Automation Media Details","description":"Thumbnails, captions and counts of the posts the rows preview.","operationId":"get_automation_media_details_v1_automation_table_media_details_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationMediaDetailsPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationMediaDetailsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/automation_table/by_media":{"post":{"tags":["automation_table"],"summary":"Get Automations By Media","description":"The user's published basic automations and flows on each of the given\nmedia, keyed by media id: record id, name and whether each is on. Drafts\nare left out.","operationId":"get_automations_by_media_v1_automation_table_by_media_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationsByMediaPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationsByMediaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/automation_table/rows/{record_id}/pin":{"patch":{"tags":["automation_table"],"summary":"Pin Automation Record","description":"Pin a row to the top, or unpin it. The conversation starter is always\npinned.","operationId":"pin_automation_record_v1_automation_table_rows__record_id__pin_patch","security":[{"JWTBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRecordPinPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRecordPinResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation_table/rows/{record_id}/toggle":{"patch":{"tags":["automation_table"],"summary":"Toggle Automation Record","description":"Switch a row on or off. Answers with the record id the row is listed\nunder from now on.","operationId":"toggle_automation_record_v1_automation_table_rows__record_id__toggle_patch","security":[{"JWTBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRecordTogglePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRecordToggleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation_table/rows/{record_id}/suggest_name":{"post":{"tags":["automation_table"],"summary":"Suggest Automation Record Name","description":"A short name for a row, suggested by AI from its keywords, its post's\ncaption and what it sends. `name` is null when the model gave none.","operationId":"suggest_automation_record_name_v1_automation_table_rows__record_id__suggest_name_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRecordSuggestNameResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation_table/rows/{record_id}":{"delete":{"tags":["automation_table"],"summary":"Delete Automation Record","description":"Delete a row. A conversation starter is deleted for good, with its\nicebreakers and their taps.","operationId":"delete_automation_record_v1_automation_table_rows__record_id__delete","security":[{"JWTBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRecordDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/automation_table/inactivate_all":{"post":{"tags":["automation_table"],"summary":"Inactivate All Automations","description":"Switch every automation of a channel off.","operationId":"inactivate_all_automations_v1_automation_table_inactivate_all_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InactivateAllAutomationsPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InactivateAllAutomationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/event_tracker":{"post":{"tags":["event_tracker"],"summary":"Create Event","operationId":"create_event_v1_event_tracker_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/event_tracker/automation/{automation_id}/redirect":{"get":{"tags":["event_tracker"],"summary":"Redirect Automation Url","operationId":"redirect_automation_url_v1_event_tracker_automation__automation_id__redirect_get","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Automation Id"}},{"name":"url","in":"query","required":true,"schema":{"type":"string","title":"Url"}},{"name":"source","in":"query","required":true,"schema":{"$ref":"#/components/schemas/SourceType"}},{"name":"from_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From User Id"}},{"name":"from_username","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Username"}},{"name":"from_message_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Message Id"}},{"name":"X-Forwarded-For","in":"header","required":false,"schema":{"title":"X-Forwarded-For"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/event_tracker/flow_automation/redirect":{"get":{"tags":["event_tracker"],"summary":"Redirect Flow Automation Url","operationId":"redirect_flow_automation_url_v1_event_tracker_flow_automation_redirect_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}},{"name":"X-Forwarded-For","in":"header","required":false,"schema":{"title":"X-Forwarded-For"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/event_tracker/automation/track_click_event":{"post":{"tags":["event_tracker"],"summary":"Track Click Event","operationId":"track_click_event_v1_event_tracker_automation_track_click_event_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickEvenPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/event_tracker/flow_automation/track_click_event":{"post":{"tags":["event_tracker"],"summary":"Track Flow Click Event","operationId":"track_flow_click_event_v1_event_tracker_flow_automation_track_click_event_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowClickEvenPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/event_tracker/list":{"post":{"tags":["event_tracker"],"summary":"Get Event Tracker List","operationId":"get_event_tracker_list_v1_event_tracker_list_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventTrackerFilterPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagiantionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/event_tracker/click_event_count_by_country":{"get":{"tags":["event_tracker"],"summary":"Get Click Event Count By Country","operationId":"get_click_event_count_by_country_v1_event_tracker_click_event_count_by_country_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"automation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickEventCountByCountryResponseSchema"},"title":"Response Get Click Event Count By Country V1 Event Tracker Click Event Count By Country Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/event_tracker/new_followers":{"post":{"tags":["event_tracker"],"summary":"Get New Followers","operationId":"get_new_followers_v1_event_tracker_new_followers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewFollowersFilterPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagiantionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/event_tracker/automation/{automation_id}/analytics":{"get":{"tags":["event_tracker"],"summary":"Get Automation Analytics","operationId":"get_automation_analytics_v1_event_tracker_automation__automation_id__analytics_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationAnalyticsResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/event_tracker/flow_automation/{flow_automation_id}/analytics":{"get":{"tags":["event_tracker"],"summary":"Get Flow Automation Analytics","description":"Consolidated analytics for one flow automation.\n\nFlow counterpart of `/automation/{automation_id}/analytics`. The funnel is\ntriggers -> DMs sent -> clicks (flow automations have no Ask-to-Follow\naction, so there is no follows stage).","operationId":"get_flow_automation_analytics_v1_event_tracker_flow_automation__flow_automation_id__analytics_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"flow_automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Flow Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowAutomationAnalyticsResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/event_tracker/flow_automation/{flow_automation_id}/events":{"get":{"tags":["event_tracker"],"summary":"Get Flow Event Tracker List","description":"Paginated flow events for the analytics activity tabs.","operationId":"get_flow_event_tracker_list_v1_event_tracker_flow_automation__flow_automation_id__events_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"flow_automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Flow Automation Id"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/FlowEventType"},{"type":"null"}],"title":"Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationSchema_FlowEventTrackerResponseSchema_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/event_tracker/summary":{"post":{"tags":["event_tracker"],"summary":"Get Event Summary","operationId":"get_event_summary_v1_event_tracker_summary_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventTrackerFilterPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventSummaryResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/event_tracker/new_followers_summary":{"post":{"tags":["event_tracker"],"summary":"Get New Followers Summary","operationId":"get_new_followers_summary_v1_event_tracker_new_followers_summary_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewFollowersFilterPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventSummaryResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/event_tracker/temp_event_trackers":{"delete":{"tags":["event_tracker"],"summary":"Delete Temp Event Trackers","description":"Delete temp_event_tracker rows older than `daysAgo` days (0 = all rows).","operationId":"delete_temp_event_trackers_v1_event_tracker_temp_event_trackers_delete","parameters":[{"name":"daysAgo","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Delete temp_event_tracker rows created more than this many days ago. 0 (the default) deletes every row.","default":0,"title":"Daysago"},"description":"Delete temp_event_tracker rows created more than this many days ago. 0 (the default) deletes every row."},{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteTempEventTrackersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/link_scrapper/preview_detail":{"get":{"tags":["link_scrapper"],"summary":"Get Preview Detail","operationId":"get_preview_detail_v1_link_scrapper_preview_detail_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","title":"Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/link_scrapper/preview_detail/safe":{"get":{"tags":["link_scrapper"],"summary":"Get Preview Detail Safe","operationId":"get_preview_detail_safe_v1_link_scrapper_preview_detail_safe_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","title":"Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/link_scrapper/upload/image":{"post":{"tags":["link_scrapper"],"summary":"Upload Image","description":"Upload file to GCS bucket and return the URL.","operationId":"upload_image_v1_link_scrapper_upload_image_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_image_v1_link_scrapper_upload_image_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/link_scrapper/upload/image_url":{"post":{"tags":["link_scrapper"],"summary":"Upload Image Url","description":"Upload file to GCS bucket and return the URL.","operationId":"upload_image_url_v1_link_scrapper_upload_image_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadImage"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/blog/babylovegrowth_webhook":{"post":{"tags":["blog"],"summary":"Babylovegrowth Webhook","operationId":"babylovegrowth_webhook_v1_blog_babylovegrowth_webhook_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBabylovegrowthBlogPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/blog/view/{slug}":{"get":{"tags":["blog"],"summary":"Get Blog By Slug","operationId":"get_blog_by_slug_v1_blog_view__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/blog/preview/{token}":{"get":{"tags":["blog"],"summary":"Get Blog By Preview Token","description":"Public but unguessable: render a blog from a signed preview token.\nServes drafts and inactive posts (that's the point), so the token is the\nonly credential. Anything unusable — bad signature, wrong purpose,\nexpired, deleted blog — comes back as a plain 404.\n\nThe website mounts this at /blogs/preview/{token} and renders it with the\nsame template as a published post, with noindex set.","operationId":"get_blog_by_preview_token_v1_blog_preview__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/blog/list":{"get":{"tags":["blog"],"summary":"Get Blogs","operationId":"get_blogs_v1_blog_list_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"author","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}},{"name":"slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slugs"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/blog/{blog_id}/delete":{"delete":{"tags":["blog"],"summary":"Delete Blog","operationId":"delete_blog_v1_blog__blog_id__delete_delete","parameters":[{"name":"blog_id","in":"path","required":true,"schema":{"type":"integer","title":"Blog Id"}},{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/blog/admin/list":{"get":{"tags":["blog"],"summary":"Get Blogs Admin","description":"Admin-only blog list: includes inactive posts plus is_active and\ncreated_at, for the admin console management table.","operationId":"get_blogs_admin_v1_blog_admin_list_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/blog/admin/{blog_id}":{"get":{"tags":["blog"],"summary":"Get Blog Admin","description":"Admin-only fetch of a single blog by id, including full content and\nregardless of active status, for the admin console edit view.","operationId":"get_blog_admin_v1_blog_admin__blog_id__get","security":[{"JWTBearer":[]}],"parameters":[{"name":"blog_id","in":"path","required":true,"schema":{"type":"integer","title":"Blog Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/blog/admin/{blog_id}/draft":{"delete":{"tags":["blog"],"summary":"Delete Blog Draft Admin","description":"Hard-delete a draft from the admin console blog table. Published posts\nare refused with 409 — they have a public URL, so deactivate them instead.\nFirebase-admin gated (ADMIN / SEO_ADMIN), unlike the legacy\nx-admin-api-key `delete_blog` above.","operationId":"delete_blog_draft_admin_v1_blog_admin__blog_id__draft_delete","security":[{"JWTBearer":[]}],"parameters":[{"name":"blog_id","in":"path","required":true,"schema":{"type":"integer","title":"Blog Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/blog/admin/{blog_id}/preview_token":{"get":{"tags":["blog"],"summary":"Get Blog Preview Token","description":"Mint an expiring link that renders this blog on the website, drafts\nincluded. The admin console opens `preview_url` in a new tab.","operationId":"get_blog_preview_token_v1_blog_admin__blog_id__preview_token_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"blog_id","in":"path","required":true,"schema":{"type":"integer","title":"Blog Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPreviewTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/blog/admin/upload_image":{"post":{"tags":["blog"],"summary":"Admin Upload Blog Image","description":"Admin-only image upload for the blog editor (hero + inline images).\nResizes and converts to .webp, stores it, and returns the public URL.\nFirebase-admin gated so the admin app can call it with its own token.","operationId":"admin_upload_blog_image_v1_blog_admin_upload_image_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_admin_upload_blog_image_v1_blog_admin_upload_image_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/blog/slugs":{"get":{"tags":["blog"],"summary":"Get All Blog Slugs","operationId":"get_all_blog_slugs_v1_blog_slugs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/blog/create":{"post":{"tags":["blog"],"summary":"Create Blog","operationId":"create_blog_v1_blog_create_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBlogPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/blog/{blog_id}/update":{"patch":{"tags":["blog"],"summary":"Update Blog","description":"Partially update a blog. Only fields included in the request body change;\nomitted fields are left untouched.\n\nNOTE: `slug` cannot be changed here. It is not a field on UpdateBlogPayload\nand is stripped defensively in the service, because the slug is the blog's\npublic URL — changing it drops SEO ranking and breaks inbound links. Rename\na slug only via a deliberate direct DB change.","operationId":"update_blog_v1_blog__blog_id__update_patch","parameters":[{"name":"blog_id","in":"path","required":true,"schema":{"type":"integer","title":"Blog Id"}},{"name":"x-admin-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBlogPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram/short_lived_access_token_from_code":{"post":{"tags":["instagram"],"summary":"Get Short Lived Access Token From Code","description":"Get short lived access token from code received during Instagram OAuth.","operationId":"get_short_lived_access_token_from_code_v1_instagram_short_lived_access_token_from_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramOauthSuccessPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram/long_lived_access_token":{"get":{"tags":["instagram"],"summary":"Get Long Lived Access Token","description":"Exchange short lived access token for long lived access token.","operationId":"get_long_lived_access_token_v1_instagram_long_lived_access_token_get","parameters":[{"name":"access_token","in":"query","required":true,"schema":{"type":"string","title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram/me":{"get":{"tags":["instagram"],"summary":"Get Me","description":"Exchange short lived access token for long lived access token.","operationId":"get_me_v1_instagram_me_get","parameters":[{"name":"access_token","in":"query","required":true,"schema":{"type":"string","title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramMeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram/on_instagram_oauth_success":{"post":{"tags":["instagram"],"summary":"On Instagram Oauth Success","description":"Generate custom firebase token required for login/signup.","operationId":"on_instagram_oauth_success_v1_instagram_on_instagram_oauth_success_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramOauthSuccessPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramOauthSuccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram/account":{"get":{"tags":["instagram"],"summary":"Get Instagram Account","description":"Get Instagram account details.","operationId":"get_instagram_account_v1_instagram_account_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InstagramAccount"},{"type":"null"}],"title":"Response Get Instagram Account V1 Instagram Account Get"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/instagram/webhook":{"get":{"tags":["instagram"],"summary":"Instagram Webhook Verify","description":"On webook verification VERIFY_TOKEN has to match the token at the\nconfiguration and send back \"hub.challenge\" as success.","operationId":"instagram_webhook_verify_v1_instagram_webhook_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["instagram"],"summary":"Instagram Webhook","description":"No DB dependency: entries are queued, or processed inline by the fallback.","operationId":"instagram_webhook_v1_instagram_webhook_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram/webhook/entry_action":{"post":{"tags":["instagram"],"summary":"Instagram Webhook Entry Action","description":"Run the webhook entry action for one entry.","operationId":"instagram_webhook_entry_action_v1_instagram_webhook_entry_action_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramWebhookEntryPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram/{ig_id}/user_profile":{"get":{"tags":["instagram"],"summary":"Get Instagram User Profile","description":"Get instagram user profile.\nArgs:\n    user_id (int): Instagram user id.","operationId":"get_instagram_user_profile_v1_instagram__ig_id__user_profile_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"ig_id","in":"path","required":true,"schema":{"type":"string","title":"Ig Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram/{instagram_account_id}/refresh_access_token":{"post":{"tags":["instagram"],"summary":"Refresh Instagram Access Token","description":"Refresh instagram access token.","operationId":"refresh_instagram_access_token_v1_instagram__instagram_account_id__refresh_access_token_post","parameters":[{"name":"instagram_account_id","in":"path","required":true,"schema":{"type":"string","title":"Instagram Account Id"}},{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram/batch_refresh_instagram_access_tokens":{"post":{"tags":["instagram"],"summary":"Batch Refresh Instagram Access Tokens","description":"Refresh all instagram account access tokens. used for cron job.","operationId":"batch_refresh_instagram_access_tokens_v1_instagram_batch_refresh_instagram_access_tokens_post","parameters":[{"name":"in_days","in":"query","required":false,"schema":{"type":"integer","default":3,"title":"In Days"}},{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram/{media_id}/comments":{"get":{"tags":["instagram"],"summary":"Get Instagram Media Comments","description":"Get instagram media comments.","operationId":"get_instagram_media_comments_v1_instagram__media_id__comments_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","title":"Media Id"}},{"name":"days_ago","in":"query","required":false,"schema":{"type":"integer","title":"Days Ago"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram/account_details":{"get":{"tags":["instagram"],"summary":"Get Instagram Account Details","description":"Get logged in user's instagram account details.","operationId":"get_instagram_account_details_v1_instagram_account_details_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"instagram_account_id","in":"query","required":false,"schema":{"type":"string","title":"Instagram Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramAccountDetailsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram/{comment_id}/reply":{"post":{"tags":["instagram"],"summary":"Reply To Comment","description":"Reply to instagram comment.","operationId":"reply_to_comment_v1_instagram__comment_id__reply_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","title":"Comment Id"}},{"name":"message","in":"query","required":true,"schema":{"type":"string","title":"Message"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram/on_add_instagram_oauth_success":{"post":{"tags":["instagram"],"summary":"On Add Instagram Oauth Success","description":"Do signup/login when Instagram OAuth is successful.","operationId":"on_add_instagram_oauth_success_v1_instagram_on_add_instagram_oauth_success_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramOauthSuccessPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/instagram/accounts":{"get":{"tags":["instagram"],"summary":"Get Instagram Accounts","description":"Get all instagram accounts for a user.","operationId":"get_instagram_accounts_v1_instagram_accounts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InstagramAccountResponse"},"type":"array","title":"Response Get Instagram Accounts V1 Instagram Accounts Get"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/agency":{"post":{"tags":["agency"],"summary":"Create Agency","operationId":"create_agency_v1_agency_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agency/{agency_id}/edit":{"patch":{"tags":["agency"],"summary":"Update Agency","operationId":"update_agency_v1_agency__agency_id__edit_patch","parameters":[{"name":"agency_id","in":"path","required":true,"schema":{"type":"integer","title":"Agency Id"}},{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agency/{agency_id}/unlink_user_from_agency":{"delete":{"tags":["agency"],"summary":"Unlink User From Agency","operationId":"unlink_user_from_agency_v1_agency__agency_id__unlink_user_from_agency_delete","parameters":[{"name":"agency_id","in":"path","required":true,"schema":{"type":"integer","title":"Agency Id"}},{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agency/link/user":{"get":{"tags":["agency"],"summary":"Get User Agency","operationId":"get_user_agency_v1_agency_link_user_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgencyResponse"},{"type":"null"}],"title":"Response Get User Agency V1 Agency Link User Get"}}}}},"security":[{"JWTBearer":[]}]},"post":{"tags":["agency"],"summary":"Link Current User To Agency","operationId":"link_current_user_to_agency_v1_agency_link_user_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkCurrentUserPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/agency/{agency_id}/view":{"get":{"tags":["agency"],"summary":"Get Agency By Id","operationId":"get_agency_by_id_v1_agency__agency_id__view_get","parameters":[{"name":"agency_id","in":"path","required":true,"schema":{"type":"integer","title":"Agency Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgencyResponse"},{"type":"null"}],"title":"Response Get Agency By Id V1 Agency  Agency Id  View Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/lemon_squeezy/products":{"get":{"tags":["subscription","lemon_squeezy"],"summary":"Get Products","description":"Get all products.","operationId":"get_products_v1_subscription_lemon_squeezy_products_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/subscription/lemon_squeezy/variants":{"get":{"tags":["subscription","lemon_squeezy"],"summary":"Get Variants","description":"Get all variants.","operationId":"get_variants_v1_subscription_lemon_squeezy_variants_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/LemonSqueezyVariantStatus","default":"published"}},{"name":"product_id","in":"query","required":false,"schema":{"type":"integer","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/lemon_squeezy/checkout":{"post":{"tags":["subscription","lemon_squeezy"],"summary":"Create Checkout","description":"Checkout a product.","operationId":"create_checkout_v1_subscription_lemon_squeezy_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/subscription/lemon_squeezy/webhook":{"post":{"tags":["subscription","lemon_squeezy"],"summary":"Handle Lemon Squeezy Webhook","description":"Handle Lemon Squeezy webhook.","operationId":"handle_lemon_squeezy_webhook_v1_subscription_lemon_squeezy_webhook_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/razorpay/webhook":{"post":{"tags":["subscription","razorpay"],"summary":"Handle Razorpay Webhook","description":"Handle Razorpay webhook.","operationId":"handle_razorpay_webhook_v1_subscription_razorpay_webhook_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/razorpay/invoice/{invoice_id}/download":{"get":{"tags":["subscription","razorpay"],"summary":"Download Invoice Pdf By Id","description":"Download invoice PDF by ID.","operationId":"download_invoice_pdf_by_id_v1_subscription_razorpay_invoice__invoice_id__download_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/razorpay/generate/{subscription_id}/invoice":{"post":{"tags":["subscription","razorpay"],"summary":"Generate Invoice For Subscription","description":"Generate invoice for a subscription.","operationId":"generate_invoice_for_subscription_v1_subscription_razorpay_generate__subscription_id__invoice_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}},{"name":"send_email","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Send Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/razorpay/invoices":{"get":{"tags":["subscription","razorpay"],"summary":"Get Invoices","description":"Get paginated list of invoices for the current user.","operationId":"get_invoices_v1_subscription_razorpay_invoices_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagiantionSchema_InvoicePreviewResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/razorpay/invoice/{invoice_id}/details":{"get":{"tags":["subscription","razorpay"],"summary":"Get Invoice Details","description":"Get invoice details by ID (returns invoice data, not PDF).","operationId":"get_invoice_details_v1_subscription_razorpay_invoice__invoice_id__details_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/dodo/webhook":{"post":{"tags":["subscription","dodo"],"summary":"Handle Dodo Webhook","description":"Handle Dodo Payments webhook (Standard Webhooks spec).\n\nSignature is verified in production. On processing failure this returns\na 500 ON PURPOSE — Dodo retries failed deliveries up to 8 times over\n~27h, and every handler path is idempotent, so the retry ladder is our\nerror recovery. Do not swallow exceptions here.","operationId":"handle_dodo_webhook_v1_subscription_dodo_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/subscription/{subscription_id}/cancel":{"delete":{"tags":["subscription"],"summary":"Cancel Subscription","description":"Cancel a subscription.","operationId":"cancel_subscription_v1_subscription__subscription_id__cancel_delete","security":[{"JWTBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/current_subscription":{"get":{"tags":["subscription"],"summary":"Get Current Subscription","description":"Get current subscription info for user.","operationId":"get_current_subscription_v1_subscription_current_subscription_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentSubscriptionResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/subscription/update_plan":{"post":{"tags":["subscription"],"summary":"Update Plan","description":"Update the plan/variant of a subscription (product name and variant id).\nSupported for subscriptions that use a compatible payment provider.","operationId":"update_plan_v1_subscription_update_plan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionPlanPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/subscription/{subscription_id}/lemon_squeezy_managed_urls":{"get":{"tags":["subscription"],"summary":"Get Lemon Squeezy Managed Urls","description":"Get signed managed URLs for Lemon Squeezy.","operationId":"get_lemon_squeezy_managed_urls_v1_subscription__subscription_id__lemon_squeezy_managed_urls_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LemonSqueezyManagedURLResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/{subscription_id}/razorpay_subscription":{"get":{"tags":["subscription"],"summary":"Get Get Razorpay Subscription","description":"Get Razorpay subscription or payment object.\n\nReturns:\n    - For monthly recurring subscriptions: Razorpay subscription object with type='subscription'\n    - For non-monthly plans (yearly, prepaid): Razorpay payment object with type='payment'","operationId":"get_get_razorpay_subscription_v1_subscription__subscription_id__razorpay_subscription_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RazorpaySubscriptionOrPaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/{subscription_id}/customer_portal":{"get":{"tags":["subscription"],"summary":"Get Customer Portal","description":"Manage-subscription / customer-portal URL for a subscription, resolved\nby its payment gateway (Lemon Squeezy, Dodo, or Razorpay). One endpoint so\nthe UI doesn't branch per provider.","operationId":"get_customer_portal_v1_subscription__subscription_id__customer_portal_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPortalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/cancellation_impact":{"get":{"tags":["subscription"],"summary":"Get Cancellation Impact","description":"Get stats showing what the user will lose if they cancel.","operationId":"get_cancellation_impact_v1_subscription_cancellation_impact_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancellationImpactResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/subscription/{subscription_id}/cancel_with_feedback":{"post":{"tags":["subscription"],"summary":"Cancel With Feedback","description":"Cancel a subscription with feedback reasons.","operationId":"cancel_with_feedback_v1_subscription__subscription_id__cancel_with_feedback_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancellationFeedbackPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/{subscription_id}/apply_retention_upgrade":{"post":{"tags":["subscription"],"summary":"Apply Retention Upgrade","description":"Upgrade a Pro subscription to Pro+ as a retention offer.","operationId":"apply_retention_upgrade_v1_subscription__subscription_id__apply_retention_upgrade_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/{subscription_id}/apply_retention_free_months":{"post":{"tags":["subscription"],"summary":"Apply Retention Free Months","description":"Pause billing for 2 months as a retention offer. One-time per user.","operationId":"apply_retention_free_months_v1_subscription__subscription_id__apply_retention_free_months_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/{subscription_id}/resume_paused":{"post":{"tags":["subscription"],"summary":"Resume Paused Subscription","description":"Resume a Razorpay subscription paused during retention. Called by GCP Cloud Task.","operationId":"resume_paused_subscription_v1_subscription__subscription_id__resume_paused_post","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}},{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/products":{"get":{"tags":["subscription"],"summary":"Get Subscription Products","description":"Checkout a product.","operationId":"get_subscription_products_v1_subscription_products_get","parameters":[{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},{"name":"ip_address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionProductResponse"},"title":"Response Get Subscription Products V1 Subscription Products Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/cancel_expired_subscription":{"patch":{"tags":["subscription"],"summary":"Cancel Expired Subscription","operationId":"cancel_expired_subscription_v1_subscription_cancel_expired_subscription_patch","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/{variant_id}/variant_details":{"get":{"tags":["subscription"],"summary":"Get Variant Details","operationId":"get_variant_details_v1_subscription__variant_id__variant_details_get","parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","title":"Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/order":{"post":{"tags":["subscription"],"summary":"Create Order","operationId":"create_order_v1_subscription_order_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/subscription/admin/create":{"post":{"tags":["subscription"],"summary":"Admin Create Subscription","operationId":"admin_create_subscription_v1_subscription_admin_create_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCreateSubscriptionPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiModelResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/billing_information":{"get":{"tags":["subscription"],"summary":"Get Billing Information","description":"Get billing information (tax details) for the current user.","operationId":"get_billing_information_v1_subscription_billing_information_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingInformationResponse"}}}}},"security":[{"JWTBearer":[]}]},"patch":{"tags":["subscription"],"summary":"Update Billing Information","description":"Update billing information (tax details) for the current user.","operationId":"update_billing_information_v1_subscription_billing_information_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBillingInformationPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingInformationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/subscription/payment_methods":{"get":{"tags":["subscription"],"summary":"Get Payment Methods","description":"Get payment methods for the current user.\nFor Razorpay, we can fetch from their API or return empty list.","operationId":"get_payment_methods_v1_subscription_payment_methods_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PaymentMethodResponse"},"type":"array","title":"Response Get Payment Methods V1 Subscription Payment Methods Get"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/ai/generate_auto_reply":{"post":{"tags":["ai"],"summary":"Generate Auto Reply Message","description":"Get auto reply message using AI","operationId":"generate_auto_reply_message_v1_ai_generate_auto_reply_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoReplyGeneratePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AutoReplyGenerateResponse"},{"type":"null"}],"title":"Response Generate Auto Reply Message V1 Ai Generate Auto Reply Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/ai/generate_auto_reply_variations":{"post":{"tags":["ai"],"summary":"Generate Auto Reply Variations","description":"Write one new variation of each of the creator's existing manual auto\nreplies, in the order given.\n\nEach variation rewrites its original — same meaning, tone, language and\nscript, different wording — and never repeats an original. Feeds the\n\"generate more\" action on the manual auto-reply pool; calling again with\nthe grown list doubles it. Meta penalizes automation accounts that send\nthe same public reply repeatedly.","operationId":"generate_auto_reply_variations_v1_ai_generate_auto_reply_variations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoReplyVariationsPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AutoReplyVariationsResponse"},{"type":"null"}],"title":"Response Generate Auto Reply Variations V1 Ai Generate Auto Reply Variations Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/ai/validate_intent":{"post":{"tags":["ai"],"summary":"Validate Intent","description":"Generate example comments that would match an AI_INTENT trigger\nprompt, in languages matching the user's country (e.g. Hinglish for\nIndia), so the creator can sanity-check the prompt before saving.","operationId":"validate_intent_v1_ai_validate_intent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateIntentPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidateIntentResponse"},{"type":"null"}],"title":"Response Validate Intent V1 Ai Validate Intent Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/ai/generate_auto_reply_prompt":{"post":{"tags":["ai"],"summary":"Generate Auto Reply Prompt","description":"Generate a tailored AI auto-reply prompt from a draft automation.\n\nBranches on `payload.type` to describe what the DM delivers, so each\nautomation gets a different, on-topic prompt instead of the same\nhardcoded default.","operationId":"generate_auto_reply_prompt_v1_ai_generate_auto_reply_prompt_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GenerateAutoReplyPromptResponse"},{"type":"null"}],"title":"Response Generate Auto Reply Prompt V1 Ai Generate Auto Reply Prompt Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/ai/generate_auto_reply_flow_prompt":{"post":{"tags":["ai"],"summary":"Generate Auto Reply Flow Prompt","description":"Generate a tailored AI auto-reply prompt from a flow's node graph.\n\nThe flow counterpart of `generate_auto_reply_prompt`. A flow's comment\ntrigger has no DM offer on the trigger node itself — the DM is sent by\ndownstream message nodes — so the service inspects those message nodes to\ndescribe what the contact receives, then writes an on-topic public\nauto-reply prompt for the comment trigger.","operationId":"generate_auto_reply_flow_prompt_v1_ai_generate_auto_reply_flow_prompt_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateAutoReplyFlowPromptPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GenerateAutoReplyPromptResponse"},{"type":"null"}],"title":"Response Generate Auto Reply Flow Prompt V1 Ai Generate Auto Reply Flow Prompt Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/ai/evaluate_comment_for_abuse":{"post":{"tags":["ai"],"summary":"Evaluate Comment For Abuse","description":"Evaluate a social media comment for abusive or harmful language","operationId":"evaluate_comment_for_abuse_v1_ai_evaluate_comment_for_abuse_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateCommentForAbusePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EvaluateCommentForAbuseResponse"},{"type":"null"}],"title":"Response Evaluate Comment For Abuse V1 Ai Evaluate Comment For Abuse Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/ai/evaluate_intent_match":{"post":{"tags":["ai"],"summary":"Evaluate Intent Match","description":"Compare a user-defined intent with an incoming Instagram message.","operationId":"evaluate_intent_match_v1_ai_evaluate_intent_match_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntentMatchPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntentMatchResponse"},{"type":"null"}],"title":"Response Evaluate Intent Match V1 Ai Evaluate Intent Match Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ai/policy_scan_automation":{"post":{"tags":["ai"],"summary":"Policy Scan Automation","description":"Scan a draft Automation for Meta Community Standards violations BEFORE\nthe user persists it. Frontend calls this on the create/edit form submit\nand obeys the verdict (block / warn / allow).\n\nRuns:\n  - LLM scan against Meta policy KB (Sonnet 5 + caching)\n  - Static checks: auto_reply_limit > threshold, keyword reuse on the\n    same account's other automations + flows.","operationId":"policy_scan_automation_v1_ai_policy_scan_automation_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"exclude_automation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"When scanning an EDIT, pass the current automation id so the keyword-reuse check doesn't flag the automation's own keywords.","title":"Exclude Automation Id"},"description":"When scanning an EDIT, pass the current automation id so the keyword-reuse check doesn't flag the automation's own keywords."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyScanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ai/policy_scan_flow_automation":{"post":{"tags":["ai"],"summary":"Policy Scan Flow Automation","description":"Scan a draft FlowAutomation (node graph) for Meta Community Standards\nviolations BEFORE the user persists it. Frontend calls this on flow\ncreate/edit and obeys the verdict.\n\nRuns LLM scan + static keyword-reuse check across the account's other\nautomations and flow triggers.","operationId":"policy_scan_flow_automation_v1_ai_policy_scan_flow_automation_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"exclude_flow_automation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"When scanning an EDIT, pass the current flow_automation id so the keyword-reuse check doesn't flag the flow's own trigger keywords against itself.","title":"Exclude Flow Automation Id"},"description":"When scanning an EDIT, pass the current flow_automation id so the keyword-reuse check doesn't flag the flow's own trigger keywords against itself."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowAutomationCreatePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyScanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ai/policy_scan_auto_fix_automation":{"post":{"tags":["ai"],"summary":"Policy Scan Auto Fix Automation","description":"Auto-fix policy violations on a draft AutomationPayload.\n\nBackend rewrites flagged content + applies static fixes, then\nre-scans. If still flagged, retries up to MAX_FIX_ATTEMPTS times\nuntil verdict=allow OR the model stops making progress. The\nresponse carries `attempts` and `verified_clean` so the UI knows\nwhether the result was self-verified or hit the cap.","operationId":"policy_scan_auto_fix_automation_v1_ai_policy_scan_auto_fix_automation_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"exclude_automation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"When fixing an EDIT, pass the current automation id so the post-fix re-scan's keyword-reuse + content-reuse checks don't flag the automation's own keywords/text against itself.","title":"Exclude Automation Id"},"description":"When fixing an EDIT, pass the current automation id so the post-fix re-scan's keyword-reuse + content-reuse checks don't flag the automation's own keywords/text against itself."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyFixAutomationPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyFixAutomationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ai/policy_scan_auto_fix_flow_automation":{"post":{"tags":["ai"],"summary":"Policy Scan Auto Fix Flow Automation","description":"Auto-fix policy violations on a draft FlowAutomationCreatePayload.\n\nSame retry-until-clean loop as the automation variant. Rewrites text\ninside flow nodes (message body, title/subtitle, button labels,\ncarousel items, trigger keywords, ai_prompts).","operationId":"policy_scan_auto_fix_flow_automation_v1_ai_policy_scan_auto_fix_flow_automation_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"exclude_flow_automation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"When fixing an EDIT, pass the current flow_automation id so the post-fix re-scan's keyword-reuse + content-reuse checks don't flag the flow's own data against itself.","title":"Exclude Flow Automation Id"},"description":"When fixing an EDIT, pass the current flow_automation id so the post-fix re-scan's keyword-reuse + content-reuse checks don't flag the flow's own data against itself."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyFixFlowAutomationPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyFixFlowAutomationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/referral/user_refferal_code":{"get":{"tags":["referral"],"summary":"Get User Referral Code","description":"Get referral code for user user which can be used to reffer other users.\n\nRead-only: the promo code is whatever the member has already activated.\nMinting one creates discounts at Dodo and Lemon Squeezy, so it happens only\non an explicit activate / set request, never from loading the page.","operationId":"get_user_referral_code_v1_referral_user_refferal_code_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserReferralCodeResponseSchema"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/referral/refresh_followers":{"post":{"tags":["referral"],"summary":"Refresh Followers","description":"Re-read the member's Instagram profile from Meta, then report their state.\n\nFollower counts are otherwise only written when an Instagram account is\nconnected, so a creator who has since crossed the bar would stay locked\nwith no way to prove it. This is the button that lets them ask.\n\nA Meta failure is logged and swallowed: the response still reports the\nstate we have, which is no worse than before the click.","operationId":"refresh_followers_v1_referral_refresh_followers_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserReferralCodeResponseSchema"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/referral/activate_promo_code":{"post":{"tags":["referral"],"summary":"Activate Promo Code","description":"Mint the member's promo code from their name and register it.\n\nIdempotent: a member who already has a code gets it back, with any missing\nprovider registration retried.","operationId":"activate_promo_code_v1_referral_activate_promo_code_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserReferralCodeResponseSchema"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/referral/set_promo_code":{"post":{"tags":["referral"],"summary":"Set Promo Code","description":"Set the member's promo code to one they picked.\n\nTheir previous code keeps working until the new one is live at a provider,\nand is retired once it is.","operationId":"set_promo_code_v1_referral_set_promo_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPromoCodePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserReferralCodeResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/referral/regenerate_promo_code":{"post":{"tags":["referral"],"summary":"Regenerate Promo Code","description":"Reissue the member's promo code under the current naming convention.\n\nRetires whatever they had -- the old code stops working immediately.","operationId":"regenerate_promo_code_v1_referral_regenerate_promo_code_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserReferralCodeResponseSchema"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/referral/used_user_referral_code":{"post":{"tags":["referral"],"summary":"Used User Referral Code","description":"Used referral code given by another user","operationId":"used_user_referral_code_v1_referral_used_user_referral_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRefferalCodeSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/referral/track_click_event":{"post":{"tags":["referral"],"summary":"User Referral Track Click Event","description":"Track click event for referral.","operationId":"user_referral_track_click_event_v1_referral_track_click_event_post","parameters":[{"name":"X-Forwarded-For","in":"header","required":false,"schema":{"title":"X-Forwarded-For"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRefferalCodeSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/referral/user_referral_event_summary":{"get":{"tags":["referral"],"summary":"User Referral Event Summary","description":"Get summary of referral events for a user.","operationId":"user_referral_event_summary_v1_referral_user_referral_event_summary_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"event_type","in":"query","required":true,"schema":{"$ref":"#/components/schemas/RefferalEventType"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRefferalEventSummaryResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/referral/reffered_users":{"get":{"tags":["referral"],"summary":"Get Reffered Users","operationId":"get_reffered_users_v1_referral_reffered_users_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferredUserPagiantionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/referral/send_referral_email":{"post":{"tags":["referral"],"summary":"Send Referral Email","operationId":"send_referral_email_v1_referral_send_referral_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendReferralEmailPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/inbox_automation":{"get":{"tags":["inbox_automation"],"summary":"Get Inbox Automations","operationId":"get_inbox_automations_v1_inbox_automation_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"facebook_account_id","in":"query","required":false,"schema":{"type":"string","title":"Facebook Account Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"instagram_user_id","in":"query","required":false,"schema":{"type":"string","title":"Instagram User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagiantionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["inbox_automation"],"summary":"Create Inbox Automation","operationId":"create_inbox_automation_v1_inbox_automation_post","security":[{"JWTBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInboxAutomationPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/inbox_automation/{inbox_automation_id}/update":{"put":{"tags":["inbox_automation"],"summary":"Update Inbox Automation","operationId":"update_inbox_automation_v1_inbox_automation__inbox_automation_id__update_put","security":[{"JWTBearer":[]}],"parameters":[{"name":"inbox_automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Inbox Automation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxAutomationPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["inbox_automation"],"summary":"Patch Inbox Automation","operationId":"patch_inbox_automation_v1_inbox_automation__inbox_automation_id__update_patch","security":[{"JWTBearer":[]}],"parameters":[{"name":"inbox_automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Inbox Automation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxAutomationPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/inbox_automation/{inbox_automation_id}/view":{"get":{"tags":["inbox_automation"],"summary":"Get Inbox Automation By Id","operationId":"get_inbox_automation_by_id_v1_inbox_automation__inbox_automation_id__view_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"inbox_automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Inbox Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/inbox_automation/perform_inbox_automation":{"post":{"tags":["inbox_automation"],"summary":"Perform Inbox Automation","operationId":"perform_inbox_automation_v1_inbox_automation_perform_inbox_automation_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformInboxAutomationPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/inbox_automation/{inbox_automation_id}/delete":{"delete":{"tags":["inbox_automation"],"summary":"Delete Inbox Automation","operationId":"delete_inbox_automation_v1_inbox_automation__inbox_automation_id__delete_delete","security":[{"JWTBearer":[]}],"parameters":[{"name":"inbox_automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Inbox Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/inbox_automation/clear_conversation_sessions":{"post":{"tags":["inbox_automation"],"summary":"Clear Conversation Sessions","operationId":"clear_conversation_sessions_v1_inbox_automation_clear_conversation_sessions_post","parameters":[{"name":"hours","in":"query","required":true,"schema":{"type":"number","title":"Hours"}},{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/inbox_automation/get_inbox_automations_stats":{"post":{"tags":["inbox_automation"],"summary":"Get Inbox Automations Stats","operationId":"get_inbox_automations_stats_v1_inbox_automation_get_inbox_automations_stats_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxAutomationStatsPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/flow_automation/ai_builder/turn":{"post":{"tags":["flow_automation","flow_automation_ai_builder"],"summary":"Post Ai Builder Turn","description":"Run one user turn as a Server-Sent Events stream.\n\nResponse body is `text/event-stream`. Each event is one JSON object\non a `data:` line, with a blank line terminator. The client parses\n`event` to dispatch (see `schemas.ChatTurnEvent`).\n\nWhen `payload.flow_automation_id` (saved flow) or `payload.draft_key`\n(unsaved /create flow) is supplied, the turn is persisted to\n`FlowAiChatSession` for cross-reload continuity.\n\nGated by the plan token quota: free users are blocked, Pro/Pro+ have a\nmonthly token budget. The check runs BEFORE the stream so a blocked\nuser gets a clean 402 (not a half-streamed error); test/exempt users\nskip it. Usage is recorded inside `run_turn` after the turn runs.","operationId":"post_ai_builder_turn_v1_flow_automation_ai_builder_turn_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatTurnPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/flow_automation/ai_builder/history/{flow_automation_id}":{"get":{"tags":["flow_automation","flow_automation_ai_builder"],"summary":"Get Ai Builder History","description":"Return the persisted active chat session for this (flow, user),\nor `null` when there isn't one. Called on panel open so a page\nreload picks up the conversation where the user left off.","operationId":"get_ai_builder_history_v1_flow_automation_ai_builder_history__flow_automation_id__get","security":[{"JWTBearer":[]}],"parameters":[{"name":"flow_automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Flow Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ChatHistoryResponse"},{"type":"null"}],"title":"Response Get Ai Builder History V1 Flow Automation Ai Builder History  Flow Automation Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flow_automation/ai_builder/history_by_draft/{draft_key}":{"get":{"tags":["flow_automation","flow_automation_ai_builder"],"summary":"Get Ai Builder History By Draft","description":"Return the persisted active chat session for an UNSAVED flow, keyed\nby the client's `draft_key`, or `null` when there isn't one. Called on\npanel open for a /create flow so a reload resumes the conversation.\nScoped by the authed user — a draft_key is only visible to its\nowner.","operationId":"get_ai_builder_history_by_draft_v1_flow_automation_ai_builder_history_by_draft__draft_key__get","security":[{"JWTBearer":[]}],"parameters":[{"name":"draft_key","in":"path","required":true,"schema":{"type":"string","title":"Draft Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ChatHistoryResponse"},{"type":"null"}],"title":"Response Get Ai Builder History By Draft V1 Flow Automation Ai Builder History By Draft  Draft Key  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flow_automation/ai_builder/clear_history/{flow_automation_id}":{"post":{"tags":["flow_automation","flow_automation_ai_builder"],"summary":"Post Ai Builder Clear History","description":"Archive the active chat session. Doesn't touch the canvas — the\nuser's flow is unaffected. The next turn creates a fresh session.","operationId":"post_ai_builder_clear_history_v1_flow_automation_ai_builder_clear_history__flow_automation_id__post","security":[{"JWTBearer":[]}],"parameters":[{"name":"flow_automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Flow Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flow_automation/ai_builder/clear_history_by_draft/{draft_key}":{"post":{"tags":["flow_automation","flow_automation_ai_builder"],"summary":"Post Ai Builder Clear History By Draft","description":"Archive the active chat session for an UNSAVED flow, keyed by\n`draft_key`. Scoped to the authed user.","operationId":"post_ai_builder_clear_history_by_draft_v1_flow_automation_ai_builder_clear_history_by_draft__draft_key__post","security":[{"JWTBearer":[]}],"parameters":[{"name":"draft_key","in":"path","required":true,"schema":{"type":"string","title":"Draft Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flow_automation/ai_builder/link_draft":{"post":{"tags":["flow_automation","flow_automation_ai_builder"],"summary":"Post Ai Builder Link Draft","description":"Reassign a draft's active chat session to a newly saved flow so the\nAI conversation carries over. The frontend calls this right after it\nsaves a /create flow, passing the draft_key it used and the new\nflow_automation_id. Idempotent no-op (linked=False) when the draft had\nno session.","operationId":"post_ai_builder_link_draft_v1_flow_automation_ai_builder_link_draft_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDraftPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDraftResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/flow_automation/test_external_api_request":{"post":{"tags":["flow_automation"],"summary":"Test External Api Request","description":"Run an EXTERNAL_API_REQUEST config once, server-side (the browser\ncan't call third-party endpoints directly because of CORS).","operationId":"test_external_api_request_v1_flow_automation_test_external_api_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestExternalApiRequestPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestExternalApiRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/flow_automation/{flow_automation_id}/view":{"get":{"tags":["flow_automation"],"summary":"Get Flow Automation By Id","description":"Get a single flow automation by ID.","operationId":"get_flow_automation_by_id_v1_flow_automation__flow_automation_id__view_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"flow_automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Flow Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowAutomationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flow_automation":{"post":{"tags":["flow_automation"],"summary":"Create Flow Automation","description":"Create a new flow automation.","operationId":"create_flow_automation_v1_flow_automation_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowAutomationCreatePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiModelResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/flow_automation/{flow_automation_id}/update":{"put":{"tags":["flow_automation"],"summary":"Update Flow Automation","description":"Full update of a flow automation.","operationId":"update_flow_automation_v1_flow_automation__flow_automation_id__update_put","security":[{"JWTBearer":[]}],"parameters":[{"name":"flow_automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Flow Automation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowAutomationUpdatePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiModelResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["flow_automation"],"summary":"Patch Flow Automation","description":"Partial update of a flow automation (only provided fields are updated).","operationId":"patch_flow_automation_v1_flow_automation__flow_automation_id__update_patch","security":[{"JWTBearer":[]}],"parameters":[{"name":"flow_automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Flow Automation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowAutomationUpdatePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiModelResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flow_automation/{flow_automation_id}/toggle":{"patch":{"tags":["flow_automation"],"summary":"Toggle Flow Automation","description":"Toggle the active status of a flow automation.","operationId":"toggle_flow_automation_v1_flow_automation__flow_automation_id__toggle_patch","security":[{"JWTBearer":[]}],"parameters":[{"name":"flow_automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Flow Automation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowAutomationTogglePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiModelResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flow_automation/{flow_automation_id}/rename":{"patch":{"tags":["flow_automation"],"summary":"Rename Flow Automation","description":"Rename a flow automation without touching its nodes, edges or triggers.","operationId":"rename_flow_automation_v1_flow_automation__flow_automation_id__rename_patch","security":[{"JWTBearer":[]}],"parameters":[{"name":"flow_automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Flow Automation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowAutomationRenamePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiModelResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flow_automation/resume_flow_execution":{"post":{"tags":["flow_automation"],"summary":"Resume Flow Execution","description":"Resume a flow execution.","operationId":"resume_flow_execution_v1_flow_automation_resume_flow_execution_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeFlowAutomationPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flow_automation/{flow_automation_id}/duplicate":{"post":{"tags":["flow_automation"],"summary":"Duplicate Flow Automation","description":"Duplicate a flow automation (nodes & edges only).","operationId":"duplicate_flow_automation_v1_flow_automation__flow_automation_id__duplicate_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"flow_automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Flow Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flow_automation/get_flow_automations_stats":{"post":{"tags":["flow_automation"],"summary":"Get Flow Automations Stats","description":"Get flow automation stats.","operationId":"get_flow_automations_stats_v1_flow_automation_get_flow_automations_stats_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowAutomationStatsPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/flow_automation/{flow_automation_id}/rewind":{"get":{"tags":["flow_automation"],"summary":"Get Flow Rewind Status","description":"Backtrackable posts of a flow plus the latest backtrack run.","operationId":"get_flow_rewind_status_v1_flow_automation__flow_automation_id__rewind_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"flow_automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Flow Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowRewindStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["flow_automation"],"summary":"Rewind Flow Automation Admin","description":"Admin/queue entry point for a flow backtrack.","operationId":"rewind_flow_automation_admin_v1_flow_automation__flow_automation_id__rewind_post","parameters":[{"name":"flow_automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Flow Automation Id"}},{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flow_automation/user/{flow_automation_id}/rewind":{"post":{"tags":["flow_automation"],"summary":"Rewind Flow Automation","description":"Replay past comments of the flow's specific posts through the flow.","operationId":"rewind_flow_automation_v1_flow_automation_user__flow_automation_id__rewind_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"flow_automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Flow Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flow_automation/flow_rewind/{flow_rewind_id}/feed":{"get":{"tags":["flow_automation"],"summary":"Get Flow Rewind Feed","description":"Latest comments a backtrack run started the flow for, newest first.","operationId":"get_flow_rewind_feed_v1_flow_automation_flow_rewind__flow_rewind_id__feed_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"flow_rewind_id","in":"path","required":true,"schema":{"type":"integer","title":"Flow Rewind Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":5,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RewindFeedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flow_automation/flow_rewind/{flow_rewind_id}/update":{"patch":{"tags":["flow_automation"],"summary":"Update Flow Rewind","description":"Change a backtrack run's status (CANCELLED stops it between pages).","operationId":"update_flow_rewind_v1_flow_automation_flow_rewind__flow_rewind_id__update_patch","security":[{"JWTBearer":[]}],"parameters":[{"name":"flow_rewind_id","in":"path","required":true,"schema":{"type":"integer","title":"Flow Rewind Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowRewindEditPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flow_automation/rewind_flow_comments":{"post":{"tags":["flow_automation"],"summary":"Rewind Flow Comments","description":"Queue callback: process one page of one post's comments.","operationId":"rewind_flow_comments_v1_flow_automation_rewind_flow_comments_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowRewindCommentsPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flow_automation/node_stats":{"post":{"tags":["flow_automation"],"summary":"Get Flow Node Stats","description":"Get hits and url click stats for a MESSAGE_GROUP node.","operationId":"get_flow_node_stats_v1_flow_automation_node_stats_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowNodeStatsPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowNodeStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/inbox_message_history/{inbox_automation_id}/conversations_by_user":{"get":{"tags":["inbox_message_history"],"summary":"Get Conversations By User","operationId":"get_conversations_by_user_v1_inbox_message_history__inbox_automation_id__conversations_by_user_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"inbox_automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Inbox Automation Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagiantionSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/inbox_message_history/{inbox_automation_id}/conversations_by_user/xlsx":{"get":{"tags":["inbox_message_history"],"summary":"Get Conversations By User Xlsx","operationId":"get_conversations_by_user_xlsx_v1_inbox_message_history__inbox_automation_id__conversations_by_user_xlsx_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"inbox_automation_id","in":"path","required":true,"schema":{"type":"integer","title":"Inbox Automation Id"}}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/insert_all_instagram_profile_info":{"post":{"tags":["instagram_facebook"],"summary":"Insert All Instagram Profile Info","operationId":"insert_all_instagram_profile_info_v1_instagram_facebook_insert_all_instagram_profile_info_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/insert_instagram_profile_info_for_user":{"post":{"tags":["instagram_facebook"],"summary":"Insert Instagram Profile Info For User","operationId":"insert_instagram_profile_info_for_user_v1_instagram_facebook_insert_instagram_profile_info_for_user_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsertProfileInfoForUserPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/{instagram_user_id}/queue_size":{"get":{"tags":["instagram_facebook"],"summary":"Get Queue Size","operationId":"get_queue_size_v1_instagram_facebook__instagram_user_id__queue_size_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"instagram_user_id","in":"path","required":true,"schema":{"type":"string","title":"Instagram User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueSizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/store_contact_usage":{"post":{"tags":["instagram_facebook"],"summary":"Store Contact Usage","operationId":"store_contact_usage_v1_instagram_facebook_store_contact_usage_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/store_contact_usage_for_user":{"post":{"tags":["instagram_facebook"],"summary":"Store Contact Usage For User","operationId":"store_contact_usage_for_user_v1_instagram_facebook_store_contact_usage_for_user_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreContactUsageForUserPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/{media_id}/media_details":{"get":{"tags":["instagram_facebook"],"summary":"Get Media Details","operationId":"get_media_details_v1_instagram_facebook__media_id__media_details_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","title":"Media Id"}},{"name":"facebook_account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"}},{"name":"fields[]","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[],"title":"Fields[]"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/all_my_profiles":{"get":{"tags":["instagram_facebook"],"summary":"Get All My Profiles","operationId":"get_all_my_profiles_v1_instagram_facebook_all_my_profiles_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"fields[]","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[],"title":"Fields[]"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/set_queue_action":{"post":{"tags":["instagram_facebook"],"summary":"Set Queue Action","operationId":"set_queue_action_v1_instagram_facebook_set_queue_action_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueActionPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/instagram_facebook/admin/set_queue_action":{"post":{"tags":["instagram_facebook"],"summary":"Admin Set Queue Action","operationId":"admin_set_queue_action_v1_instagram_facebook_admin_set_queue_action_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminQueueActionPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/{instagram_user_id}/queue_details":{"get":{"tags":["instagram_facebook"],"summary":"Get Queue Details","operationId":"get_queue_details_v1_instagram_facebook__instagram_user_id__queue_details_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"instagram_user_id","in":"path","required":true,"schema":{"type":"string","title":"Instagram User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueDetailsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/set_queue_speed":{"patch":{"tags":["instagram_facebook"],"summary":"Set Queue Speed","operationId":"set_queue_speed_v1_instagram_facebook_set_queue_speed_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueSpeedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/instagram_facebook/admin/set_queue_speed":{"patch":{"tags":["instagram_facebook"],"summary":"Admin Set Queue Speed","operationId":"admin_set_queue_speed_v1_instagram_facebook_admin_set_queue_speed_patch","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminQueueSpeedPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/publish_media":{"post":{"tags":["instagram_facebook"],"summary":"Publish Media","operationId":"publish_media_v1_instagram_facebook_publish_media_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishMediaPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/instagram_facebook/{instagram_user_id}/delete_instagram_account":{"delete":{"tags":["instagram_facebook"],"summary":"Delete Instagram Account","operationId":"delete_instagram_account_v1_instagram_facebook__instagram_user_id__delete_instagram_account_delete","security":[{"JWTBearer":[]}],"parameters":[{"name":"instagram_user_id","in":"path","required":true,"schema":{"type":"string","title":"Instagram User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/meta_medias":{"get":{"tags":["instagram_facebook"],"summary":"Get Meta Medias","operationId":"get_meta_medias_v1_instagram_facebook_meta_medias_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"instagram_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"}},{"name":"channel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"}},{"name":"media_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetaMediaType","default":"INSTAGRAM_POST"}},{"name":"after","in":"query","required":false,"schema":{"type":"string","title":"After"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaMediaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/ad_medias":{"get":{"tags":["instagram_facebook"],"summary":"Get Ad Medias","operationId":"get_ad_medias_v1_instagram_facebook_ad_medias_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"channel_id","in":"query","required":true,"schema":{"type":"string","title":"Channel Id"}},{"name":"after","in":"query","required":false,"schema":{"type":"string","title":"After"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaMediaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/{media_id}/meta_media_details":{"get":{"tags":["instagram_facebook"],"summary":"Get Meta Media Details","operationId":"get_meta_media_details_v1_instagram_facebook__media_id__meta_media_details_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","title":"Media Id"}},{"name":"instagram_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"}},{"name":"channel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"}},{"name":"media_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetaMediaType","default":"INSTAGRAM_POST"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/send_message_or_private_reply":{"post":{"tags":["instagram_facebook"],"summary":"Send Message Or Private Reply","operationId":"send_message_or_private_reply_v1_instagram_facebook_send_message_or_private_reply_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageOrPrivateReplyPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/send_message":{"post":{"tags":["instagram_facebook"],"summary":"Send Message Task","description":"Task target for delayed sends; also callable directly by admin.","operationId":"send_message_task_v1_instagram_facebook_send_message_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessagePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/send_private_reply":{"post":{"tags":["instagram_facebook"],"summary":"Send Private Reply Task","description":"Task target for delayed private replies; also callable directly by admin.","operationId":"send_private_reply_task_v1_instagram_facebook_send_private_reply_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendPrivateReplyPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/reply_to_comment":{"post":{"tags":["instagram_facebook"],"summary":"Reply To Comment Task","description":"Task target for delayed comment replies; also callable directly by admin.","operationId":"reply_to_comment_task_v1_instagram_facebook_reply_to_comment_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyToCommentPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/unsubscribe_webhooks":{"post":{"tags":["instagram_facebook"],"summary":"Unsubscribe Webhooks","description":"Unsubscribe the app from all webhooks for the given Instagram or Facebook account.","operationId":"unsubscribe_webhooks_v1_instagram_facebook_unsubscribe_webhooks_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeWebhooksPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instagram_facebook/subscribe_webhooks":{"post":{"tags":["instagram_facebook"],"summary":"Subscribe Webhooks","description":"Subscribe the app to webhooks for the given Instagram or Facebook account.","operationId":"subscribe_webhooks_v1_instagram_facebook_subscribe_webhooks_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeWebhooksPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/email/unsubscribe":{"get":{"tags":["email"],"summary":"Unsubscribe Email","description":"Unsubscribe email.","operationId":"unsubscribe_email_v1_email_unsubscribe_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/email/send_email_to_user":{"post":{"tags":["email"],"summary":"Send Email To User","description":"Send email to user.","operationId":"send_email_to_user_v1_email_send_email_to_user_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailToUserPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/email/send_email_to_all_users":{"post":{"tags":["email"],"summary":"Send Email To All Users","description":"Send email to all users.","operationId":"send_email_to_all_users_v1_email_send_email_to_all_users_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailToAllUsersPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/email/{template_id}/send_email_from_csv":{"post":{"tags":["email"],"summary":"Send Email From Csv","description":"Mail everyone in an uploaded CSV, one individual email per recipient.\n\nThe CSV needs an `Email` column and may have a `Name` column. Recipients do\nnot see each other: this goes through ZeptoMail's batch endpoint, unlike\n`send_email_to_list`, which puts every address in one message's `to` field.\n\nAuthenticated with the legacy x-admin-api-key, for curl and cron callers.\nThe admin console uses `send_email_from_csv_admin` instead — the browser\nmust never be handed that key.","operationId":"send_email_from_csv_v1_email__template_id__send_email_from_csv_post","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}},{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_send_email_from_csv_v1_email__template_id__send_email_from_csv_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailFromCsvResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/email/admin/send_from_csv/{template_id}":{"post":{"tags":["email"],"summary":"Send Email From Csv Admin","description":"Same CSV send, authenticated with a Firebase admin token.\n\nExists so the SvelteKit admin console can drive this without shipping the\nshared x-admin-api-key into a browser bundle. Requires the ADMIN role, not\nVIEWER — this mails hundreds of people and is not undoable.","operationId":"send_email_from_csv_admin_v1_email_admin_send_from_csv__template_id__post","security":[{"JWTBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_send_email_from_csv_admin_v1_email_admin_send_from_csv__template_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailFromCsvResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/email/send_email_to_list":{"post":{"tags":["email"],"summary":"Send Email To List","description":"Send email to list.","operationId":"send_email_to_list_v1_email_send_email_to_list_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailToListPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversation_starter":{"post":{"tags":["conversation_starter"],"summary":"Create Conversation Starter","description":"Create a new conversation starter.","operationId":"create_conversation_starter_v1_conversation_starter_post","security":[{"JWTBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationStarterPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["conversation_starter"],"summary":"Get Conversation Starter","description":"Get a conversation starter.","operationId":"get_conversation_starter_v1_conversation_starter_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"facebook_account_id","in":"query","required":false,"schema":{"type":"string","title":"Facebook Account Id"}},{"name":"instagram_user_id","in":"query","required":false,"schema":{"type":"string","title":"Instagram User Id"}},{"name":"channel_id","in":"query","required":false,"schema":{"type":"string","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversation_starter/{conversation_starter_id}/update":{"put":{"tags":["conversation_starter"],"summary":"Update Conversation Starter","description":"Update a conversation starter.","operationId":"update_conversation_starter_v1_conversation_starter__conversation_starter_id__update_put","security":[{"JWTBearer":[]}],"parameters":[{"name":"conversation_starter_id","in":"path","required":true,"schema":{"type":"integer","title":"Conversation Starter Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationStarterPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/common/health_check":{"get":{"tags":["common"],"summary":"Health Check","description":"Health check endpoint which checks the database connection as well.","operationId":"health_check_v1_common_health_check_get","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/media_scheduler/schedule":{"post":{"tags":["media_scheduler"],"summary":"Schedule Media","description":"Upload media, detect account type, and create an Instagram media container.\n\n- Detects whether `instagram_id` is an Instagram Business Account (via Facebook) or Instagram user account\n- Uploads the provided media (and optional cover) to object storage\n- Creates the media container using existing services","operationId":"schedule_media_v1_media_scheduler_schedule_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_schedule_media_v1_media_scheduler_schedule_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/team_member":{"get":{"tags":["team_member"],"summary":"List Team Members","operationId":"list_team_members_v1_team_member_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TeamMemberResponse"},"type":"array","title":"Response List Team Members V1 Team Member Get"}}}}},"security":[{"JWTBearer":[]}]},"post":{"tags":["team_member"],"summary":"Create Team Member","operationId":"create_team_member_v1_team_member_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/team_member/my_teams":{"get":{"tags":["team_member"],"summary":"List My Teams","description":"Teams the signed-in person can switch to, for the sidebar.","operationId":"list_my_teams_v1_team_member_my_teams_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyTeamsResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/team_member/switch_to_own_account":{"post":{"tags":["team_member"],"summary":"Switch To Own Account","description":"Leave the team and get a custom token for the person's own account.","operationId":"switch_to_own_account_v1_team_member_switch_to_own_account_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenSchema"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/team_member/{team_member_id}/switch":{"post":{"tags":["team_member"],"summary":"Switch To Team","description":"Custom token that signs in to the team's account as this member.","operationId":"switch_to_team_v1_team_member__team_member_id__switch_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"team_member_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Member Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/team_member/{team_member_id}":{"put":{"tags":["team_member"],"summary":"Update Team Member","operationId":"update_team_member_v1_team_member__team_member_id__put","security":[{"JWTBearer":[]}],"parameters":[{"name":"team_member_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Member Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["team_member"],"summary":"Delete Team Member","operationId":"delete_team_member_v1_team_member__team_member_id__delete","security":[{"JWTBearer":[]}],"parameters":[{"name":"team_member_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Member Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/team_member/accept_invitation":{"post":{"tags":["team_member"],"summary":"Accept Team Member Invitation","operationId":"accept_team_member_invitation_v1_team_member_accept_invitation_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptTeamMemberInvitationSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/team_member/{team_member_id}/send_invitation":{"post":{"tags":["team_member"],"summary":"Send Team Member Invitation","operationId":"send_team_member_invitation_v1_team_member__team_member_id__send_invitation_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"team_member_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Member Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/contact/contact_fields":{"post":{"tags":["contact"],"summary":"Create Contact Field","description":"Create a custom User Field definition.","operationId":"create_contact_field_v1_contact_contact_fields_post","security":[{"JWTBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFieldDefinitionCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFieldDefinitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["contact"],"summary":"List Contact Fields","description":"Paginated list of the user's custom User Field definitions.","operationId":"list_contact_fields_v1_contact_contact_fields_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationSchema_ContactFieldDefinitionResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/contact/contact_fields/{field_id}":{"patch":{"tags":["contact"],"summary":"Update Contact Field","description":"Update a User Field's name/description/folder (slug/type immutable).","operationId":"update_contact_field_v1_contact_contact_fields__field_id__patch","security":[{"JWTBearer":[]}],"parameters":[{"name":"field_id","in":"path","required":true,"schema":{"type":"integer","title":"Field Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFieldDefinitionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFieldDefinitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["contact"],"summary":"Delete Contact Field","description":"Soft-delete a User Field definition.","operationId":"delete_contact_field_v1_contact_contact_fields__field_id__delete","security":[{"JWTBearer":[]}],"parameters":[{"name":"field_id","in":"path","required":true,"schema":{"type":"integer","title":"Field Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFieldDefinitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/contact/contact_field_folders/{folder}":{"delete":{"tags":["contact"],"summary":"Delete Contact Field Folder","description":"Soft-delete a folder and every User Field inside it.","operationId":"delete_contact_field_folder_v1_contact_contact_field_folders__folder__delete","security":[{"JWTBearer":[]}],"parameters":[{"name":"folder","in":"path","required":true,"schema":{"type":"string","title":"Folder"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteContactFieldFolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/contact/{contact_id}/fill_contact_details":{"patch":{"tags":["contact"],"summary":"Fill Contact Details","description":"Write documentation here.","operationId":"fill_contact_details_v1_contact__contact_id__fill_contact_details_patch","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}},{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/contact/list":{"post":{"tags":["contact"],"summary":"Get All Contacts","operationId":"get_all_contacts_v1_contact_list_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactQuerySchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/contact/counts":{"post":{"tags":["contact"],"summary":"Get Contact Counts","description":"Sizes of the contacts list's tabs.","operationId":"get_contact_counts_v1_contact_counts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactQuerySchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/contact/field_values":{"post":{"tags":["contact"],"summary":"Get Contact Field Values","description":"A custom field's most common values: the filter's suggestions.","operationId":"get_contact_field_values_v1_contact_field_values_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFieldValuesPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFieldValuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/contact/location_values":{"post":{"tags":["contact"],"summary":"Get Contact Location Values","description":"The countries, cities or postal codes links were tapped from: the\nLocation filter's suggestions.","operationId":"get_contact_location_values_v1_contact_location_values_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactLocationValuesPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFieldValuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/contact/came_from_options":{"post":{"tags":["contact"],"summary":"Get Contact Came From Options","description":"The automations and flows that reached the channel's contacts: the\nfilter's \"Came from\" choices.","operationId":"get_contact_came_from_options_v1_contact_came_from_options_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactOptionsQuery"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCameFromOptionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/contact/activity":{"post":{"tags":["contact"],"summary":"Get Contact Activity","description":"Each contact's tracked events: where they last tapped a tracked link,\nhow many links they tapped, and how many events they made.","operationId":"get_contact_activity_v1_contact_activity_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactActivityPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactActivityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/contact/{contact_id}/timeline":{"get":{"tags":["contact"],"summary":"Get Contact Timeline","description":"The contact's tracked events, newest first, with their automations.","operationId":"get_contact_timeline_v1_contact__contact_id__timeline_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactTimelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/contact/{contact_id}/send_message":{"post":{"tags":["contact"],"summary":"Send Message To Contact","description":"Send the contact a text DM on Instagram or Messenger.","operationId":"send_message_to_contact_v1_contact__contact_id__send_message_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactSendMessagePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactSendMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/contact/excel":{"post":{"tags":["contact"],"summary":"Get All Contacts Excel","operationId":"get_all_contacts_excel_v1_contact_excel_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactQuerySchema"}}},"required":true},"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/contact/tags":{"get":{"tags":["contact"],"summary":"Get All Tags","description":"Get all unique tag names across all contacts for the user.","operationId":"get_all_tags_v1_contact_tags_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"channel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagiantionSchema_str_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/contact/{contact_id}":{"patch":{"tags":["contact"],"summary":"Update Contact","description":"Edit a contact's email, phone, tags and custom field values.","operationId":"update_contact_v1_contact__contact_id__patch","security":[{"JWTBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdatePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["contact"],"summary":"Delete Contact","operationId":"delete_contact_v1_contact__contact_id__delete","security":[{"JWTBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/contact/bulk_delete":{"post":{"tags":["contact"],"summary":"Delete Contacts","description":"Permanently delete contacts (ticked, or all the query selects) and\neverything stored against them.","operationId":"delete_contacts_v1_contact_bulk_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactsDeletePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactsDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/contact/bulk_tags":{"post":{"tags":["contact"],"summary":"Bulk Update Contact Tags","description":"Add tags to, and remove tags from, contacts (ticked, or all the\nquery selects).","operationId":"bulk_update_contact_tags_v1_contact_bulk_tags_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactBulkTagsPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactBulkTagsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/admin_auth/whoami":{"get":{"tags":["admin_console","admin_auth"],"summary":"Admin Whoami","description":"Return the active AdminUser tied to the current Firebase token.","operationId":"admin_whoami_v1_admin_console_admin_auth_whoami_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/admin_auth/admins":{"get":{"tags":["admin_console","admin_auth"],"summary":"List Admins","description":"List every admin_user row, newest first. Read-only — viewers allowed.","operationId":"list_admins_v1_admin_console_admin_auth_admins_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__admin_console__admin_auth__schemas__AdminUserListResponse"}}}}},"security":[{"JWTBearer":[]}]},"post":{"tags":["admin_console","admin_auth"],"summary":"Create Admin","description":"Promote a customer-user (by email) to admin. Admin-role only.","operationId":"create_admin_v1_admin_console_admin_auth_admins_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserCreatePayload"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/admin_auth/admins/{admin_id}":{"patch":{"tags":["admin_console","admin_auth"],"summary":"Update Admin","description":"Change role / is_active / name on an admin_user row. Admin-role only.\n\nSelf-deactivate and last-admin demotion are blocked with 400.","operationId":"update_admin_v1_admin_console_admin_auth_admins__admin_id__patch","security":[{"JWTBearer":[]}],"parameters":[{"name":"admin_id","in":"path","required":true,"schema":{"type":"integer","title":"Admin Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserUpdatePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin_console","admin_auth"],"summary":"Deactivate Admin","description":"Soft-delete (is_active=false) an admin_user row.\n\nHard-delete is intentionally not exposed — preserves audit linkage.","operationId":"deactivate_admin_v1_admin_console_admin_auth_admins__admin_id__delete","security":[{"JWTBearer":[]}],"parameters":[{"name":"admin_id","in":"path","required":true,"schema":{"type":"integer","title":"Admin Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin_console/user/list":{"post":{"tags":["admin_console","user"],"summary":"Get Admin User List","description":"List users for admin console with aggregates and pagination.\n\nAccepts EITHER legacy x-admin-api-key (cron/service callers) OR a\nFirebase token resolving to an active admin_user.","operationId":"get_admin_user_list_v1_admin_console_user_list_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserListRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__admin_console__user__schemas__AdminUserListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin_console/user/filter_options":{"get":{"tags":["admin_console","user"],"summary":"Get Admin User Filter Options","description":"Distinct countries / providers / creator types / UTM sources.\n\nBacks the filter dropdowns on the admin Users page so operators pick from\nreal values instead of guessing at spelling.","operationId":"get_admin_user_filter_options_v1_admin_console_user_filter_options_get","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserFilterOptions"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin_console/user/list/export":{"post":{"tags":["admin_console","user"],"summary":"Export Admin User List","description":"Export every user matching the filters as CSV.\n\nDeliberately unpaginated — this returns the whole filtered set, not the\npage the table happens to be showing. Capped at `MAX_EXPORT_ROWS`; when the\nmatch count is larger the response carries `X-Export-Truncated: true` so\nthe UI can warn. Read-only, so VIEWERs are allowed, but the export is\naudit-logged since it moves user PII off the console.","operationId":"export_admin_user_list_v1_admin_console_user_list_export_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserExportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/user/{user_id}":{"patch":{"tags":["admin_console","user"],"summary":"Update User Admin","description":"Inline-edit phone_number / is_test_user from the admin Users table.\n\nAdmin role only — VIEWERs are rejected with 403. Emits an Axiom audit\nlog line on success (D6 audit policy).","operationId":"update_user_admin_v1_admin_console_user__user_id__patch","security":[{"JWTBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateUserPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin_console","user"],"summary":"Delete User Admin","description":"Permanently delete a user and all their data from the admin Users table.\n\nAdmin role only (VIEWERs 403). Wraps the same full-deletion service the\ncustomer /v1/auth/{id}/delete endpoint uses, but gated by Firebase admin\nauth instead of the legacy x-admin-api-key. Emits an audit-log line.","operationId":"delete_user_admin_v1_admin_console_user__user_id__delete","security":[{"JWTBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin_console/user/{user_id}/deactivate":{"post":{"tags":["admin_console","user"],"summary":"Deactivate User Admin","description":"Deactivate a user from the admin Users table: sets is_active=False,\ndisables the Firebase account, and disables every automation the user\ncreated across all channels. Admin role only (VIEWERs 403). Reversible.","operationId":"deactivate_user_admin_v1_admin_console_user__user_id__deactivate_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeactivateUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin_console/user/{user_id}/activate":{"post":{"tags":["admin_console","user"],"summary":"Activate User Admin","description":"Reactivate a user from the admin Users table: sets is_active=True,\nre-enables the Firebase account, and re-enables the user's automations\nacross all channels. Admin role only (VIEWERs 403). Inverse of deactivate.","operationId":"activate_user_admin_v1_admin_console_user__user_id__activate_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeactivateUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin_console/cleanup/deactivate_inactive_free_users":{"post":{"tags":["admin_console","cleanup"],"summary":"Deactivate Inactive Free Users","description":"Deactivate active free users with no qualifying activity in the last 6 months.\n\nA user is considered inactive if they have had no AUTODM_KEYWORD_FOUND event,\nno flow automation execution, and no inbox conversation session in the last 6 months.\nOnly free users (no active/on-trial subscription) are targeted.","operationId":"deactivate_inactive_free_users_v1_admin_console_cleanup_deactivate_inactive_free_users_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin_console/cleanup/inactive_user_trackers":{"delete":{"tags":["admin_console","cleanup"],"summary":"Delete Inactive User Trackers","description":"Delete EventTrackers and FlowEventTrackers for all inactive users.","operationId":"delete_inactive_user_trackers_v1_admin_console_cleanup_inactive_user_trackers_delete","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin_console/cleanup/close_stale_flow_executions":{"post":{"tags":["admin_console","cleanup"],"summary":"Close Stale Flow Executions","description":"Cancel all RUNNING flow executions older than the given number of hours.","operationId":"close_stale_flow_executions_v1_admin_console_cleanup_close_stale_flow_executions_post","parameters":[{"name":"older_than_hrs","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Cancel RUNNING executions started more than this many hours ago","default":24,"title":"Older Than Hrs"},"description":"Cancel RUNNING executions started more than this many hours ago"},{"name":"x-admin-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseStaleFlowExecutionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin_console/cleanup/contact_events":{"delete":{"tags":["admin_console","cleanup"],"summary":"Prune Contact Events","description":"Prune the outbound-webhook event log.\n\nWire this to the daily scheduler alongside the other cleanup jobs —\nthe table grows with every contact change on every connected account.","operationId":"prune_contact_events_v1_admin_console_cleanup_contact_events_delete","parameters":[{"name":"older_than_days","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Delete contact events older than this many days","default":30,"title":"Older Than Days"},"description":"Delete contact events older than this many days"},{"name":"x-admin-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PruneContactEventsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin_console/analytics/users":{"get":{"tags":["admin_console","analytics"],"summary":"Users Analytics","operationId":"users_analytics_v1_admin_console_analytics_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsersAnalyticsResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/analytics/subscriptions":{"get":{"tags":["admin_console","analytics"],"summary":"Subscriptions Analytics","operationId":"subscriptions_analytics_v1_admin_console_analytics_subscriptions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionsAnalyticsResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/analytics/agencies":{"get":{"tags":["admin_console","analytics"],"summary":"Agencies Analytics","operationId":"agencies_analytics_v1_admin_console_analytics_agencies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgenciesAnalyticsResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/analytics/referrals":{"get":{"tags":["admin_console","analytics"],"summary":"Referrals Analytics","operationId":"referrals_analytics_v1_admin_console_analytics_referrals_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralsAnalyticsResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/analytics/promo_codes":{"get":{"tags":["admin_console","analytics"],"summary":"Promo Codes Analytics","operationId":"promo_codes_analytics_v1_admin_console_analytics_promo_codes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoCodesAnalyticsResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/analytics/mrr/snapshot":{"post":{"tags":["admin_console","analytics"],"summary":"Take Mrr Snapshot Endpoint","description":"Compute today's MRR and write a row to mrr_snapshot.\n\nAuthenticates with EITHER `x-admin-api-key` (cron) or admin Firebase\n(manual trigger from UI). VIEWER role is rejected — the combined\ndependency only returns when an active admin is on the request.\nIdempotent on date — same-day re-runs overwrite.","operationId":"take_mrr_snapshot_endpoint_v1_admin_console_analytics_mrr_snapshot_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMRRSnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin_console/analytics/mrr/timeseries":{"get":{"tags":["admin_console","analytics"],"summary":"Get Mrr Timeseries Endpoint","description":"Return MRR snapshots within the requested range.\n\nRange literals: 30d / 3m / 6m / 1y. Read-only — VIEWER allowed.\nSparse rows returned as-is; gaps render as connected segments on the\nfrontend chart, surfacing missed cron runs visually.","operationId":"get_mrr_timeseries_endpoint_v1_admin_console_analytics_mrr_timeseries_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"range","in":"query","required":false,"schema":{"enum":["30d","3m","6m","1y"],"type":"string","default":"30d","title":"Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MRRTimeseriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin_console/automations/count/all":{"get":{"tags":["admin_console","automations"],"summary":"Count All","operationId":"count_all_v1_admin_console_automations_count_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/count/flow":{"get":{"tags":["admin_console","automations"],"summary":"Count Flow","operationId":"count_flow_v1_admin_console_automations_count_flow_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/count/inbox":{"get":{"tags":["admin_console","automations"],"summary":"Count Inbox","operationId":"count_inbox_v1_admin_console_automations_count_inbox_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/count/conversation_starters":{"get":{"tags":["admin_console","automations"],"summary":"Count Conversation Starters","operationId":"count_conversation_starters_v1_admin_console_automations_count_conversation_starters_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/count/dm_sent":{"get":{"tags":["admin_console","automations"],"summary":"Count Dm Sent","operationId":"count_dm_sent_v1_admin_console_automations_count_dm_sent_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/count/ask_to_follow":{"get":{"tags":["admin_console","automations"],"summary":"Count Ask To Follow","operationId":"count_ask_to_follow_v1_admin_console_automations_count_ask_to_follow_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/count/with_dm_variations":{"get":{"tags":["admin_console","automations"],"summary":"Count With Dm Variations","operationId":"count_with_dm_variations_v1_admin_console_automations_count_with_dm_variations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/count/with_delay":{"get":{"tags":["admin_console","automations"],"summary":"Count With Delay","operationId":"count_with_delay_v1_admin_console_automations_count_with_delay_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/count/facebook":{"get":{"tags":["admin_console","automations"],"summary":"Count Facebook","operationId":"count_facebook_v1_admin_console_automations_count_facebook_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/count/flow_instagram":{"get":{"tags":["admin_console","automations"],"summary":"Count Flow Instagram","operationId":"count_flow_instagram_v1_admin_console_automations_count_flow_instagram_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/count/flow_facebook":{"get":{"tags":["admin_console","automations"],"summary":"Count Flow Facebook","operationId":"count_flow_facebook_v1_admin_console_automations_count_flow_facebook_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/period/daily":{"get":{"tags":["admin_console","automations"],"summary":"Period Daily","operationId":"period_daily_v1_admin_console_automations_period_daily_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__admin_console__automations__schemas__PeriodComparison"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/period/weekly":{"get":{"tags":["admin_console","automations"],"summary":"Period Weekly","operationId":"period_weekly_v1_admin_console_automations_period_weekly_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__admin_console__automations__schemas__PeriodComparison"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/period/monthly":{"get":{"tags":["admin_console","automations"],"summary":"Period Monthly","operationId":"period_monthly_v1_admin_console_automations_period_monthly_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__admin_console__automations__schemas__PeriodComparison"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/period/daily_inbox":{"get":{"tags":["admin_console","automations"],"summary":"Period Daily Inbox","operationId":"period_daily_inbox_v1_admin_console_automations_period_daily_inbox_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__admin_console__automations__schemas__PeriodComparison"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/flow/today_by_source":{"get":{"tags":["admin_console","automations"],"summary":"Flow Today By Source","description":"Flow automations created today, broken down by Instagram + Facebook.","operationId":"flow_today_by_source_v1_admin_console_automations_flow_today_by_source_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowTodayBySourceResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/flow/nodes_by_usage":{"get":{"tags":["admin_console","automations"],"summary":"Flow Nodes By Usage","description":"Flow node types ordered by total step executions.","operationId":"flow_nodes_by_usage_v1_admin_console_automations_flow_nodes_by_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowNodesByUsageResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/charts/by_type":{"get":{"tags":["admin_console","automations"],"summary":"Charts By Type","operationId":"charts_by_type_v1_admin_console_automations_charts_by_type_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationsByTypeResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/charts/by_users":{"get":{"tags":["admin_console","automations"],"summary":"Charts By Users","operationId":"charts_by_users_v1_admin_console_automations_charts_by_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationsByUsersResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/tables/latest_automations":{"get":{"tags":["admin_console","automations"],"summary":"Tables Latest Automations","operationId":"tables_latest_automations_v1_admin_console_automations_tables_latest_automations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowsResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/tables/latest_flow":{"get":{"tags":["admin_console","automations"],"summary":"Tables Latest Flow","operationId":"tables_latest_flow_v1_admin_console_automations_tables_latest_flow_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowsResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/tables/latest_inbox":{"get":{"tags":["admin_console","automations"],"summary":"Tables Latest Inbox","operationId":"tables_latest_inbox_v1_admin_console_automations_tables_latest_inbox_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowsResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/tables/latest_follow_up":{"get":{"tags":["admin_console","automations"],"summary":"Tables Latest Follow Up","operationId":"tables_latest_follow_up_v1_admin_console_automations_tables_latest_follow_up_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowsResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/tables/latest_opener":{"get":{"tags":["admin_console","automations"],"summary":"Tables Latest Opener","operationId":"tables_latest_opener_v1_admin_console_automations_tables_latest_opener_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowsResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automations/tables/conversation_starters":{"get":{"tags":["admin_console","automations"],"summary":"Tables Conversation Starters","operationId":"tables_conversation_starters_v1_admin_console_automations_tables_conversation_starters_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowsResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automation_verification/list":{"get":{"tags":["admin_console","automation_verification"],"summary":"List Verifications","operationId":"list_verifications_v1_admin_console_automation_verification_list_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"automation_type","in":"query","required":true,"schema":{"$ref":"#/components/schemas/app__api__v1__admin_console__automation_verification__models__AutomationType"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Owner user id (all digits) or a partial, case-insensitive match on the owner's email","title":"Search"},"description":"Owner user id (all digits) or a partial, case-insensitive match on the owner's email"},{"name":"verified","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/VerificationFilter"},{"type":"null"}],"description":"Filter by verification state. Omit for all.","title":"Verified"},"description":"Filter by verification state. Omit for all."},{"name":"addons","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/AutomationAddon"}},{"type":"null"}],"description":"BASIC only: add-on features (AI_AUTO_REPLY), AND-combined. Ignored for FLOW.","title":"Addons"},"description":"BASIC only: add-on features (AI_AUTO_REPLY), AND-combined. Ignored for FLOW."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationSchema_VerificationRow_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin_console/automation_verification/stats":{"get":{"tags":["admin_console","automation_verification"],"summary":"Verification Stats","operationId":"verification_stats_v1_admin_console_automation_verification_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationStatsResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/automation_verification/mark":{"put":{"tags":["admin_console","automation_verification"],"summary":"Mark Verification","operationId":"mark_verification_v1_admin_console_automation_verification_mark_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/ai_usage/policy_scan":{"get":{"tags":["admin_console","ai_usage"],"summary":"Policy Scan Summary","operationId":"policy_scan_summary_v1_admin_console_ai_usage_policy_scan_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyScanSummary"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/ai_usage/flow_builder":{"get":{"tags":["admin_console","ai_usage"],"summary":"Flow Builder Summary","operationId":"flow_builder_summary_v1_admin_console_ai_usage_flow_builder_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowBuilderSummary"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/ai_usage/overview":{"get":{"tags":["admin_console","ai_usage"],"summary":"Ai Usage Overview","operationId":"ai_usage_overview_v1_admin_console_ai_usage_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiUsageOverview"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/subscription/backfill_cancelled_at":{"post":{"tags":["admin_console","subscription"],"summary":"Backfill Cancelled At","description":"TEMPORARY: one-off backfill of `cancelled_at` (when the subscription\nleft Active) for existing non-active subscriptions, sourced live from\nRazorpay / Lemon Squeezy. Admin role only; safe to re-run. Remove after\nthe backfill has run in every environment.","operationId":"backfill_cancelled_at_v1_admin_console_subscription_backfill_cancelled_at_post","security":[{"JWTBearer":[]}],"parameters":[{"name":"overwrite","in":"query","required":false,"schema":{"type":"boolean","description":"Refresh every non-active row, not just those with a NULL cancelled_at.","default":false,"title":"Overwrite"},"description":"Refresh every non-active row, not just those with a NULL cancelled_at."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBackfillCancelledAtResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin_console/subscription/{subscription_id}":{"patch":{"tags":["admin_console","subscription"],"summary":"Update Subscription Admin","description":"Inline-edit a subscription's status/ends_at from the admin tool.\n\nAdmin role only — VIEWERs are rejected with 403 by `require_admin`.\nEmits a structured Axiom log line on success (D6 audit policy).","operationId":"update_subscription_admin_v1_admin_console_subscription__subscription_id__patch","security":[{"JWTBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateSubscriptionPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin_console/referral_earnings":{"get":{"tags":["admin_console","referral_earnings"],"summary":"Referral Earnings","operationId":"referral_earnings_v1_admin_console_referral_earnings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralEarningsResponse"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/referral_earnings/referred_users/{affiliate_id}":{"get":{"tags":["admin_console","referral_earnings"],"summary":"Affiliate Referred Users","operationId":"affiliate_referred_users_v1_admin_console_referral_earnings_referred_users__affiliate_id__get","security":[{"JWTBearer":[]}],"parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"integer","title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateReferredUsersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin_console/referral_payout":{"post":{"tags":["admin_console","referral_payout"],"summary":"Create Referral Payout","operationId":"create_referral_payout_v1_admin_console_referral_payout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReferralPayoutPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralPayoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/referral_payout/{user_id}":{"get":{"tags":["admin_console","referral_payout"],"summary":"List Referral Payouts","operationId":"list_referral_payouts_v1_admin_console_referral_payout__user_id__get","security":[{"JWTBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralPayoutListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin_console/merge_accounts":{"post":{"tags":["admin_console","merge_accounts"],"summary":"Merge Accounts","description":"Merge one or more source users into a target user.\n\nPart 1 (in-request): connected Instagram/Facebook accounts, every\nautomation type, contacts and contact fields move to the target and are\ncommitted before responding.\n\nPart 2 (background): event trackers, flow event trackers, flow\nexecutions, inbox sessions/history, contact events and payment ledger\nrows move in batches after the response is sent.\n\nIdempotent — calling again with the same ids finishes any rows a previous\ncall left behind. Source users are not deactivated. Admin role only.","operationId":"merge_accounts_v1_admin_console_merge_accounts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeAccountsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/admin_console/promo_code/{code}":{"delete":{"tags":["admin_console","promo_code"],"summary":"Delete Promo Code","description":"Delete a promo code and its discounts at Dodo and Lemon Squeezy.\n\nIrreversible: anyone holding the code is turned away at checkout from the\nmoment it runs. Referrals already attributed to it are untouched -- they\nlive in user_referral and keep earning.","operationId":"delete_promo_code_v1_admin_console_promo_code__code__delete","security":[{"JWTBearer":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePromoCodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mcp/oauth/.well-known/oauth-authorization-server":{"get":{"tags":["mcp","mcp_oauth"],"summary":"Oauth Metadata","description":"RFC 8414 Authorization Server Metadata — required by Claude.ai.","operationId":"oauth_metadata_v1_mcp_oauth__well_known_oauth_authorization_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/mcp/oauth/authorize":{"get":{"tags":["mcp","mcp_oauth"],"summary":"Authorize","description":"Redirect user to the LinktoDM frontend to complete login.","operationId":"authorize_v1_mcp_oauth_authorize_get","parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string","title":"Redirect Uri"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}},{"name":"code_challenge","in":"query","required":true,"schema":{"type":"string","title":"Code Challenge"}},{"name":"code_challenge_method","in":"query","required":false,"schema":{"type":"string","default":"S256","title":"Code Challenge Method"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"read write","title":"Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mcp/oauth/exchange_firebase_token":{"post":{"tags":["mcp","mcp_oauth"],"summary":"Exchange Firebase Token","description":"Exchange a Firebase ID token for an OAuth authorization code.\n\nCalled by the LinktoDM frontend after the user has authenticated with Firebase.\nVerifies the Firebase token, creates a short-lived auth code, and redirects\nto the MCP client's redirect_uri with ?code=...&state=...","operationId":"exchange_firebase_token_v1_mcp_oauth_exchange_firebase_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_exchange_firebase_token_v1_mcp_oauth_exchange_firebase_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/mcp/oauth/token":{"post":{"tags":["mcp","mcp_oauth"],"summary":"Token","description":"Exchange authorization code for an access token (RFC 6749 + PKCE).","operationId":"token_v1_mcp_oauth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_token_v1_mcp_oauth_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/channel/get_my_channels":{"get":{"tags":["channel"],"summary":"Get My Channels","operationId":"get_my_channels_v1_channel_get_my_channels_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"JWTBearer":[]}]}},"/v1/channel/validate_channel_connection":{"post":{"tags":["channel"],"summary":"Validate Channel Connection","operationId":"validate_channel_connection_v1_channel_validate_channel_connection_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateChannelConnectionPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateChannelConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/channel/delete_channel":{"delete":{"tags":["channel"],"summary":"Delete Channel","operationId":"delete_channel_v1_channel_delete_channel_delete","security":[{"JWTBearer":[]}],"parameters":[{"name":"channel_id","in":"query","required":true,"schema":{"type":"string","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/channel/refresh_followers_count":{"post":{"tags":["channel"],"summary":"Refresh Followers Count","description":"Re-read the channel's follower count from Meta and store it.","operationId":"refresh_followers_count_v1_channel_refresh_followers_count_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelIdPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshFollowersCountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/channel/queue_details":{"post":{"tags":["channel"],"summary":"Get Queue Details","operationId":"get_queue_details_v1_channel_queue_details_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelIdPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueDetailsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/channel/pause_queue":{"post":{"tags":["channel"],"summary":"Pause Queue","operationId":"pause_queue_v1_channel_pause_queue_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelIdPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/channel/resume_queue":{"post":{"tags":["channel"],"summary":"Resume Queue","operationId":"resume_queue_v1_channel_resume_queue_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelIdPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/channel/clear_queue":{"post":{"tags":["channel"],"summary":"Clear Queue","operationId":"clear_queue_v1_channel_clear_queue_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelIdPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/channel/copy_automation":{"post":{"tags":["channel"],"summary":"Copy Automation","operationId":"copy_automation_v1_channel_copy_automation_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyAutomationPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyAutomationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/channel/copy_conversation_starter":{"post":{"tags":["channel"],"summary":"Copy Conversation Starter","description":"Copy a conversation starter onto another channel, switched off.","operationId":"copy_conversation_starter_v1_channel_copy_conversation_starter_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyConversationStarterPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyConversationStarterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/channel/copy_flow_automation":{"post":{"tags":["channel"],"summary":"Copy Flow Automation","operationId":"copy_flow_automation_v1_channel_copy_flow_automation_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyFlowAutomationPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyFlowAutomationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/attachment/upload":{"post":{"tags":["attachment"],"summary":"Upload Attachment","operationId":"upload_attachment_v1_attachment_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_attachment_v1_attachment_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadAttachmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/attachment/list":{"get":{"tags":["attachment"],"summary":"List Attachments","operationId":"list_attachments_v1_attachment_list_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"channel_id","in":"query","required":true,"schema":{"type":"string","title":"Channel Id"}},{"name":"attachment_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AttachmentType"},{"type":"null"}],"title":"Attachment Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationSchema_AttachmentItem_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/attachment/{attachment_row_id}":{"delete":{"tags":["attachment"],"summary":"Delete Attachment","operationId":"delete_attachment_v1_attachment__attachment_row_id__delete","security":[{"JWTBearer":[]}],"parameters":[{"name":"attachment_row_id","in":"path","required":true,"schema":{"type":"integer","title":"Attachment Row Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAttachmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stats/overview":{"get":{"tags":["stats"],"summary":"Get Stats Overview","description":"Return hits + clicks for the authenticated user, scoped to the\nrequested time range and (optionally) a single channel.\n\nTop-of-funnel half of the stats page. Conversion-side metrics\n(`dms_sent`, `follows`, `contacts`) live on `/extended_overview`.\n\nWhen `channel_id` is omitted the totals span all of the user's channels.\nWhen set, it's parsed by `parse_channel_id` to extract exactly one of\n`instagram_user_id` / `instagram_business_account_id` / `facebook_account_id`,\nwhich is then applied as an equality filter on every branch.","operationId":"get_stats_overview_v1_stats_overview_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"range","in":"query","required":false,"schema":{"$ref":"#/components/schemas/StatsRange","default":"30d"}},{"name":"channel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsOverviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stats/extended_overview":{"get":{"tags":["stats"],"summary":"Get Stats Extended Overview","description":"Return dms_sent + follows + contacts for the authenticated user.\n\nHeavier counterpart to `/overview` — separated so the page can render\ntop-of-funnel numbers fast and let conversion-side numbers resolve later.\nSame range + channel filtering semantics as `/overview`.","operationId":"get_stats_extended_overview_v1_stats_extended_overview_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"range","in":"query","required":false,"schema":{"$ref":"#/components/schemas/StatsRange","default":"30d"}},{"name":"channel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsExtendedOverviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stats/timeseries":{"get":{"tags":["stats"],"summary":"Get Stats Timeseries","description":"Per-bucket time series of hits + clicks. Bucket granularity is derived\nfrom the range (hour / day / month) and missing buckets are zero-filled\nso the chart line is continuous. Same channel semantics as `/overview`.","operationId":"get_stats_timeseries_v1_stats_timeseries_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"range","in":"query","required":false,"schema":{"$ref":"#/components/schemas/StatsRange","default":"30d"}},{"name":"channel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsTimeseriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stats/extended_timeseries":{"get":{"tags":["stats"],"summary":"Get Stats Extended Timeseries","description":"Per-bucket time series of dms_sent + follows + contacts.","operationId":"get_stats_extended_timeseries_v1_stats_extended_timeseries_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"range","in":"query","required":false,"schema":{"$ref":"#/components/schemas/StatsRange","default":"30d"}},{"name":"channel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsExtendedTimeseriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stats/refresh_rollup_all_automations":{"post":{"tags":["stats"],"summary":"Refresh Stats Rollup All Automations","operationId":"refresh_stats_rollup_all_automations_v1_stats_refresh_rollup_all_automations_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshStatsRollupDispatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stats/refresh_rollup_for_automation":{"post":{"tags":["stats"],"summary":"Refresh Stats Rollup For Automation","operationId":"refresh_stats_rollup_for_automation_v1_stats_refresh_rollup_for_automation_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshStatsRollupForAutomationPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshStatsRollupForAutomationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/user_integrations/user_payments/currencies":{"get":{"tags":["user_payments"],"summary":"List Gateway Currencies","description":"Currencies a creator can price in, per gateway, with the default to\npreselect for their country.","operationId":"list_gateway_currencies_v1_user_integrations_user_payments_currencies_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PaymentProvider"},{"type":"null"}],"title":"Provider"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO-3166 alpha-2. Defaults to the caller's own User.country, so the usual case needs no argument.","title":"Country"},"description":"ISO-3166 alpha-2. Defaults to the caller's own User.country, so the usual case needs no argument."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GatewayCurrenciesResponse"},"title":"Response List Gateway Currencies V1 User Integrations User Payments Currencies Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/user_integrations/user_payments/provider":{"post":{"tags":["user_payments"],"summary":"Create User Payment Provider","description":"Connect a creator's own Stripe/Razorpay account to one of their channels.","operationId":"create_user_payment_provider_v1_user_integrations_user_payments_provider_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPaymentProviderPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPaymentProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"JWTBearer":[]}]}},"/v1/user_integrations/user_payments/provider/list":{"get":{"tags":["user_payments"],"summary":"List User Payment Providers","description":"List the caller's connected gateways, newest first.","operationId":"list_user_payment_providers_v1_user_integrations_user_payments_provider_list_get","security":[{"JWTBearer":[]}],"parameters":[{"name":"channel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"}},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PaymentProvider"},{"type":"null"}],"title":"Provider"}},{"name":"include_revoked","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Revoked"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationSchema_UserPaymentProviderResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/user_integrations/user_payments/provider/{user_payment_provider_id}":{"get":{"tags":["user_payments"],"summary":"Get User Payment Provider","description":"Fetch one connected gateway. Secrets are never included.","operationId":"get_user_payment_provider_v1_user_integrations_user_payments_provider__user_payment_provider_id__get","security":[{"JWTBearer":[]}],"parameters":[{"name":"user_payment_provider_id","in":"path","required":true,"schema":{"type":"integer","title":"User Payment Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPaymentProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["user_payments"],"summary":"Revoke User Payment Provider","description":"Disconnect a gateway. Soft delete — the row is kept, marked revoked.","operationId":"revoke_user_payment_provider_v1_user_integrations_user_payments_provider__user_payment_provider_id__delete","security":[{"JWTBearer":[]}],"parameters":[{"name":"user_payment_provider_id","in":"path","required":true,"schema":{"type":"integer","title":"User Payment Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeUserPaymentProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/user_integrations/user_payments/{user_payment_provider_id}/stripe_webhook":{"post":{"tags":["user_payments"],"summary":"Stripe Webhook","description":"Record a payment or refund from a creator's Stripe account.","operationId":"stripe_webhook_v1_user_integrations_user_payments__user_payment_provider_id__stripe_webhook_post","parameters":[{"name":"user_payment_provider_id","in":"path","required":true,"schema":{"type":"integer","title":"User Payment Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/user_integrations/user_payments/{user_payment_provider_id}/razorpay_webhook":{"post":{"tags":["user_payments"],"summary":"Razorpay Webhook","description":"Record a payment or refund from a creator's Razorpay account.","operationId":"razorpay_webhook_v1_user_integrations_user_payments__user_payment_provider_id__razorpay_webhook_post","parameters":[{"name":"user_payment_provider_id","in":"path","required":true,"schema":{"type":"integer","title":"User Payment Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/oauth/authorize":{"get":{"tags":["oauth"],"summary":"Authorize","description":"Start the flow: validate the request, then show the consent screen.\n\n`client_id` and `redirect_uri` are checked before any redirect happens,\nso an unregistered callback can never be reached from here.","operationId":"authorize_v1_oauth_authorize_get","parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string","title":"Redirect Uri"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}},{"name":"response_type","in":"query","required":false,"schema":{"type":"string","default":"code","title":"Response Type"}},{"name":"scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}},{"name":"code_challenge","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge"}},{"name":"code_challenge_method","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge Method"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/oauth/client_info":{"get":{"tags":["oauth"],"summary":"Client Info","description":"Name, logo and requested permissions, for the consent screen.","operationId":"client_info_v1_oauth_client_info_get","parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string","title":"Redirect Uri"}},{"name":"scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/oauth/exchange_firebase_token":{"post":{"tags":["oauth"],"summary":"Exchange Firebase Token","description":"Consent granted: verify the Firebase session and mint an auth code.\n\nReturns the callback URL for the consent screen to navigate to, rather\nthan a 302 — the screen calls this with fetch, which cannot usefully\nfollow a cross-origin redirect to the partner's callback.","operationId":"exchange_firebase_token_v1_oauth_exchange_firebase_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_exchange_firebase_token_v1_oauth_exchange_firebase_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizationGrantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/oauth/token":{"post":{"tags":["oauth"],"summary":"Token","description":"Exchange an authorization code, or rotate a refresh token.","operationId":"token_v1_oauth_token_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_token_v1_oauth_token_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/oauth/revoke":{"post":{"tags":["oauth"],"summary":"Revoke","description":"Revoke an access or refresh token (RFC 7009).\n\nAlways reports success for an authenticated client, so this cannot be\nused to probe whether a given token exists.","operationId":"revoke_v1_oauth_revoke_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_revoke_v1_oauth_revoke_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhook/dispatch_event":{"post":{"tags":["webhook"],"summary":"Dispatch Event","description":"Fan one contact event out to its matching subscriptions.","operationId":"dispatch_event_v1_webhook_dispatch_event_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispatchEventPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispatchEventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhook/deliver":{"post":{"tags":["webhook"],"summary":"Deliver","description":"POST one event to one subscriber.\n\nA 503 here is the signal to Cloud Tasks to retry with backoff; the\ndelivery layer decides which consumer responses deserve that and\nwhich are conclusive.","operationId":"deliver_v1_webhook_deliver_post","parameters":[{"name":"x-admin-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Admin-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliverEventPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliverEventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"tags":["mcp_discovery"],"summary":"Oauth Protected Resource Metadata","description":"RFC 9728 — OAuth Protected Resource Metadata (root form).","operationId":"oauth_protected_resource_metadata__well_known_oauth_protected_resource_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/oauth-protected-resource/v1/mcp/":{"get":{"tags":["mcp_discovery"],"summary":"Oauth Protected Resource Metadata Path","description":"RFC 9728 — OAuth Protected Resource Metadata (path-suffixed form).","operationId":"oauth_protected_resource_metadata_path__well_known_oauth_protected_resource_v1_mcp__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/oauth-protected-resource/v1/mcp":{"get":{"tags":["mcp_discovery"],"summary":"Oauth Protected Resource Metadata Path","description":"RFC 9728 — OAuth Protected Resource Metadata (path-suffixed form).","operationId":"oauth_protected_resource_metadata_path__well_known_oauth_protected_resource_v1_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/oauth-authorization-server":{"get":{"tags":["mcp_discovery"],"summary":"Oauth Authorization Server Metadata","description":"RFC 8414 — Authorization Server Metadata.","operationId":"oauth_authorization_server_metadata__well_known_oauth_authorization_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/openai-apps-challenge":{"get":{"tags":["mcp_discovery"],"summary":"Openai Domain Verification","description":"OpenAI domain verification token.","operationId":"openai_domain_verification__well_known_openai_apps_challenge_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/register":{"post":{"tags":["mcp_discovery"],"summary":"Dynamic Client Registration","description":"RFC 7591 — OAuth 2.0 Dynamic Client Registration.","operationId":"dynamic_client_registration_register_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AbuseClassification":{"type":"string","enum":["Abusive","Not Abusive"],"title":"AbuseClassification"},"AcceptTeamMemberInvitationSchema":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"AcceptTeamMemberInvitationSchema"},"AccountType":{"type":"string","enum":["Page","User"],"title":"AccountType"},"ActionFlowNode":{"properties":{"id":{"type":"string","title":"Id","description":"Unique node id within the flow. Use a UUID string (e.g. 'a7f3...'). Edges reference nodes by this id, so it must be stable once created.","examples":["b3c1f4a2-5d7e-4a9b-9c8d-1f2e3a4b5c6d"]},"position":{"$ref":"#/components/schemas/NodePosition","description":"Canvas coordinates for visual layout only. Has no effect on execution. Use `{x: 0, y: 0}` if you don't care about layout."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Parent node id for grouped children. Required cases: (1) trigger nodes (USER_COMMENT_TRIGGER, USER_SENDS_MESSAGE, USER_SHARE_POST, USER_STORY_MENTION) must have the TRIGGER_GROUP's id as parentId. (2) MESSAGE_BUTTON nodes must have their parent message node's id as parentId (the BUTTON_TEXT_MESSAGE / BUTTON_TEXT_IMAGE_MESSAGE / CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE). All other nodes leave this null."},"extent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extent","description":"XYFlow visual constraint. Usually 'parent' when parentId is set. Leave null otherwise; the frontend infers this."},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"XYFlow runtime layout field. Do NOT set when generating new nodes — the editor populates this."},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"measured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Measured","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"type":{"type":"string","const":"ACTION","title":"Type","default":"ACTION"},"data":{"$ref":"#/components/schemas/ActionNodeData"}},"additionalProperties":true,"type":"object","required":["id","position","data"],"title":"ActionFlowNode","description":"Runs one or more side-effects (HTTP request, tag changes, contact\ndeletion) then continues the flow. Use this to integrate with CRMs,\nwebhooks, and Salesmorph's own tagging system."},"ActionNodeData":{"properties":{"actions":{"items":{"oneOf":[{"$ref":"#/components/schemas/ExternalApiRequestActionItem"},{"$ref":"#/components/schemas/AddContactTagActionItem"},{"$ref":"#/components/schemas/RemoveContactTagActionItem"},{"$ref":"#/components/schemas/DeleteContactActionItem"},{"$ref":"#/components/schemas/SetUserFieldActionItem"},{"$ref":"#/components/schemas/SendToZapierActionItem"}],"discriminator":{"propertyName":"type","mapping":{"ADD_CONTACT_TAG":"#/components/schemas/AddContactTagActionItem","DELETE_CONTACT":"#/components/schemas/DeleteContactActionItem","EXTERNAL_API_REQUEST":"#/components/schemas/ExternalApiRequestActionItem","REMOVE_CONTACT_TAG":"#/components/schemas/RemoveContactTagActionItem","SEND_TO_ZAPIER":"#/components/schemas/SendToZapierActionItem","SET_USER_FIELD":"#/components/schemas/SetUserFieldActionItem"}}},"type":"array","title":"Actions","description":"Ordered list of side-effects to perform when this node fires. Include at least one action."}},"additionalProperties":true,"type":"object","required":["actions"],"title":"ActionNodeData","description":"Action: run one or more side-effects (CRM push, tag changes, custom\nfield updates, etc.) then continue to the next node. Use this for the\n'do something then keep going' parts of a flow."},"ActionsLimit":{"type":"string","enum":["UNLIMITED","PER_DAY"],"title":"ActionsLimit"},"AdCampaignTrackerRequest":{"properties":{"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"}},"type":"object","title":"AdCampaignTrackerRequest","description":"Request schema for ad campaign tracker."},"AddContactTagActionItem":{"properties":{"type":{"type":"string","const":"ADD_CONTACT_TAG","title":"Type","default":"ADD_CONTACT_TAG"},"data":{"$ref":"#/components/schemas/TagActionData"}},"type":"object","required":["data"],"title":"AddContactTagActionItem","description":"Add one or more tags to the contact."},"AdditionButtonSchema":{"properties":{"url":{"type":"string","title":"Url"},"url_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url Label"}},"type":"object","required":["url"],"title":"AdditionButtonSchema"},"AdminBackfillCancelledAtResponse":{"properties":{"updated":{"type":"integer","title":"Updated"},"failed":{"type":"integer","title":"Failed"},"remaining":{"type":"integer","title":"Remaining"}},"type":"object","required":["updated","failed","remaining"],"title":"AdminBackfillCancelledAtResponse","description":"Result of the one-off cancelled_at backfill.\n\nTEMPORARY endpoint — remove once existing non-active rows have been\nbackfilled. `cancelled_at` records when the subscription left the\nActive status; the date is pulled live from the payment provider\n(Razorpay / Lemon Squeezy), not from our own tables.\n\n- `updated`: rows that got a cancelled_at this run.\n- `failed`: rows we could not resolve (provider fetch error, no\n  provider subscription id, or no past timestamp in the provider\n  payload) — left untouched.\n- `remaining`: non-active rows still holding a NULL cancelled_at."},"AdminCreateSubscriptionPayload":{"properties":{"user_id":{"type":"integer","title":"User Id"},"status":{"$ref":"#/components/schemas/SubscriptionStatus","default":"active"},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At"},"lemon_squeezy_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lemon Squeezy Subscription Id"},"razorpay_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Razorpay Subscription Id"},"razorpay_payment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Razorpay Payment Id"},"dodo_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dodo Subscription Id"},"product_name":{"$ref":"#/components/schemas/SubscriptionProductName","default":"Pro"}},"type":"object","required":["user_id"],"title":"AdminCreateSubscriptionPayload"},"AdminDeactivateUserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"is_active":{"type":"boolean","title":"Is Active","default":false},"automations_disabled":{"type":"integer","title":"Automations Disabled","default":0}},"type":"object","required":["id"],"title":"AdminDeactivateUserResponse"},"AdminDeleteUserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"deleted":{"type":"boolean","title":"Deleted","default":true}},"type":"object","required":["id"],"title":"AdminDeleteUserResponse"},"AdminMRRSnapshotResponse":{"properties":{"snapshot_date":{"type":"string","format":"date","title":"Snapshot Date"},"total_inr":{"type":"number","title":"Total Inr"},"razorpay_inr":{"type":"number","title":"Razorpay Inr"},"lemon_inr":{"type":"number","title":"Lemon Inr"},"dodo_inr":{"type":"number","title":"Dodo Inr","default":0.0},"active_count":{"type":"integer","title":"Active Count"}},"type":"object","required":["snapshot_date","total_inr","razorpay_inr","lemon_inr","active_count"],"title":"AdminMRRSnapshotResponse","description":"Returned by POST /mrr/snapshot — the row that was just inserted/updated."},"AdminQueueActionPayload":{"properties":{"user_id":{"type":"integer","title":"User Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"},"action":{"$ref":"#/components/schemas/QueueActions"}},"type":"object","required":["user_id","action"],"title":"AdminQueueActionPayload"},"AdminQueueSpeedPayload":{"properties":{"user_id":{"type":"integer","title":"User Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"},"speed":{"type":"integer","title":"Speed"}},"type":"object","required":["user_id","speed"],"title":"AdminQueueSpeedPayload"},"AdminRole":{"type":"string","enum":["ADMIN","VIEWER","SEO_ADMIN","TESTING_ADMIN"],"title":"AdminRole"},"AdminUpdateSubscriptionPayload":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionStatus"},{"type":"null"}]},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At"},"product_name":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionProductName"},{"type":"null"}]},"expected_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Updated At"}},"type":"object","title":"AdminUpdateSubscriptionPayload","description":"Patch payload for admin inline-edit on the subscription tables.\n\nMirrors the Appsmith `update_subscription`, `update_inactive_subscription`,\n`update_manual_subscription` queries — all three set status + ends_at.\n\n`expected_updated_at` is the timestamp the client most recently saw on\nthis row. If the row in the DB has moved since, the request is rejected\nwith 409 Conflict — prevents two admins silently overwriting each other.\nOptional so callers (cron, scripts) can opt out."},"AdminUpdateSubscriptionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"status":{"$ref":"#/components/schemas/SubscriptionStatus"},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At"},"product_name":{"$ref":"#/components/schemas/SubscriptionProductName"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","status","product_name","updated_at"],"title":"AdminUpdateSubscriptionResponse"},"AdminUpdateUserPayload":{"properties":{"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"is_test_user":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Test User"}},"type":"object","title":"AdminUpdateUserPayload","description":"Inline-edit payload for the Users table.\n\nMirrors the Appsmith `update_user` query — phone_number and is_test_user\nare the two fields admin tooling can edit."},"AdminUpdateUserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"is_test_user":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Test User"}},"type":"object","required":["id"],"title":"AdminUpdateUserResponse"},"AdminUserCreatePayload":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"$ref":"#/components/schemas/AdminRole","default":"VIEWER"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["email"],"title":"AdminUserCreatePayload","description":"Add a new admin by email.\n\nEmail need not pre-exist anywhere. The service resolves a firebase_uid by\n(1) checking the customer `user` table, (2) checking Firebase Auth,\n(3) creating a new Firebase user via Admin SDK. Either way the admin can\nsign in via the email-link flow with no further setup."},"AdminUserExportRequest":{"properties":{"search_text":{"type":"string","title":"Search Text","default":""},"days_ago":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Ago"},"created_after":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"},"created_before":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"auth_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Provider"},"creator_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator Type"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"has_pro":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Pro"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_test_user":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Test User"},"is_superuser":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Superuser"},"from_agency":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"From Agency"},"facebook_page_only":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Facebook Page Only"},"min_contacts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Contacts"},"max_contacts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Contacts"},"min_automations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Automations"},"max_automations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Automations"},"min_instagram_accounts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Instagram Accounts"},"max_instagram_accounts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Instagram Accounts"},"sort_by":{"type":"string","title":"Sort By","default":"created_at"},"sort_order":{"type":"string","title":"Sort Order","default":"desc"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},"type":"object","title":"AdminUserExportRequest","description":"CSV export request — same filters, no pagination window.\n\n`limit` is clamped server-side to `MAX_EXPORT_ROWS`; when the filtered set\nis larger, the response carries `X-Export-Truncated: true`."},"AdminUserFilterOptions":{"properties":{"countries":{"items":{"type":"string"},"type":"array","title":"Countries","default":[]},"auth_providers":{"items":{"type":"string"},"type":"array","title":"Auth Providers","default":[]},"creator_types":{"items":{"type":"string"},"type":"array","title":"Creator Types","default":[]},"utm_sources":{"items":{"type":"string"},"type":"array","title":"Utm Sources","default":[]}},"type":"object","title":"AdminUserFilterOptions","description":"Distinct values backing the filter dropdowns on the Users page."},"AdminUserListRequest":{"properties":{"search_text":{"type":"string","title":"Search Text","default":""},"days_ago":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Ago"},"created_after":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"},"created_before":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"auth_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Provider"},"creator_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator Type"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"has_pro":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Pro"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_test_user":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Test User"},"is_superuser":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Superuser"},"from_agency":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"From Agency"},"facebook_page_only":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Facebook Page Only"},"min_contacts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Contacts"},"max_contacts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Contacts"},"min_automations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Automations"},"max_automations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Automations"},"min_instagram_accounts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Instagram Accounts"},"max_instagram_accounts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Instagram Accounts"},"sort_by":{"type":"string","title":"Sort By","default":"created_at"},"sort_order":{"type":"string","title":"Sort Order","default":"desc"},"limit":{"type":"integer","title":"Limit","default":10},"offset":{"type":"integer","title":"Offset","default":0}},"type":"object","title":"AdminUserListRequest"},"AdminUserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"firebase_uid":{"type":"string","title":"Firebase Uid"},"email":{"type":"string","format":"email","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"$ref":"#/components/schemas/AdminRole"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","firebase_uid","email","role","is_active"],"title":"AdminUserResponse","description":"Public-facing shape of an admin user."},"AdminUserRow":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"firebase_uid":{"type":"string","title":"Firebase Uid"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"picture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Picture"},"is_active":{"type":"boolean","title":"Is Active"},"is_superuser":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Superuser"},"auth_provider":{"type":"string","title":"Auth Provider"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"is_test_user":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Test User"},"creator_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Creator Types"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"connected_instagram_accounts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Connected Instagram Accounts"},"connected_facebook_pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Connected Facebook Pages"},"no_of_automations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"No Of Automations"},"no_of_inbox_automations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"No Of Inbox Automations"},"no_of_flow_automations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"No Of Flow Automations"},"no_of_collect_info_automations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"No Of Collect Info Automations"},"from_agency":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"From Agency","default":false},"has_pro":{"type":"boolean","title":"Has Pro","default":false},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"used_contacts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Used Contacts"}},"type":"object","required":["id","firebase_uid","is_active","auth_provider","created_at","updated_at"],"title":"AdminUserRow"},"AdminUserUpdatePayload":{"properties":{"role":{"anyOf":[{"$ref":"#/components/schemas/AdminRole"},{"type":"null"}]},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"AdminUserUpdatePayload"},"AffiliateEarningsRow":{"properties":{"user_id":{"type":"integer","title":"User Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"currency":{"type":"string","title":"Currency"},"referred_count":{"type":"integer","title":"Referred Count"},"gross_earnings":{"type":"number","title":"Gross Earnings"},"already_paid":{"type":"number","title":"Already Paid"},"net_owed":{"type":"number","title":"Net Owed"},"net_owed_formatted":{"type":"string","title":"Net Owed Formatted"}},"type":"object","required":["user_id","currency","referred_count","gross_earnings","already_paid","net_owed","net_owed_formatted"],"title":"AffiliateEarningsRow","description":"One affiliate's referral summary for the admin payout table."},"AffiliateReferredUsersResponse":{"properties":{"referred_users":{"items":{"$ref":"#/components/schemas/ReferredUserRow"},"type":"array","title":"Referred Users"}},"type":"object","required":["referred_users"],"title":"AffiliateReferredUsersResponse"},"AgenciesAnalyticsResponse":{"properties":{"agencies":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Agencies"}},"type":"object","required":["agencies"],"title":"AgenciesAnalyticsResponse"},"AgencyPayload":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["name","email"],"title":"AgencyPayload"},"AgencyResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"}},"type":"object","required":["id","name"],"title":"AgencyResponse"},"AgentMediaSelectionType":{"type":"string","enum":["SPECIFIC","ALL"],"title":"AgentMediaSelectionType","description":"Media selection type for triggers."},"AgentPayload":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"type":{"$ref":"#/components/schemas/AgentType"},"channel_id":{"type":"string","minLength":1,"title":"Channel Id"},"media_selection_type":{"$ref":"#/components/schemas/AgentMediaSelectionType","default":"ALL"},"media_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Media Ids"},"ai_prompt":{"type":"string","minLength":1,"title":"Ai Prompt"},"action_limit":{"anyOf":[{"$ref":"#/components/schemas/ActionsLimit"},{"type":"null"}]},"action_limit_value":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Action Limit Value"},"delay_in_seconds":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Delay In Seconds"},"delay_unit":{"anyOf":[{"$ref":"#/components/schemas/DelayUnit"},{"type":"null"}]},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["name","type","channel_id","ai_prompt"],"title":"AgentPayload","description":"Create / full-update body for an agent.\n\n`channel_id` is the dashboard channel the agent runs on (`ig-<id>`,\n`ig-business-<id>` or `fb-page-<id>`); the service unpacks it into the\naccount id triple the row stores."},"AgentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/AgentType"},"channel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"media_selection_type":{"$ref":"#/components/schemas/AgentMediaSelectionType"},"media_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Media Ids"},"ai_prompt":{"type":"string","title":"Ai Prompt"},"action_limit":{"anyOf":[{"$ref":"#/components/schemas/ActionsLimit"},{"type":"null"}]},"action_limit_value":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Action Limit Value"},"delay_in_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delay In Seconds"},"delay_unit":{"anyOf":[{"$ref":"#/components/schemas/DelayUnit"},{"type":"null"}]},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","type","media_selection_type","ai_prompt","is_active","created_at","updated_at"],"title":"AgentResponse"},"AgentTogglePayload":{"properties":{"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["is_active"],"title":"AgentTogglePayload","description":"Explicit target state — idempotent, unlike a flip."},"AgentType":{"type":"string","enum":["LIKE","COMMENT_MODERATION"],"title":"AgentType"},"AiUsageOverview":{"properties":{"policy_scan_total":{"type":"integer","title":"Policy Scan Total"},"policy_scan_this_month":{"type":"integer","title":"Policy Scan This Month"},"flow_builder_tokens_all_time":{"type":"integer","title":"Flow Builder Tokens All Time"},"flow_builder_cost_all_time_usd":{"type":"number","title":"Flow Builder Cost All Time Usd"},"flow_builder_cost_this_month_usd":{"type":"number","title":"Flow Builder Cost This Month Usd"},"cost_by_feature":{"items":{"$ref":"#/components/schemas/FeatureCost"},"type":"array","title":"Cost By Feature"},"note":{"type":"string","title":"Note"}},"type":"object","required":["policy_scan_total","policy_scan_this_month","flow_builder_tokens_all_time","flow_builder_cost_all_time_usd","flow_builder_cost_this_month_usd","cost_by_feature","note"],"title":"AiUsageOverview"},"AllAutomationStats":{"properties":{"hits":{"type":"integer","title":"Hits","default":0},"clicks":{"type":"integer","title":"Clicks","default":0},"click_rate":{"type":"number","title":"Click Rate","default":0.0},"hits_last_7_days":{"items":{"$ref":"#/components/schemas/DateGraphSchema"},"type":"array","title":"Hits Last 7 Days"},"clicks_last_7_days":{"items":{"$ref":"#/components/schemas/DateGraphSchema"},"type":"array","title":"Clicks Last 7 Days"},"question_taps_last_7_days":{"anyOf":[{"items":{"$ref":"#/components/schemas/QuestionTaps"},"type":"array"},{"type":"null"}],"title":"Question Taps Last 7 Days"}},"type":"object","required":["hits_last_7_days","clicks_last_7_days"],"title":"AllAutomationStats"},"AllAutomationsCountsResponse":{"properties":{"total":{"type":"integer","title":"Total"},"status":{"$ref":"#/components/schemas/AutomationStatusCounts"},"automation_types":{"additionalProperties":{"type":"integer"},"propertyNames":{"$ref":"#/components/schemas/AutomationTypeFilter"},"type":"object","title":"Automation Types"},"triggers":{"additionalProperties":{"type":"integer"},"propertyNames":{"$ref":"#/components/schemas/AutomationTriggerFilter"},"type":"object","title":"Triggers"}},"type":"object","required":["total","status","automation_types","triggers"],"title":"AllAutomationsCountsResponse","description":"The counts of the automations table's toolbar and filter popup."},"AllAutomationsStatsPayload":{"properties":{"record_ids":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Record Ids"}},"type":"object","required":["record_ids"],"title":"AllAutomationsStatsPayload"},"AllAutomationsStatsResponse":{"properties":{"stats":{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/AllAutomationStats"},{"type":"null"}]},"type":"object","title":"Stats"}},"type":"object","required":["stats"],"title":"AllAutomationsStatsResponse"},"AnalyticsKpisSchema":{"properties":{"total_hits":{"$ref":"#/components/schemas/KpiMetricSchema"},"click_rate":{"$ref":"#/components/schemas/KpiMetricSchema"},"follow_conversion":{"$ref":"#/components/schemas/KpiMetricSchema"},"new_followers":{"$ref":"#/components/schemas/KpiMetricSchema"}},"type":"object","required":["total_hits","click_rate","follow_conversion","new_followers"],"title":"AnalyticsKpisSchema"},"ApiKeyCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"ApiKeyCreate"},"ApiKeyCreateResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"api_key":{"type":"string","title":"Api Key"}},"type":"object","required":["id","name","key_prefix","created_at","api_key"],"title":"ApiKeyCreateResponse","description":"Create response — the only place the full key ever appears."},"ApiKeyResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","key_prefix","created_at"],"title":"ApiKeyResponse"},"ApiModelResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"}},"type":"object","required":["id"],"title":"ApiModelResponseSchema"},"AttachmentItem":{"properties":{"id":{"type":"integer","title":"Id"},"meta_attachment_id":{"type":"string","title":"Meta Attachment Id"},"file_url":{"type":"string","title":"File Url"},"type":{"$ref":"#/components/schemas/AttachmentType"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","meta_attachment_id","file_url","type","created_at"],"title":"AttachmentItem"},"AttachmentMessageFlowNode":{"properties":{"id":{"type":"string","title":"Id","description":"Unique node id within the flow. Use a UUID string (e.g. 'a7f3...'). Edges reference nodes by this id, so it must be stable once created.","examples":["b3c1f4a2-5d7e-4a9b-9c8d-1f2e3a4b5c6d"]},"position":{"$ref":"#/components/schemas/NodePosition","description":"Canvas coordinates for visual layout only. Has no effect on execution. Use `{x: 0, y: 0}` if you don't care about layout."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Parent node id for grouped children. Required cases: (1) trigger nodes (USER_COMMENT_TRIGGER, USER_SENDS_MESSAGE, USER_SHARE_POST, USER_STORY_MENTION) must have the TRIGGER_GROUP's id as parentId. (2) MESSAGE_BUTTON nodes must have their parent message node's id as parentId (the BUTTON_TEXT_MESSAGE / BUTTON_TEXT_IMAGE_MESSAGE / CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE). All other nodes leave this null."},"extent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extent","description":"XYFlow visual constraint. Usually 'parent' when parentId is set. Leave null otherwise; the frontend infers this."},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"XYFlow runtime layout field. Do NOT set when generating new nodes — the editor populates this."},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"measured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Measured","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"type":{"type":"string","const":"ATTACHMENT_MESSAGE","title":"Type","default":"ATTACHMENT_MESSAGE"},"data":{"$ref":"#/components/schemas/AttachmentMessageNodeData"}},"additionalProperties":true,"type":"object","required":["id","position","data"],"title":"AttachmentMessageFlowNode","description":"Sends one previously-uploaded attachment (image, video, audio or PDF)\nas its own DM. Carries no text — pair it with a PLAIN_TEXT_MESSAGE\nsibling if the file needs a caption. The file must already exist in the\nattachment library; this node only references it by id."},"AttachmentMessageNodeData":{"properties":{"attachment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attachment Id","description":"Row id from `POST /v1/attachment/upload` (NOT Meta's attachment_id — that is resolved server-side at send time). Null means the editor added the block but nothing has been uploaded into it yet; such a node sends nothing.","examples":[1421]},"attachment_data":{"anyOf":[{"$ref":"#/components/schemas/AttachmentNodeSnapshot"},{"type":"null"}],"description":"Denormalized copy of the attachment row, written by the editor so the canvas can draw the preview without refetching. Display only — `attachment_id` is the source of truth and the only field the send path reads. Leave null when creating a node; the editor fills it in after upload."}},"additionalProperties":true,"type":"object","title":"AttachmentMessageNodeData","description":"Action: send a stored media/document attachment as its own DM.\n\nThe file is not carried here. It is uploaded ahead of time through\n`POST /v1/attachment/upload`, which registers it with Meta as a reusable\nattachment and returns a row id — that id is all the send path needs. At\nsend time the row is looked up and its `meta_attachment_id` goes out in the\nmessage payload, exactly as the DM automation does for its Attachment type."},"AttachmentNodeSnapshot":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id","description":"Attachment row id."},"meta_attachment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta Attachment Id","description":"Meta's reusable attachment id. Mirrored for display only — the send path re-reads it from the database rather than trusting this copy, because it is account-scoped and a flow copied to another channel carries a stale one."},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url","description":"Public URL of the stored file; drives the canvas preview."},"type":{"anyOf":[{"$ref":"#/components/schemas/AttachmentType"},{"type":"null"}],"description":"image | video | audio | file — picks which bubble the editor draws."},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"ISO-8601 timestamp as the editor sent it. Deliberately a plain string, NOT a datetime: node data is persisted with `node.model_dump()` (python mode, see flow_automation/services.py) straight into the `nodes` JSON column, and a real datetime object is not JSON-serializable — typing this as `datetime` breaks every save of a flow containing an attachment. Nothing server-side does date arithmetic on it; it exists so the editor can show 'uploaded 3 days ago' without a refetch."}},"additionalProperties":true,"type":"object","title":"AttachmentNodeSnapshot","description":"The editor's cached copy of an Attachment row, parked on the node.\n\nDeliberately NOT `attachment.schemas.AttachmentItem`, even though it\ndescribes the same row. `AttachmentItem` makes `id`, `meta_attachment_id`,\n`file_url`, `type` and `created_at` required, which is right for an API\nresponse but wrong here: `FlowGraph._convert_nodes` re-validates every\nSTORED node through `FlowNodeAdapter` on read, on ~14 paths including flow\nexecution. A required field would therefore reject an already-saved node\nat read time and silently take a live automation offline (the same trap\ndocumented on `UserCommentTriggerData.ai_prompt` above).\n\nSo every field is optional and `extra=\"allow\"` keeps anything the editor\nadds later. This is a display cache: nothing here is trusted at send time,\nwhere the row is re-read from the database by `attachment_id`."},"AttachmentType":{"type":"string","enum":["image","video","audio","file"],"title":"AttachmentType"},"AuthorizationGrantResponse":{"properties":{"redirect_url":{"type":"string","title":"Redirect Url","description":"Fully-built callback URL including code and state."}},"type":"object","required":["redirect_url"],"title":"AuthorizationGrantResponse","description":"Returned to the consent screen after the user clicks Allow.\n\nThe frontend performs the redirect itself rather than following a 302,\nbecause the browser fetch that carries the Firebase ID token cannot\nusefully follow a cross-origin redirect to the partner's callback."},"AutoReplyGeneratePayload":{"properties":{"prompt":{"type":"string","title":"Prompt"}},"type":"object","required":["prompt"],"title":"AutoReplyGeneratePayload"},"AutoReplyGenerateResponse":{"properties":{"text":{"type":"string","title":"Text"}},"type":"object","required":["text"],"title":"AutoReplyGenerateResponse"},"AutoReplyMode":{"type":"string","enum":["MANUAL","AI"],"title":"AutoReplyMode"},"AutoReplyVariationsPayload":{"properties":{"messages":{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1,"title":"Messages","description":"Existing auto-reply messages, one variation is written per message."}},"type":"object","required":["messages"],"title":"AutoReplyVariationsPayload","description":"Body for POST /api/v1/ai/generate_auto_reply_variations.\n\n`messages` are the creator's existing manual auto-reply templates\n(`Automation.auto_reply_messages`); the endpoint writes ONE new variation\nof each. Blank entries are dropped and case-insensitive duplicates\ncollapsed before validation, so a body of only whitespace is a 422 rather\nthan a model call."},"AutoReplyVariationsResponse":{"properties":{"variations":{"items":{"type":"string"},"type":"array","title":"Variations"}},"type":"object","required":["variations"],"title":"AutoReplyVariationsResponse","description":"Response for POST /api/v1/ai/generate_auto_reply_variations.\n\n`variations` are new messages only, one per original and in the order of\nthe originals (which are not echoed back), ready to append to\n`auto_reply_messages`. May hold fewer entries than originals when the\nmodel could not produce a distinct rewrite of one of them after one\ntop-up call."},"AutomationAddon":{"type":"string","enum":["AI_AUTO_REPLY","AI_INTENT","AD"],"title":"AutomationAddon","description":"Optional add-on features a BASIC automation may have. Multi-select,\nAND-combined with the trigger. Ignored for FLOW."},"AutomationAnalyticsResponseSchema":{"properties":{"kpis":{"$ref":"#/components/schemas/AnalyticsKpisSchema"},"funnel":{"$ref":"#/components/schemas/FunnelSchema"},"daily_activity":{"$ref":"#/components/schemas/DailyActivitySchema"},"clicks_by_country":{"$ref":"#/components/schemas/ClicksByCountrySchema"}},"type":"object","required":["kpis","funnel","daily_activity","clicks_by_country"],"title":"AutomationAnalyticsResponseSchema"},"AutomationByType":{"properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"count":{"type":"integer","title":"Count"},"media_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Source"}},"type":"object","required":["count"],"title":"AutomationByType"},"AutomationByUser":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"total":{"type":"integer","title":"Total"},"total_active":{"type":"integer","title":"Total Active"}},"type":"object","required":["total","total_active"],"title":"AutomationByUser"},"AutomationCategory":{"type":"string","enum":["post","story","inbox","flow","basic","all","conversation_starter"],"title":"AutomationCategory","description":"Automation category."},"AutomationDBEditPayload":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"$ref":"#/components/schemas/app__api__v1__automation__schemas__AutomationType"},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"media_type":{"anyOf":[{"$ref":"#/components/schemas/MediaType"},{"type":"null"}]},"media_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Url"},"media_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Id"},"keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keywords"},"dm_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dm Message"},"attachment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attachment Id"},"disable_auto_reply":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Auto Reply","default":false},"auto_reply_messages":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Auto Reply Messages"},"auto_reply_mode":{"anyOf":[{"$ref":"#/components/schemas/AutoReplyMode"},{"type":"null"}],"default":"MANUAL"},"auto_reply_ai_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auto Reply Ai Prompt"},"auto_reply_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Auto Reply Limit"},"product_links":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProductLink"},"type":"array"},{"type":"null"}],"title":"Product Links"},"addition_buttons":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdditionButtonSchema"},"type":"array"},{"type":"null"}],"title":"Addition Buttons"},"dm_quick_replies":{"anyOf":[{"items":{"$ref":"#/components/schemas/QuickReplySchema"},"type":"array"},{"type":"null"}],"title":"Dm Quick Replies"},"ask_to_follow":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ask To Follow"},"extra_data":{"anyOf":[{"$ref":"#/components/schemas/AutomationExtraData"},{"type":"null"}]},"step_delays":{"anyOf":[{"$ref":"#/components/schemas/AutomationStepDelays"},{"type":"null"}]},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_draft":{"type":"boolean","title":"Is Draft","default":false},"is_story":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Story","default":false},"is_universal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Universal","default":false},"trigger_type":{"anyOf":[{"$ref":"#/components/schemas/AutomationTriggerType"},{"type":"null"}]},"disable_url_tracking":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Url Tracking"},"disable_dm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Dm","default":false},"one_dm_per_user":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"One Dm Per User","default":false},"one_dm_per_user_window_hours":{"anyOf":[{"type":"integer","maximum":168.0,"minimum":1.0},{"type":"null"}],"title":"One Dm Per User Window Hours"},"share_media_for_dm":{"type":"boolean","title":"Share Media For Dm","default":false},"enable_opener_message":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enable Opener Message"},"keyword_trigger_type":{"anyOf":[{"$ref":"#/components/schemas/AutomationKeywordTriggerType"},{"type":"null"}],"default":"EXACT_MATCH"},"media_source":{"anyOf":[{"$ref":"#/components/schemas/MediaSource"},{"type":"null"}],"default":"INSTAGRAM"},"trigger_ai_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger Ai Prompt"},"is_deleted":{"type":"boolean","title":"Is Deleted","default":false}},"type":"object","title":"AutomationDBEditPayload"},"AutomationDmVariationSchema":{"properties":{"dm_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dm Message"},"product_links":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProductLink"},"type":"array"},{"type":"null"}],"title":"Product Links"},"addition_buttons":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdditionButtonSchema"},"type":"array"},{"type":"null"}],"title":"Addition Buttons"},"attachment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attachment Id"},"attachment_data":{"anyOf":[{"$ref":"#/components/schemas/AttachmentItem"},{"type":"null"}]}},"type":"object","title":"AutomationDmVariationSchema"},"AutomationExtraData":{"properties":{"ask_to_follow_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ask To Follow Title"},"ask_to_follow_button_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ask To Follow Button Label"},"ask_to_follow_error_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ask To Follow Error Title"},"ask_to_follow_error_button_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ask To Follow Error Button Label"},"ask_to_follow_visit_profile_button_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ask To Follow Visit Profile Button Label"},"opener_message_type":{"anyOf":[{"$ref":"#/components/schemas/OpenerMessageType"},{"type":"null"}]},"opener_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opener Message"},"opener_message_button_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opener Message Button Label"},"opener_message_additional_buttons":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdditionButtonSchema"},"type":"array"},{"type":"null"}],"title":"Opener Message Additional Buttons"}},"type":"object","title":"AutomationExtraData"},"AutomationKeywordTriggerType":{"type":"string","enum":["ANY","EXACT_MATCH","EXCLUDE","AI_INTENT"],"title":"AutomationKeywordTriggerType"},"AutomationMediaDetails":{"properties":{"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"like_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Like Count"},"comments_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Comments Count"},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption"},"permalink":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Permalink"},"media_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Type"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"}},"type":"object","title":"AutomationMediaDetails"},"AutomationMediaDetailsPayload":{"properties":{"channel_id":{"type":"string","title":"Channel Id"},"media_ids":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Media Ids","default":[]},"story_media_ids":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Story Media Ids","default":[]}},"type":"object","required":["channel_id"],"title":"AutomationMediaDetailsPayload"},"AutomationMediaDetailsResponse":{"properties":{"media_details":{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/AutomationMediaDetails"},{"type":"null"}]},"type":"object","title":"Media Details"}},"type":"object","required":["media_details"],"title":"AutomationMediaDetailsResponse"},"AutomationOptionSchema":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"AutomationOptionSchema"},"AutomationOptionType":{"type":"string","enum":["basic","flow"],"title":"AutomationOptionType","description":"Which kind of automation a picker lists. The two kinds have separate id\nspaces, so a list holds one kind only. Values match AutomationCategory."},"AutomationPayload":{"properties":{"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/app__api__v1__automation__schemas__AutomationType"},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"media_type":{"anyOf":[{"$ref":"#/components/schemas/MediaType"},{"type":"null"}]},"media_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Url"},"media_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Id"},"keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keywords"},"dm_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dm Message"},"attachment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attachment Id"},"disable_auto_reply":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Auto Reply","default":false},"auto_reply_messages":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Auto Reply Messages"},"auto_reply_mode":{"anyOf":[{"$ref":"#/components/schemas/AutoReplyMode"},{"type":"null"}],"default":"MANUAL"},"auto_reply_ai_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auto Reply Ai Prompt"},"auto_reply_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Auto Reply Limit"},"product_links":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProductLink"},"type":"array"},{"type":"null"}],"title":"Product Links"},"addition_buttons":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdditionButtonSchema"},"type":"array"},{"type":"null"}],"title":"Addition Buttons"},"dm_quick_replies":{"anyOf":[{"items":{"$ref":"#/components/schemas/QuickReplySchema"},"type":"array"},{"type":"null"}],"title":"Dm Quick Replies"},"ask_to_follow":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ask To Follow"},"extra_data":{"anyOf":[{"$ref":"#/components/schemas/AutomationExtraData"},{"type":"null"}]},"step_delays":{"anyOf":[{"$ref":"#/components/schemas/AutomationStepDelays"},{"type":"null"}]},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_draft":{"type":"boolean","title":"Is Draft","default":false},"is_story":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Story","default":false},"is_universal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Universal","default":false},"trigger_type":{"anyOf":[{"$ref":"#/components/schemas/AutomationTriggerType"},{"type":"null"}]},"disable_url_tracking":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Url Tracking"},"disable_dm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Dm","default":false},"one_dm_per_user":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"One Dm Per User","default":false},"one_dm_per_user_window_hours":{"anyOf":[{"type":"integer","maximum":168.0,"minimum":1.0},{"type":"null"}],"title":"One Dm Per User Window Hours"},"share_media_for_dm":{"type":"boolean","title":"Share Media For Dm","default":false},"enable_opener_message":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enable Opener Message"},"keyword_trigger_type":{"anyOf":[{"$ref":"#/components/schemas/AutomationKeywordTriggerType"},{"type":"null"}],"default":"EXACT_MATCH"},"media_source":{"anyOf":[{"$ref":"#/components/schemas/MediaSource"},{"type":"null"}],"default":"INSTAGRAM"},"trigger_ai_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger Ai Prompt"},"use_next_post":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Next Post","default":false},"use_next_story":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Next Story","default":false},"use_rewind":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Rewind","default":false},"follow_up_messages":{"anyOf":[{"items":{"$ref":"#/components/schemas/FollowUpMessageSchema"},"type":"array"},{"type":"null"}],"title":"Follow Up Messages"},"collect_info_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/CollectInfoItem"},"type":"array"},{"type":"null"}],"title":"Collect Info Items"},"dm_variations":{"anyOf":[{"items":{"$ref":"#/components/schemas/AutomationDmVariationSchema"},"type":"array"},{"type":"null"}],"title":"Dm Variations"}},"type":"object","required":["name","type"],"title":"AutomationPayload"},"AutomationRecordDeleteResponse":{"properties":{"record_id":{"type":"string","title":"Record Id"}},"type":"object","required":["record_id"],"title":"AutomationRecordDeleteResponse"},"AutomationRecordPinPayload":{"properties":{"pinned":{"type":"boolean","title":"Pinned"}},"type":"object","required":["pinned"],"title":"AutomationRecordPinPayload"},"AutomationRecordPinResponse":{"properties":{"record_id":{"type":"string","title":"Record Id"},"pinned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pinned At"}},"type":"object","required":["record_id","pinned_at"],"title":"AutomationRecordPinResponse"},"AutomationRecordSuggestNameResponse":{"properties":{"record_id":{"type":"string","title":"Record Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["record_id","name"],"title":"AutomationRecordSuggestNameResponse"},"AutomationRecordTogglePayload":{"properties":{"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["is_active"],"title":"AutomationRecordTogglePayload"},"AutomationRecordToggleResponse":{"properties":{"record_id":{"type":"string","title":"Record Id"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["record_id","is_active"],"title":"AutomationRecordToggleResponse"},"AutomationRewindEditPayload":{"properties":{"status":{"$ref":"#/components/schemas/ProcessStatus"}},"type":"object","required":["status"],"title":"AutomationRewindEditPayload"},"AutomationStatsPayload":{"properties":{"automation_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Automation Ids"}},"type":"object","title":"AutomationStatsPayload"},"AutomationStatusCounts":{"properties":{"all":{"type":"integer","title":"All","default":0},"draft":{"type":"integer","title":"Draft","default":0},"live":{"type":"integer","title":"Live","default":0},"paused":{"type":"integer","title":"Paused","default":0}},"type":"object","title":"AutomationStatusCounts","description":"Rows per status tab under the current search and filters."},"AutomationStatusFilter":{"type":"string","enum":["draft","live","paused"],"title":"AutomationStatusFilter","description":"The status tabs of the automations table. Draft, live and paused\npartition all: paused is what was switched off and is not a draft."},"AutomationStepDelays":{"properties":{"comment":{"anyOf":[{"$ref":"#/components/schemas/StepDelay"},{"type":"null"}]},"opener":{"anyOf":[{"$ref":"#/components/schemas/StepDelay"},{"type":"null"}]},"ask_to_follow":{"anyOf":[{"$ref":"#/components/schemas/StepDelay"},{"type":"null"}]},"dm":{"anyOf":[{"$ref":"#/components/schemas/StepDelay"},{"type":"null"}]}},"type":"object","title":"AutomationStepDelays","description":"Optional per-step delays. A missing/None entry means the step runs\nimmediately after the previous one. Each delay is relative to the\nprevious step, so the chain is:\ntrigger -> comment -> opener -> ask_to_follow -> dm."},"AutomationSummaryResponse":{"properties":{"total_automations":{"type":"integer","title":"Total Automations"},"active_automations":{"type":"integer","title":"Active Automations"},"inactive_automations":{"type":"integer","title":"Inactive Automations"},"total_comments_with_keyword":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Comments With Keyword"},"total_url_clicks":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Url Clicks"}},"type":"object","required":["total_automations","active_automations","inactive_automations"],"title":"AutomationSummaryResponse"},"AutomationTriggerFilter":{"type":"string","enum":["specific_post","any_post","next_post","story","conversation_starter"],"title":"AutomationTriggerFilter","description":"The \"Trigger\" options of the automations table filter."},"AutomationTriggerType":{"type":"string","enum":["STORY_MENTION","CURRENT_MEDIA","AD_MEDIA"],"title":"AutomationTriggerType"},"AutomationTypeFilter":{"type":"string","enum":["basic","flow"],"title":"AutomationTypeFilter","description":"The \"Automation type\" options of the automations table filter."},"AutomationsByMediaPayload":{"properties":{"media_ids":{"items":{"type":"string"},"type":"array","maxItems":200,"minItems":1,"title":"Media Ids"}},"type":"object","required":["media_ids"],"title":"AutomationsByMediaPayload"},"AutomationsByMediaResponse":{"properties":{"automations":{"additionalProperties":{"items":{"$ref":"#/components/schemas/MediaAutomation"},"type":"array"},"type":"object","title":"Automations"}},"type":"object","required":["automations"],"title":"AutomationsByMediaResponse"},"AutomationsByTypeResponse":{"properties":{"by_type":{"items":{"$ref":"#/components/schemas/AutomationByType"},"type":"array","title":"By Type"}},"type":"object","required":["by_type"],"title":"AutomationsByTypeResponse"},"AutomationsByUsersResponse":{"properties":{"by_users":{"items":{"$ref":"#/components/schemas/AutomationByUser"},"type":"array","title":"By Users"}},"type":"object","required":["by_users"],"title":"AutomationsByUsersResponse"},"BillingInformationResponse":{"properties":{"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"email":{"type":"string","title":"Email"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"gst_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gst No"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"}},"type":"object","required":["email"],"title":"BillingInformationResponse"},"BlogDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"babylovegrowth_ai_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Babylovegrowth Ai Id"},"title":{"type":"string","title":"Title"},"meta_description":{"type":"string","title":"Meta Description"},"slug":{"type":"string","title":"Slug"},"language_code":{"type":"string","title":"Language Code"},"content_html":{"type":"string","title":"Content Html"},"content_markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Markdown"},"hero_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hero Image Url"},"written_by":{"type":"string","title":"Written By"},"is_active":{"type":"boolean","title":"Is Active"},"is_draft":{"type":"boolean","title":"Is Draft","default":false},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"related_blogs":{"items":{"$ref":"#/components/schemas/RelatedBlogItem"},"type":"array","title":"Related Blogs","default":[]}},"type":"object","required":["id","title","meta_description","slug","language_code","content_html","written_by","is_active"],"title":"BlogDetailResponse","description":"Public blog detail (view-by-slug). Mirrors every column the endpoint\nused to return from the raw model, plus the aggregated related blogs."},"BlogPreviewTokenResponse":{"properties":{"token":{"type":"string","title":"Token"},"preview_url":{"type":"string","title":"Preview Url"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["token","preview_url","expires_at"],"title":"BlogPreviewTokenResponse","description":"Signed, expiring link that renders a post on the website exactly as a\npublished one, including drafts. Handed to the admin console so a writer\ncan check a draft before publishing."},"Body_admin_upload_blog_image_v1_blog_admin_upload_image_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_admin_upload_blog_image_v1_blog_admin_upload_image_post"},"Body_exchange_firebase_token_v1_mcp_oauth_exchange_firebase_token_post":{"properties":{"firebase_token":{"type":"string","title":"Firebase Token"},"client_id":{"type":"string","title":"Client Id"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"state":{"type":"string","title":"State"},"code_challenge":{"type":"string","title":"Code Challenge"},"code_challenge_method":{"type":"string","title":"Code Challenge Method","default":"S256"}},"type":"object","required":["firebase_token","client_id","redirect_uri","state","code_challenge"],"title":"Body_exchange_firebase_token_v1_mcp_oauth_exchange_firebase_token_post"},"Body_exchange_firebase_token_v1_oauth_exchange_firebase_token_post":{"properties":{"firebase_token":{"type":"string","title":"Firebase Token"},"client_id":{"type":"string","title":"Client Id"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"state":{"type":"string","title":"State"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"},"code_challenge":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge"},"code_challenge_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge Method"}},"type":"object","required":["firebase_token","client_id","redirect_uri","state"],"title":"Body_exchange_firebase_token_v1_oauth_exchange_firebase_token_post"},"Body_revoke_v1_oauth_revoke_post":{"properties":{"token":{"type":"string","title":"Token"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"}},"type":"object","required":["token"],"title":"Body_revoke_v1_oauth_revoke_post"},"Body_schedule_media_v1_media_scheduler_schedule_post":{"properties":{"media_file":{"type":"string","format":"binary","title":"Media File","description":"Image or video file to upload"},"cover_file":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"Cover File","description":"Optional cover image for video/Reels"},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption"},"media_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Type"},"share_to_feed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Share To Feed"},"thumb_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Thumb Offset"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"}},"type":"object","required":["media_file"],"title":"Body_schedule_media_v1_media_scheduler_schedule_post"},"Body_send_email_from_csv_admin_v1_email_admin_send_from_csv__template_id__post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_send_email_from_csv_admin_v1_email_admin_send_from_csv__template_id__post"},"Body_send_email_from_csv_v1_email__template_id__send_email_from_csv_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_send_email_from_csv_v1_email__template_id__send_email_from_csv_post"},"Body_token_v1_mcp_oauth_token_post":{"properties":{"grant_type":{"type":"string","title":"Grant Type"},"code":{"type":"string","title":"Code"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"client_id":{"type":"string","title":"Client Id"},"code_verifier":{"type":"string","title":"Code Verifier"}},"type":"object","required":["grant_type"],"title":"Body_token_v1_mcp_oauth_token_post"},"Body_token_v1_oauth_token_post":{"properties":{"grant_type":{"type":"string","title":"Grant Type"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"},"code_verifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"}},"type":"object","required":["grant_type"],"title":"Body_token_v1_oauth_token_post"},"Body_upload_attachment_v1_attachment_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File","description":"Image/video/audio/file to register with Meta"},"attachment_type":{"$ref":"#/components/schemas/AttachmentType"},"channel_id":{"type":"string","title":"Channel Id"}},"type":"object","required":["file","attachment_type","channel_id"],"title":"Body_upload_attachment_v1_attachment_upload_post"},"Body_upload_image_v1_link_scrapper_upload_image_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_image_v1_link_scrapper_upload_image_post"},"ButtonAction":{"properties":{"type":{"anyOf":[{"$ref":"#/components/schemas/ButtonActionType"},{"type":"null"}],"description":"OPEN_WEBSITE: open `url` in browser. NONE: just continue the flow (the next connected node fires).","default":"NONE"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Required when `type=OPEN_WEBSITE`. Must be HTTPS.","examples":["https://example.com/pricing"]},"additionalActions":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Additionalactions","description":"If True, also continue the flow after opening the URL."},"disable_url_tracking":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Url Tracking","description":"If True, the URL is sent unchanged (no Salesmorph click-tracking wrapper). Use for landing pages where you have your own analytics.","default":false}},"type":"object","title":"ButtonAction","description":"What a button does when tapped."},"ButtonActionType":{"type":"string","enum":["OPEN_WEBSITE","NONE"],"title":"ButtonActionType","description":"What happens when a contact taps a MESSAGE_BUTTON.\nOPEN_WEBSITE: opens `url` in browser; can carry click tracking.\nNONE: button continues the flow (next connected node fires) without\nleaving the conversation."},"ButtonTextImageMessageFlowNode":{"properties":{"id":{"type":"string","title":"Id","description":"Unique node id within the flow. Use a UUID string (e.g. 'a7f3...'). Edges reference nodes by this id, so it must be stable once created.","examples":["b3c1f4a2-5d7e-4a9b-9c8d-1f2e3a4b5c6d"]},"position":{"$ref":"#/components/schemas/NodePosition","description":"Canvas coordinates for visual layout only. Has no effect on execution. Use `{x: 0, y: 0}` if you don't care about layout."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Parent node id for grouped children. Required cases: (1) trigger nodes (USER_COMMENT_TRIGGER, USER_SENDS_MESSAGE, USER_SHARE_POST, USER_STORY_MENTION) must have the TRIGGER_GROUP's id as parentId. (2) MESSAGE_BUTTON nodes must have their parent message node's id as parentId (the BUTTON_TEXT_MESSAGE / BUTTON_TEXT_IMAGE_MESSAGE / CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE). All other nodes leave this null."},"extent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extent","description":"XYFlow visual constraint. Usually 'parent' when parentId is set. Leave null otherwise; the frontend infers this."},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"XYFlow runtime layout field. Do NOT set when generating new nodes — the editor populates this."},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"measured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Measured","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"type":{"type":"string","const":"BUTTON_TEXT_IMAGE_MESSAGE","title":"Type","default":"BUTTON_TEXT_IMAGE_MESSAGE"},"data":{"$ref":"#/components/schemas/ButtonTextImageNodeData"}},"additionalProperties":true,"type":"object","required":["id","position","data"],"title":"ButtonTextImageMessageFlowNode","description":"Sends a single image card (image + title + subtitle) with attached\nbuttons. Use for promo cards, single-product showcases. For multiple\ncards, use CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE instead."},"ButtonTextImageNodeData":{"properties":{"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Imageurl","description":"Public HTTPS URL of the card image (JPEG/PNG, <8MB)."},"title":{"type":"string","title":"Title","description":"Card headline (max ~80 chars). Bold in the rendered card.","examples":["Premium Plan"]},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle","description":"Card body text (max ~80 chars). Optional but recommended."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"If the user taps the image (not a button), open this URL. Leave null to make the image non-tappable."}},"additionalProperties":true,"type":"object","required":["title"],"title":"ButtonTextImageNodeData","description":"Action: send a card with image + title + subtitle + clickable buttons.\nUsed either as a standalone message or as one item inside a carousel.\nButtons are `MESSAGE_BUTTON` child nodes whose `parentId` is this node\n(or, when inside a carousel, use `carousel_item_index`)."},"ButtonTextMessageFlowNode":{"properties":{"id":{"type":"string","title":"Id","description":"Unique node id within the flow. Use a UUID string (e.g. 'a7f3...'). Edges reference nodes by this id, so it must be stable once created.","examples":["b3c1f4a2-5d7e-4a9b-9c8d-1f2e3a4b5c6d"]},"position":{"$ref":"#/components/schemas/NodePosition","description":"Canvas coordinates for visual layout only. Has no effect on execution. Use `{x: 0, y: 0}` if you don't care about layout."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Parent node id for grouped children. Required cases: (1) trigger nodes (USER_COMMENT_TRIGGER, USER_SENDS_MESSAGE, USER_SHARE_POST, USER_STORY_MENTION) must have the TRIGGER_GROUP's id as parentId. (2) MESSAGE_BUTTON nodes must have their parent message node's id as parentId (the BUTTON_TEXT_MESSAGE / BUTTON_TEXT_IMAGE_MESSAGE / CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE). All other nodes leave this null."},"extent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extent","description":"XYFlow visual constraint. Usually 'parent' when parentId is set. Leave null otherwise; the frontend infers this."},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"XYFlow runtime layout field. Do NOT set when generating new nodes — the editor populates this."},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"measured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Measured","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"type":{"type":"string","const":"BUTTON_TEXT_MESSAGE","title":"Type","default":"BUTTON_TEXT_MESSAGE"},"data":{"$ref":"#/components/schemas/ButtonTextNodeData"}},"additionalProperties":true,"type":"object","required":["id","position","data"],"title":"ButtonTextMessageFlowNode","description":"Sends a text DM with 1-3 attached buttons. Add the buttons as\nMESSAGE_BUTTON child nodes whose `parentId` equals this node's id.\nWithout child MESSAGE_BUTTONs this renders as a plain text message."},"ButtonTextNodeData":{"properties":{"message":{"type":"string","title":"Message","description":"Text shown above the buttons. Supports `{{username}}`, `{{email}}`, `{{phone}}`, `{{instagram_user_id}}`.","examples":["What would you like to do next?"]}},"additionalProperties":true,"type":"object","required":["message"],"title":"ButtonTextNodeData","description":"Action: send a text message that has clickable buttons attached.\nDefine the buttons as `MESSAGE_BUTTON` child nodes whose `parentId` is\nthis node's id. Meta limit: max 3 buttons per text message."},"CancelUserDeletionResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["success","detail"],"title":"CancelUserDeletionResponse","description":"Response for cancelling a scheduled account deletion."},"CancellationFeedbackPayload":{"properties":{"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons","default":[]},"description":{"type":"string","title":"Description","default":""}},"type":"object","title":"CancellationFeedbackPayload"},"CancellationImpactResponse":{"properties":{"active_automations":{"type":"integer","title":"Active Automations","default":0},"contacts":{"type":"integer","title":"Contacts","default":0}},"type":"object","title":"CancellationImpactResponse"},"CarouselButtonTextImageMessageFlowNode":{"properties":{"id":{"type":"string","title":"Id","description":"Unique node id within the flow. Use a UUID string (e.g. 'a7f3...'). Edges reference nodes by this id, so it must be stable once created.","examples":["b3c1f4a2-5d7e-4a9b-9c8d-1f2e3a4b5c6d"]},"position":{"$ref":"#/components/schemas/NodePosition","description":"Canvas coordinates for visual layout only. Has no effect on execution. Use `{x: 0, y: 0}` if you don't care about layout."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Parent node id for grouped children. Required cases: (1) trigger nodes (USER_COMMENT_TRIGGER, USER_SENDS_MESSAGE, USER_SHARE_POST, USER_STORY_MENTION) must have the TRIGGER_GROUP's id as parentId. (2) MESSAGE_BUTTON nodes must have their parent message node's id as parentId (the BUTTON_TEXT_MESSAGE / BUTTON_TEXT_IMAGE_MESSAGE / CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE). All other nodes leave this null."},"extent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extent","description":"XYFlow visual constraint. Usually 'parent' when parentId is set. Leave null otherwise; the frontend infers this."},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"XYFlow runtime layout field. Do NOT set when generating new nodes — the editor populates this."},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"measured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Measured","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"type":{"type":"string","const":"CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE","title":"Type","default":"CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE"},"data":{"$ref":"#/components/schemas/CarouselButtonTextImageNodeData"}},"additionalProperties":true,"type":"object","required":["id","position","data"],"title":"CarouselButtonTextImageMessageFlowNode","description":"Sends a horizontally-scrollable carousel of 2-10 image cards. Each\ncard has its own buttons (MESSAGE_BUTTON child nodes with this node as\n`parentId` and the right `carousel_item_index`)."},"CarouselButtonTextImageNodeData":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ButtonTextImageNodeData"},"type":"array","title":"Items","description":"The cards in the carousel, left-to-right. 2-10 items."}},"additionalProperties":true,"type":"object","required":["items"],"title":"CarouselButtonTextImageNodeData","description":"Action: send a horizontally-scrollable carousel of image cards.\nMeta limit: 2-10 cards. Each card's buttons are MESSAGE_BUTTON nodes\nwith this carousel as `parentId` and `carousel_item_index` set."},"ChannelIdPayload":{"properties":{"channel_id":{"type":"string","title":"Channel Id"}},"type":"object","required":["channel_id"],"title":"ChannelIdPayload"},"ChatHistoryResponse":{"properties":{"id":{"type":"integer","title":"Id"},"flow_automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Flow Automation Id"},"draft_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Key"},"is_active":{"type":"boolean","title":"Is Active"},"messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Messages"},"turn_count":{"type":"integer","title":"Turn Count"},"total_input_tokens":{"type":"integer","title":"Total Input Tokens"},"total_output_tokens":{"type":"integer","title":"Total Output Tokens"},"total_cache_read_tokens":{"type":"integer","title":"Total Cache Read Tokens"},"total_cache_write_tokens":{"type":"integer","title":"Total Cache Write Tokens"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","is_active","messages","turn_count","total_input_tokens","total_output_tokens","total_cache_read_tokens","total_cache_write_tokens","created_at","updated_at"],"title":"ChatHistoryResponse","description":"Returned by the history endpoints. `null` body when no active\nsession exists yet for this (target, user). Exactly one of\n`flow_automation_id` / `draft_key` is set, matching the session's\ntarget."},"ChatTurnPayload":{"properties":{"message":{"type":"string","maxLength":4000,"minLength":1,"title":"Message"},"nodes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Nodes"},"edges":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Edges"},"history":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"History"},"media_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Source"},"flow_automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Flow Automation Id"},"draft_key":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Draft Key"}},"type":"object","required":["message"],"title":"ChatTurnPayload","description":"User-side payload for `POST /turn`. Carries the new user message\nplus everything the server needs to run a stateless turn: the current\ngraph (so Claude sees what's already built) and the prior conversation\nhistory (so multi-turn refinement works)."},"CheckoutPayload":{"properties":{"variant_id":{"type":"string","title":"Variant Id"},"redirect_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Url"}},"type":"object","required":["variant_id"],"title":"CheckoutPayload"},"ClearHistoryResponse":{"properties":{"flow_automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Flow Automation Id"},"draft_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Key"},"session_id":{"type":"integer","title":"Session Id"},"cleared_at":{"type":"string","format":"date-time","title":"Cleared At"}},"type":"object","required":["session_id","cleared_at"],"title":"ClearHistoryResponse","description":"Returned by the clear-history endpoints. Echoes whichever target\nwas cleared (flow or draft)."},"ClickEvenPayload":{"properties":{"automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Automation Id"},"flow_automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Flow Automation Id"},"url":{"type":"string","title":"Url"},"source":{"$ref":"#/components/schemas/SourceType"},"client_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Ip"},"from_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From User Id"},"from_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Username"},"from_message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Message Id"}},"type":"object","required":["url","source"],"title":"ClickEvenPayload"},"ClickEventCountByCountryResponseSchema":{"properties":{"country_code":{"type":"string","title":"Country Code"},"country_name":{"type":"string","title":"Country Name"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["country_code","country_name","count"],"title":"ClickEventCountByCountryResponseSchema"},"ClicksByCountrySchema":{"properties":{"total":{"type":"integer","title":"Total"},"countries":{"items":{"$ref":"#/components/schemas/CountryStatSchema"},"type":"array","title":"Countries"}},"type":"object","required":["total","countries"],"title":"ClicksByCountrySchema"},"ClientInfoResponse":{"properties":{"client_id":{"type":"string","title":"Client Id"},"name":{"type":"string","title":"Name"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"scopes":{"items":{"$ref":"#/components/schemas/ScopeDescriptor"},"type":"array","title":"Scopes"}},"type":"object","required":["client_id","name","scopes"],"title":"ClientInfoResponse","description":"What the consent screen needs to tell the user who is asking.\n\nDeliberately does not echo the redirect_uri — the screen has no use\nfor it, and not returning it keeps this endpoint useless as an\nopen-redirect oracle."},"CloseStaleFlowExecutionsResponse":{"properties":{"closed_executions":{"type":"integer","title":"Closed Executions"},"older_than_hrs":{"type":"integer","title":"Older Than Hrs"}},"type":"object","required":["closed_executions","older_than_hrs"],"title":"CloseStaleFlowExecutionsResponse"},"CollectInfoItem":{"properties":{"message":{"type":"string","title":"Message"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"type":{"$ref":"#/components/schemas/InboxAutomationPredefinedMessage"}},"type":"object","required":["message","type"],"title":"CollectInfoItem"},"CollectPaymentFlowNode":{"properties":{"id":{"type":"string","title":"Id","description":"Unique node id within the flow. Use a UUID string (e.g. 'a7f3...'). Edges reference nodes by this id, so it must be stable once created.","examples":["b3c1f4a2-5d7e-4a9b-9c8d-1f2e3a4b5c6d"]},"position":{"$ref":"#/components/schemas/NodePosition","description":"Canvas coordinates for visual layout only. Has no effect on execution. Use `{x: 0, y: 0}` if you don't care about layout."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Parent node id for grouped children. Required cases: (1) trigger nodes (USER_COMMENT_TRIGGER, USER_SENDS_MESSAGE, USER_SHARE_POST, USER_STORY_MENTION) must have the TRIGGER_GROUP's id as parentId. (2) MESSAGE_BUTTON nodes must have their parent message node's id as parentId (the BUTTON_TEXT_MESSAGE / BUTTON_TEXT_IMAGE_MESSAGE / CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE). All other nodes leave this null."},"extent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extent","description":"XYFlow visual constraint. Usually 'parent' when parentId is set. Leave null otherwise; the frontend infers this."},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"XYFlow runtime layout field. Do NOT set when generating new nodes — the editor populates this."},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"measured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Measured","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"type":{"type":"string","const":"COLLECT_PAYMENT","title":"Type","default":"COLLECT_PAYMENT"},"data":{"$ref":"#/components/schemas/CollectPaymentNodeData"}},"additionalProperties":true,"type":"object","required":["id","position","data"],"title":"CollectPaymentFlowNode","description":"Asks the contact to pay, through the creator's own Stripe/Razorpay\naccount. Two outgoing handles: SUCCESS (payment captured) and FAILED\n(payment failed or the link went unpaid). Renders as \"Connect payment\ngateway\" until `data` is configured."},"CollectPaymentNodeData":{"properties":{"payment_provider_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment Provider Id","description":"Which connected gateway collects this — a UserPaymentProvider id from GET /v1/user_integrations/user_payments/provider/list. Null means the node is unconfigured."},"currency":{"anyOf":[{"type":"string","maxLength":3,"minLength":3},{"type":"null"}],"title":"Currency","description":"ISO 4217, uppercase. Must be one the chosen gateway supports — see GET /v1/user_integrations/user_payments/currencies.","examples":["INR","USD"]},"amount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount","description":"MAJOR units as a human types them: \"499.00\" means ₹499.00, not 49900. Converted to the gateway's minor units at link-creation time against the currency's ISO exponent.\n\nA STRING, not a Decimal. Flow nodes are persisted into flow_automation.nodes, a JSON column, and json.dumps cannot serialise a Decimal — saving any flow containing this node failed with \"Object of type Decimal is not JSON serializable\". A float would serialise but cannot hold 0.1 exactly, and this is money. The string is what the creator typed, parsed to Decimal at the one boundary that does arithmetic (services.to_minor_units).","examples":["499.00"]},"line_item_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line Item Name","description":"What the contact sees they are paying for.","examples":["SpectralHelix Technolabs"]},"line_item_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line Item Description","description":"Optional longer description shown on the payment page."},"save_payment_link_to_field_key":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},{"type":"null"}],"title":"Save Payment Link To Field Key","description":"Slug of a custom User Field the generated payment link is saved into, so later nodes can send it with {{user.<slug>}}. Required on a configured node — a link nothing can reference is a link the contact never receives. Defaults to `payment_link`. Same slug rules as CollectUserInfoNodeData.save_to_field_key.","examples":["payment_link"]}},"additionalProperties":true,"type":"object","title":"CollectPaymentNodeData","description":"Action: charge the contact through the creator's OWN payment gateway.\n\nTwo states, matching the two designs:\n\n  UNCONFIGURED — every field below is null. The editor renders the\n    \"Connect payment gateway\" placeholder. A node can sit like this while\n    the flow is a draft; publishing a flow that still has one is what\n    validation rejects.\n\n  CONFIGURED — payment_provider_id, currency, amount, line_item_name and\n    save_payment_link_to_field_key are all set. The editor renders the\n    gateway name with \"₹499.00 · <line_item_name>\".\n\nHalf-configured is not a state. The validator below refuses it, because a\nnode with an amount but no gateway (or a gateway but no amount) would look\nconfigured in the editor and fail at run time, when a contact is already\nwaiting on a payment link.\n\nThree outgoing handles:\n\n  (default, no id) — \"Then\". Continues the conversation as soon as the\n    payment link has been sent, while the contact is still deciding.\n    Every other node has this handle; without it a payment node would\n    stall the flow until a webhook arrived, which may be never.\n\n  SUCCESS — the gateway reported the payment captured.\n  FAILED  — the payment failed, or the link went unpaid.\n\nSUCCESS and FAILED fire asynchronously, when the webhook lands, which is\nwhy they are separate from the immediate continuation."},"CollectUserInfoFlowNode":{"properties":{"id":{"type":"string","title":"Id","description":"Unique node id within the flow. Use a UUID string (e.g. 'a7f3...'). Edges reference nodes by this id, so it must be stable once created.","examples":["b3c1f4a2-5d7e-4a9b-9c8d-1f2e3a4b5c6d"]},"position":{"$ref":"#/components/schemas/NodePosition","description":"Canvas coordinates for visual layout only. Has no effect on execution. Use `{x: 0, y: 0}` if you don't care about layout."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Parent node id for grouped children. Required cases: (1) trigger nodes (USER_COMMENT_TRIGGER, USER_SENDS_MESSAGE, USER_SHARE_POST, USER_STORY_MENTION) must have the TRIGGER_GROUP's id as parentId. (2) MESSAGE_BUTTON nodes must have their parent message node's id as parentId (the BUTTON_TEXT_MESSAGE / BUTTON_TEXT_IMAGE_MESSAGE / CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE). All other nodes leave this null."},"extent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extent","description":"XYFlow visual constraint. Usually 'parent' when parentId is set. Leave null otherwise; the frontend infers this."},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"XYFlow runtime layout field. Do NOT set when generating new nodes — the editor populates this."},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"measured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Measured","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"type":{"type":"string","const":"COLLECT_USER_INFO","title":"Type","default":"COLLECT_USER_INFO"},"data":{"$ref":"#/components/schemas/CollectUserInfoNodeData"}},"additionalProperties":true,"type":"object","required":["id","position","data"],"title":"CollectUserInfoFlowNode","description":"Prompts the user for an email/phone and saves it on the Contact.\nTwo outgoing handles: SUCCESS (collected & saved) and FAILED\n(max_retries exceeded)."},"CollectUserInfoNodeData":{"properties":{"type":{"$ref":"#/components/schemas/CollectUserInfoType","description":"What to collect. EMAIL: only accepts valid emails. PHONE: only accepts valid phone numbers. ANY: accepts any non-empty reply — always pair it with `save_to_field_key`."},"message":{"type":"string","title":"Message","description":"Prompt text shown when asking for the info.","examples":["What's the best email to send this to?"]},"error_message":{"type":"string","title":"Error Message","description":"Reply when the user's response is invalid; sent on each retry.","examples":["That doesn't look like a valid email — could you try again?"]},"max_retries":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Max Retries","description":"How many invalid attempts before the node falls through to FAILED.","default":3},"save_to_field_key":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},{"type":"null"}],"title":"Save To Field Key","description":"Slug of a custom User Field to save the collected reply into. ALWAYS set this for type=ANY (otherwise the reply is accepted but stored nowhere); optional for EMAIL/PHONE, which always store to the contact's fixed column as well. The value is coerced to the field's declared type.","examples":["budget","preferred_time"]}},"additionalProperties":true,"type":"object","required":["type","message","error_message"],"title":"CollectUserInfoNodeData","description":"Action: prompt the user for a piece of info in the DM, then save it.\nEMAIL/PHONE validate the reply and store it on the Contact record.\nANY accepts any non-empty reply and stores it in the custom User Field\nnamed by `save_to_field_key`. Retries on invalid input up to\n`max_retries` before falling through the FAILED handle."},"CollectUserInfoType":{"type":"string","enum":["EMAIL","PHONE","ANY"],"title":"CollectUserInfoType","description":"What contact field a COLLECT_USER_INFO node prompts the user to provide.\nEMAIL/PHONE validate the reply and store it on the contact's fixed\ncolumn. ANY accepts any non-empty reply; set `save_to_field_key` so the\nreply is stored in that custom User Field."},"CommentFrom":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"username":{"type":"string","title":"Username"}},"type":"object","required":["username"],"title":"CommentFrom"},"ConditionBase":{"properties":{"type":{"$ref":"#/components/schemas/ConditionType","description":"What contact/event attribute to evaluate. See ConditionType for the full list and Instagram-only caveats."},"source_handle":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/SourceHandle"}],"title":"Source Handle","description":"Outgoing handle id this rule routes to when matched. Use 'SUCCESS' / 'FAILED' for the standard two-way branch, or a custom handle id for multi-way branches (e.g. tiered FOLLOWERS_COUNT conditions).","examples":["SUCCESS","FAILED","tier_premium"]},"response_type":{"anyOf":[{"$ref":"#/components/schemas/ResponseType"},{"type":"null"}],"description":"Data type of the evaluated attribute. Must match the ConditionType: IF_USER_FOLLOWED_ME / IF_BUSINESS_FOLLOWS_USER / VERIFIED_ON_INSTAGRAM => BOOLEAN. FOLLOWERS_COUNT => NUMBER. CONTACT_EMAIL / CONTACT_PHONE => TEXT."},"check":{"anyOf":[{"$ref":"#/components/schemas/KeywordCheckType"},{"type":"null"}],"description":"Comparison operator. For BOOLEAN: EQUALS (with value=true/false). For NUMBER: GREATER_THAN / LESS_THAN / EQUALS. For TEXT: any string-match operator. For pure presence checks: HAS_VALUE / NOT_HAS_VALUE (value can be null)."},"value":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"integer"},{"type":"null"}],"title":"Value","description":"Right-hand side of the comparison. Type must match `response_type` (bool, int, or str). Leave null for HAS_VALUE / NOT_HAS_VALUE.","examples":[true,1000,"gmail.com"]},"field_key":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},{"type":"null"}],"title":"Field Key","description":"Slug of the custom User Field to evaluate. Required when type=CONTACT_FIELD, ignored otherwise.","examples":["plan_tier","lead_score"]}},"type":"object","required":["type","source_handle"],"title":"ConditionBase","description":"One branch rule inside a CONDITION node. Each branch declares what\nto evaluate, how to compare it, and which outgoing handle it routes to.\nThe flow follows the first matching condition; if none match, the FAILED\nhandle is used (configure it as a catch-all)."},"ConditionFlowNode":{"properties":{"id":{"type":"string","title":"Id","description":"Unique node id within the flow. Use a UUID string (e.g. 'a7f3...'). Edges reference nodes by this id, so it must be stable once created.","examples":["b3c1f4a2-5d7e-4a9b-9c8d-1f2e3a4b5c6d"]},"position":{"$ref":"#/components/schemas/NodePosition","description":"Canvas coordinates for visual layout only. Has no effect on execution. Use `{x: 0, y: 0}` if you don't care about layout."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Parent node id for grouped children. Required cases: (1) trigger nodes (USER_COMMENT_TRIGGER, USER_SENDS_MESSAGE, USER_SHARE_POST, USER_STORY_MENTION) must have the TRIGGER_GROUP's id as parentId. (2) MESSAGE_BUTTON nodes must have their parent message node's id as parentId (the BUTTON_TEXT_MESSAGE / BUTTON_TEXT_IMAGE_MESSAGE / CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE). All other nodes leave this null."},"extent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extent","description":"XYFlow visual constraint. Usually 'parent' when parentId is set. Leave null otherwise; the frontend infers this."},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"XYFlow runtime layout field. Do NOT set when generating new nodes — the editor populates this."},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"measured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Measured","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"type":{"type":"string","const":"CONDITION","title":"Type","default":"CONDITION"},"data":{"$ref":"#/components/schemas/ConditionNodeData"}},"additionalProperties":true,"type":"object","required":["id","position","data"],"title":"ConditionFlowNode","description":"Branches the flow based on contact/event attributes. Has multiple\noutgoing edges keyed by `sourceHandle` (each matching a `source_handle`\nin the `conditions` list). Always include a FAILED catch-all branch."},"ConditionNodeData":{"properties":{"conditions":{"items":{"$ref":"#/components/schemas/ConditionBase"},"type":"array","title":"Conditions","description":"Ordered list of branch rules. Evaluated top-to-bottom; first match wins. Always include a FAILED catch-all as the last rule to handle 'none of the above'."}},"additionalProperties":true,"type":"object","required":["conditions"],"title":"ConditionNodeData","description":"Action: branch the flow based on contact/event attributes. Each entry\nin `conditions` defines one branch with its own `source_handle`; the\nflow takes the first matching branch."},"ConditionType":{"type":"string","enum":["IF_USER_FOLLOWED_ME","IF_BUSINESS_FOLLOWS_USER","VERIFIED_ON_INSTAGRAM","FOLLOWERS_COUNT","CONTACT_EMAIL","CONTACT_PHONE","CONTACT_FIELD"],"title":"ConditionType","description":"What a condition node evaluates against the contact/event.\nIF_USER_FOLLOWED_ME / IF_BUSINESS_FOLLOWS_USER / VERIFIED_ON_INSTAGRAM /\nFOLLOWERS_COUNT are Instagram-only (require Graph API fields not exposed\non Facebook Pages); when the flow targets a Facebook Page they are\nshort-circuited server-side. CONTACT_EMAIL / CONTACT_PHONE work on both\nsurfaces. CONTACT_FIELD evaluates a custom User Field on the contact\n(set `field_key` to the field's slug); comparison semantics follow the\nfield's declared type."},"ContactActivity":{"properties":{"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"link_clicks":{"type":"integer","title":"Link Clicks","default":0},"hits":{"type":"integer","title":"Hits","default":0},"events":{"type":"integer","title":"Events","default":0}},"type":"object","title":"ContactActivity","description":"What the event trackers recorded of a contact: where they were when\nthey last tapped a tracked link (geo-ip of the click), how many tracked\nlinks they tapped, how many times they triggered an automation, and how\nmany events of theirs were tracked."},"ContactActivityPayload":{"properties":{"contact_ids":{"items":{"type":"integer"},"type":"array","maxItems":100,"title":"Contact Ids"}},"type":"object","required":["contact_ids"],"title":"ContactActivityPayload","description":"The contacts to look up, e.g. one page of the dashboard list."},"ContactActivityResponse":{"properties":{"activity":{"additionalProperties":{"$ref":"#/components/schemas/ContactActivity"},"type":"object","title":"Activity"}},"type":"object","required":["activity"],"title":"ContactActivityResponse"},"ContactAutomation":{"properties":{"record_id":{"type":"string","title":"Record Id"},"name":{"type":"string","title":"Name"},"media_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Id"},"category":{"type":"string","title":"Category"},"is_universal":{"type":"boolean","title":"Is Universal","default":false}},"type":"object","required":["record_id","name","category"],"title":"ContactAutomation","description":"The automation or flow a contact came from, as the automations table\nidentifies it."},"ContactBulkTagsPayload":{"properties":{"contact_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array","maxItems":1000,"minItems":1},{"type":"null"}],"title":"Contact Ids"},"query":{"anyOf":[{"$ref":"#/components/schemas/ContactQuerySchema"},{"type":"null"}]},"add":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Add"},"remove":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Remove"}},"type":"object","title":"ContactBulkTagsPayload"},"ContactBulkTagsResponse":{"properties":{"added":{"type":"integer","title":"Added"},"removed":{"type":"integer","title":"Removed"}},"type":"object","required":["added","removed"],"title":"ContactBulkTagsResponse"},"ContactCameFromOption":{"properties":{"record_id":{"type":"string","title":"Record Id"},"name":{"type":"string","title":"Name"},"media_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Id"},"category":{"type":"string","title":"Category"},"is_universal":{"type":"boolean","title":"Is Universal","default":false},"count":{"type":"integer","title":"Count"}},"type":"object","required":["record_id","name","category","count"],"title":"ContactCameFromOption"},"ContactCameFromOptionsResponse":{"properties":{"automations":{"items":{"$ref":"#/components/schemas/ContactCameFromOption"},"type":"array","title":"Automations"}},"type":"object","required":["automations"],"title":"ContactCameFromOptionsResponse"},"ContactCountsResponse":{"properties":{"total":{"type":"integer","title":"Total"},"tabs":{"$ref":"#/components/schemas/ContactTabCounts"}},"type":"object","required":["total","tabs"],"title":"ContactCountsResponse","description":"Sizes for the contacts list's tabs."},"ContactFieldDefinitionCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"type":{"$ref":"#/components/schemas/ContactFieldType","default":"TEXT"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"folder":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Folder","default":"User Fields"}},"type":"object","required":["name"],"title":"ContactFieldDefinitionCreate","description":"Payload for creating a custom User Field (the create-field modal)."},"ContactFieldDefinitionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"type":{"$ref":"#/components/schemas/ContactFieldType"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"folder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","slug","type","created_at","updated_at"],"title":"ContactFieldDefinitionResponse"},"ContactFieldDefinitionUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"folder":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Folder"}},"type":"object","title":"ContactFieldDefinitionUpdate","description":"Payload for updating a User Field. Slug and type are immutable."},"ContactFieldFilter":{"properties":{"slug":{"type":"string","title":"Slug"},"operator":{"type":"string","enum":["any_of","none_of","is_set","not_set"],"title":"Operator","default":"any_of"},"values":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Values"}},"type":"object","required":["slug"],"title":"ContactFieldFilter","description":"One custom field condition of the contacts filter."},"ContactFieldType":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","BOOLEAN","ARRAY"],"title":"ContactFieldType","description":"Data type of a custom contact User Field."},"ContactFieldValuesPayload":{"properties":{"channel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"},"search":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","default":8},"slug":{"type":"string","title":"Slug"}},"type":"object","required":["slug"],"title":"ContactFieldValuesPayload"},"ContactFieldValuesResponse":{"properties":{"values":{"items":{"$ref":"#/components/schemas/ContactValueCount"},"type":"array","title":"Values"}},"type":"object","required":["values"],"title":"ContactFieldValuesResponse"},"ContactLocationFilter":{"properties":{"dimension":{"type":"string","enum":["country","city","postal_code"],"title":"Dimension"},"operator":{"type":"string","enum":["any_of","none_of"],"title":"Operator","default":"any_of"},"values":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Values"}},"type":"object","required":["dimension"],"title":"ContactLocationFilter","description":"One location condition of the contacts filter, on where contacts\ntapped a tracked link from (the clicks' geo-ip)."},"ContactLocationValuesPayload":{"properties":{"channel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"},"search":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","default":8},"dimension":{"type":"string","enum":["country","city","postal_code"],"title":"Dimension"}},"type":"object","required":["dimension"],"title":"ContactLocationValuesPayload"},"ContactOptionsQuery":{"properties":{"channel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"},"search":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","default":8}},"type":"object","title":"ContactOptionsQuery","description":"Which contacts the filter's option lists are drawn from."},"ContactQuerySchema":{"properties":{"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"channel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"},"has_email":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Email"},"has_phone":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Phone"},"tag_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tag Names"},"contact_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Contact Ids"},"tags_match":{"type":"string","enum":["any","all"],"title":"Tags Match","default":"any"},"clicked_link":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Clicked Link"},"field_filters":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactFieldFilter"},"type":"array","maxItems":20},{"type":"null"}],"title":"Field Filters"},"came_from":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":50},{"type":"null"}],"title":"Came From"},"location_filters":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContactLocationFilter"},"type":"array","maxItems":3},{"type":"null"}],"title":"Location Filters"},"interacted_after":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Interacted After"},"interacted_before":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Interacted Before"},"search":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"},"page":{"type":"integer","title":"Page","default":1},"limit":{"type":"integer","title":"Limit","default":10},"automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Automation Id"},"flow_automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Flow Automation Id"},"record_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Record Id"},"new_this_week":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"New This Week"},"created_after":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"},"created_before":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"},"order_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order By"}},"type":"object","title":"ContactQuerySchema"},"ContactSendMessagePayload":{"properties":{"message":{"type":"string","maxLength":1000,"minLength":1,"title":"Message"}},"type":"object","required":["message"],"title":"ContactSendMessagePayload"},"ContactSendMessageResponse":{"properties":{"message_id":{"type":"string","title":"Message Id"}},"type":"object","required":["message_id"],"title":"ContactSendMessageResponse"},"ContactTabCounts":{"properties":{"all":{"type":"integer","title":"All"},"has_email":{"type":"integer","title":"Has Email"},"has_phone":{"type":"integer","title":"Has Phone"},"new_this_week":{"type":"integer","title":"New This Week"}},"type":"object","required":["all","has_email","has_phone","new_this_week"],"title":"ContactTabCounts","description":"Contacts per tab of the dashboard list."},"ContactTimelineEvent":{"properties":{"type":{"type":"string","title":"Type"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"automation":{"$ref":"#/components/schemas/ContactAutomation"}},"type":"object","required":["type","created_at","automation"],"title":"ContactTimelineEvent","description":"One tracked event of a contact."},"ContactTimelineResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/ContactTimelineEvent"},"type":"array","title":"Events"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["events","has_more"],"title":"ContactTimelineResponse"},"ContactUpdatePayload":{"properties":{"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Email"},"phone_number":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Phone Number"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":50},{"type":"null"}],"title":"Tags"},"fields":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","maxProperties":50},{"type":"null"}],"title":"Fields"}},"additionalProperties":false,"type":"object","title":"ContactUpdatePayload","description":"What the dashboard's contact drawer edits. Only the keys sent are\nchanged; an empty email or phone clears it, a null field value clears\nthat field. Platform-synced data (name, username, picture) is not\nwritable."},"ContactUpdateResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"fields":{"additionalProperties":{"type":"string"},"type":"object","title":"Fields"}},"type":"object","required":["id","tags","fields"],"title":"ContactUpdateResponse","description":"The edited contact's writable data after the update."},"ContactValueCount":{"properties":{"value":{"type":"string","title":"Value"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["value","count"],"title":"ContactValueCount"},"ContactsDeletePayload":{"properties":{"contact_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array","maxItems":1000,"minItems":1},{"type":"null"}],"title":"Contact Ids"},"query":{"anyOf":[{"$ref":"#/components/schemas/ContactQuerySchema"},{"type":"null"}]}},"type":"object","title":"ContactsDeletePayload"},"ContactsDeleteResponse":{"properties":{"deleted":{"type":"integer","title":"Deleted"}},"type":"object","required":["deleted"],"title":"ContactsDeleteResponse"},"ConversationStarterPayload":{"properties":{"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"is_active":{"type":"boolean","title":"Is Active","default":true},"icebreakers":{"items":{"$ref":"#/components/schemas/IcebreakerPayload"},"type":"array","title":"Icebreakers"}},"type":"object","required":["icebreakers"],"title":"ConversationStarterPayload"},"CopyAutomationPayload":{"properties":{"source_automation_id":{"type":"integer","title":"Source Automation Id"},"target_channel_id":{"type":"string","title":"Target Channel Id"}},"type":"object","required":["source_automation_id","target_channel_id"],"title":"CopyAutomationPayload"},"CopyAutomationResponse":{"properties":{"id":{"type":"integer","title":"Id"},"removed_features":{"items":{"$ref":"#/components/schemas/RemovedFeature"},"type":"array","title":"Removed Features","default":[]},"media_unbound":{"type":"boolean","title":"Media Unbound","default":false},"attachment_unbound":{"type":"boolean","title":"Attachment Unbound","default":false}},"type":"object","required":["id"],"title":"CopyAutomationResponse"},"CopyConversationStarterPayload":{"properties":{"source_conversation_starter_id":{"type":"integer","title":"Source Conversation Starter Id"},"target_channel_id":{"type":"string","title":"Target Channel Id"}},"type":"object","required":["source_conversation_starter_id","target_channel_id"],"title":"CopyConversationStarterPayload"},"CopyConversationStarterResponse":{"properties":{"id":{"type":"integer","title":"Id"},"connections_reset":{"type":"integer","title":"Connections Reset","default":0}},"type":"object","required":["id"],"title":"CopyConversationStarterResponse"},"CopyFlowAutomationPayload":{"properties":{"source_flow_automation_id":{"type":"integer","title":"Source Flow Automation Id"},"target_channel_id":{"type":"string","title":"Target Channel Id"}},"type":"object","required":["source_flow_automation_id","target_channel_id"],"title":"CopyFlowAutomationPayload"},"CopyFlowAutomationResponse":{"properties":{"id":{"type":"integer","title":"Id"},"media_unbound":{"type":"boolean","title":"Media Unbound","default":false},"payment_reset":{"type":"boolean","title":"Payment Reset","default":false},"attachment_rebound":{"type":"boolean","title":"Attachment Rebound","default":false}},"type":"object","required":["id"],"title":"CopyFlowAutomationResponse"},"CountResponse":{"properties":{"count":{"type":"integer","title":"Count"}},"type":"object","required":["count"],"title":"CountResponse","description":"Single integer count. Used by all 9 count endpoints."},"CountryResponse":{"properties":{"iso_code":{"type":"string","title":"Iso Code"},"name":{"type":"string","title":"Name"}},"type":"object","required":["iso_code","name"],"title":"CountryResponse","description":"Stub schema."},"CountryStatSchema":{"properties":{"country_code":{"type":"string","title":"Country Code"},"country_name":{"type":"string","title":"Country Name"},"count":{"type":"integer","title":"Count"},"pct":{"type":"number","title":"Pct"}},"type":"object","required":["country_code","country_name","count","pct"],"title":"CountryStatSchema"},"CreateBabylovegrowthBlogPayload":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"integer"}],"title":"Id"},"title":{"type":"string","title":"Title"},"metaDescription":{"type":"string","title":"Metadescription"},"slug":{"type":"string","title":"Slug"},"languageCode":{"type":"string","title":"Languagecode"},"content_html":{"type":"string","title":"Content Html"},"content_markdown":{"type":"string","title":"Content Markdown"},"heroImageUrl":{"type":"string","title":"Heroimageurl"}},"type":"object","required":["id","title","metaDescription","slug","languageCode","content_html","content_markdown","heroImageUrl"],"title":"CreateBabylovegrowthBlogPayload"},"CreateBlogPayload":{"properties":{"title":{"type":"string","title":"Title"},"meta_description":{"type":"string","title":"Meta Description"},"slug":{"type":"string","title":"Slug"},"language_code":{"type":"string","title":"Language Code"},"content_html":{"type":"string","title":"Content Html"},"content_markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Markdown"},"hero_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hero Image Url"},"written_by":{"type":"string","title":"Written By"},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_draft":{"type":"boolean","title":"Is Draft","default":false},"related_blog_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Related Blog Ids"}},"type":"object","required":["title","meta_description","slug","language_code","content_html","written_by"],"title":"CreateBlogPayload"},"CreateInboxAutomationPayload":{"properties":{"name":{"type":"string","title":"Name"},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"messages_tree":{"$ref":"#/components/schemas/InboxAutomationMessageNode"},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_deleted":{"type":"boolean","title":"Is Deleted","default":false},"is_universal":{"type":"boolean","title":"Is Universal","default":false},"automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Automation Id"},"keyword_trigger_type":{"$ref":"#/components/schemas/InboxAutomationKeywordTriggerType","default":"EXACT_MATCH"},"media_source":{"$ref":"#/components/schemas/MediaSource","default":"INSTAGRAM"}},"type":"object","required":["name","messages_tree"],"title":"CreateInboxAutomationPayload"},"CreateReferralPayoutPayload":{"properties":{"user_id":{"type":"integer","title":"User Id"},"amount_minor":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount Minor"},"currency":{"$ref":"#/components/schemas/CurrencyEnum"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["user_id","amount_minor","currency"],"title":"CreateReferralPayoutPayload","description":"Record a payout disbursed to an affiliate."},"CreateUserPayload":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"picture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Picture"},"instagram_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Account Id"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"creator_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Creator Types"},"auth_provider":{"type":"string","title":"Auth Provider"}},"type":"object","required":["auth_provider"],"title":"CreateUserPayload","description":"Create User Payload."},"CurrencyEnum":{"type":"string","enum":["INR","USD"],"title":"CurrencyEnum","description":"ISO 4217 currencies used across the money tables.\n\nShared by payment_ledger and affiliate_payout. str-Enum so the member value\n(\"INR\"/\"USD\") compares equal to a plain string everywhere downstream."},"CurrentSubscriptionResponse":{"properties":{"require_subscription":{"type":"boolean","title":"Require Subscription","default":false},"subscription_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subscription Id"},"status":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionStatus"},{"type":"null"}]},"lemon_squeezy_subscription_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lemon Squeezy Subscription Id"},"razorpay_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Razorpay Subscription Id"},"razorpay_payment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Razorpay Payment Id"},"dodo_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dodo Subscription Id"},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"},"variant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant Name"},"lemon_squeezy_variant_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lemon Squeezy Variant Id"},"lemon_squeezy_product_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lemon Squeezy Product Id"},"free_automation_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Free Automation Limit"},"free_contact_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Free Contact Limit"},"used_contacts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Used Contacts"},"used_limt":{"type":"boolean","title":"Used Limt","default":false},"use_watermark":{"type":"boolean","title":"Use Watermark","default":true},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At"},"used_retention_offers":{"items":{"type":"string"},"type":"array","title":"Used Retention Offers","default":[]},"has_cancelled_before":{"type":"boolean","title":"Has Cancelled Before","default":false},"agency_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agency Id"},"has_payments":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Payments","default":false},"previous_subscription_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Previous Subscription Id"}},"type":"object","title":"CurrentSubscriptionResponse"},"CustomNodeType":{"type":"string","enum":["TRIGGER_GROUP","USER_COMMENT_TRIGGER","PLAIN_TEXT_MESSAGE","DELAY","CONDITION","BUTTON_TEXT_MESSAGE","BUTTON_TEXT_IMAGE_MESSAGE","CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE","MESSAGE_BUTTON","MESSAGE_GROUP","USER_SENDS_MESSAGE","USER_SHARE_POST","USER_STORY_MENTION","COLLECT_USER_INFO","ACTION","COLLECT_PAYMENT","ATTACHMENT_MESSAGE","RANDOMIZER"],"title":"CustomNodeType","description":"Custom node types in the flow."},"CustomerPortalResponse":{"properties":{"customer_portal_url":{"type":"string","title":"Customer Portal Url"}},"type":"object","required":["customer_portal_url"],"title":"CustomerPortalResponse","description":"Gateway-agnostic customer portal / manage-subscription URL."},"DailyActivitySchema":{"properties":{"labels":{"items":{"type":"string"},"type":"array","title":"Labels"},"hits":{"items":{"type":"integer"},"type":"array","title":"Hits"},"clicks":{"items":{"type":"integer"},"type":"array","title":"Clicks"}},"type":"object","required":["labels","hits","clicks"],"title":"DailyActivitySchema","description":"Aligned last-7-day series; all three lists share the same index/day."},"DataItemCollectedPayload":{"properties":{"inbox_automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Inbox Automation Id"},"flow_automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Flow Automation Id"},"recipient_id":{"type":"integer","title":"Recipient Id"}},"type":"object","required":["recipient_id"],"title":"DataItemCollectedPayload"},"DateGraphSchema":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count"}},"type":"object","required":["date"],"title":"DateGraphSchema"},"DelayFlowNode":{"properties":{"id":{"type":"string","title":"Id","description":"Unique node id within the flow. Use a UUID string (e.g. 'a7f3...'). Edges reference nodes by this id, so it must be stable once created.","examples":["b3c1f4a2-5d7e-4a9b-9c8d-1f2e3a4b5c6d"]},"position":{"$ref":"#/components/schemas/NodePosition","description":"Canvas coordinates for visual layout only. Has no effect on execution. Use `{x: 0, y: 0}` if you don't care about layout."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Parent node id for grouped children. Required cases: (1) trigger nodes (USER_COMMENT_TRIGGER, USER_SENDS_MESSAGE, USER_SHARE_POST, USER_STORY_MENTION) must have the TRIGGER_GROUP's id as parentId. (2) MESSAGE_BUTTON nodes must have their parent message node's id as parentId (the BUTTON_TEXT_MESSAGE / BUTTON_TEXT_IMAGE_MESSAGE / CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE). All other nodes leave this null."},"extent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extent","description":"XYFlow visual constraint. Usually 'parent' when parentId is set. Leave null otherwise; the frontend infers this."},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"XYFlow runtime layout field. Do NOT set when generating new nodes — the editor populates this."},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"measured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Measured","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"type":{"type":"string","const":"DELAY","title":"Type","default":"DELAY"},"data":{"$ref":"#/components/schemas/DelayNodeData"}},"additionalProperties":true,"type":"object","required":["id","position","data"],"title":"DelayFlowNode","description":"Pauses the flow for a fixed duration before continuing. Useful to\navoid spamming the user and to make the bot feel more human."},"DelayNodeData":{"properties":{"delay_duration":{"type":"integer","minimum":1.0,"title":"Delay Duration","description":"How long to wait (positive integer).","examples":[5,30,2]},"delay_unit":{"$ref":"#/components/schemas/DelayUnit","description":"Unit for `delay_duration`.","examples":["SECONDS","MINUTES"]}},"additionalProperties":true,"type":"object","required":["delay_duration","delay_unit"],"title":"DelayNodeData","description":"Action: pause the flow for `delay_duration` `delay_unit`s before\ncontinuing to the next node. Use to space out messages so the bot\ndoesn't feel spammy."},"DelayUnit":{"type":"string","enum":["SECONDS","MINUTES","HOURS","DAYS"],"title":"DelayUnit","description":"Unit a user entered a wait duration in.\n\nShared by the legacy automation step delays (`StepDelay.delay_unit`) and\nthe flow builder's DELAY node / comment auto-reply delay. The backend\nalways schedules with the canonical seconds value; this is what the UI\nround-trips so the editor can show the delay the way it was typed."},"DeleteAttachmentResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"id":{"type":"integer","title":"Id"}},"type":"object","required":["id"],"title":"DeleteAttachmentResponse"},"DeleteContactActionItem":{"properties":{"type":{"type":"string","const":"DELETE_CONTACT","title":"Type","default":"DELETE_CONTACT"},"data":{"$ref":"#/components/schemas/EmptyActionData"}},"type":"object","title":"DeleteContactActionItem","description":"Delete the contact record (use with care)."},"DeleteContactFieldFolderResponse":{"properties":{"folder":{"type":"string","title":"Folder"},"deleted_count":{"type":"integer","title":"Deleted Count"},"deleted_slugs":{"items":{"type":"string"},"type":"array","title":"Deleted Slugs"}},"type":"object","required":["folder","deleted_count","deleted_slugs"],"title":"DeleteContactFieldFolderResponse","description":"Result of deleting a folder and every User Field filed under it."},"DeletePromoCodeResponse":{"properties":{"code":{"type":"string","title":"Code"},"deleted":{"type":"boolean","title":"Deleted"},"dodo_discount_deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dodo Discount Deleted"},"lemon_squeezy_discount_deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Lemon Squeezy Discount Deleted"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["code","deleted"],"title":"DeletePromoCodeResponse","description":"What became of a code and of its discounts at each provider.\n\nThe provider flags are reported rather than raised on: a code can be gone\nlocally while a provider delete failed, and the admin needs to know which\nso it can be cleared by hand."},"DeleteTempEventTrackersResponse":{"properties":{"deleted":{"type":"integer","title":"Deleted"},"days_ago":{"type":"integer","title":"Days Ago"}},"type":"object","required":["deleted","days_ago"],"title":"DeleteTempEventTrackersResponse"},"DeliverEventPayload":{"properties":{"contact_event_id":{"type":"integer","title":"Contact Event Id"},"subscription_id":{"type":"integer","title":"Subscription Id"}},"type":"object","required":["contact_event_id","subscription_id"],"title":"DeliverEventPayload"},"DeliverEventResponse":{"properties":{"delivered":{"type":"boolean","title":"Delivered"}},"type":"object","required":["delivered"],"title":"DeliverEventResponse"},"DispatchEventPayload":{"properties":{"contact_event_id":{"type":"integer","title":"Contact Event Id"}},"type":"object","required":["contact_event_id"],"title":"DispatchEventPayload"},"DispatchEventResponse":{"properties":{"queued":{"type":"integer","title":"Queued"}},"type":"object","required":["queued"],"title":"DispatchEventResponse"},"DmVariationPayload":{"properties":{"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/app__api__v1__automation__schemas__AutomationType"},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"media_type":{"anyOf":[{"$ref":"#/components/schemas/MediaType"},{"type":"null"}]},"media_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Url"},"media_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Id"},"keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keywords"},"dm_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dm Message"},"attachment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attachment Id"},"disable_auto_reply":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Auto Reply","default":false},"auto_reply_messages":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Auto Reply Messages"},"auto_reply_mode":{"anyOf":[{"$ref":"#/components/schemas/AutoReplyMode"},{"type":"null"}],"default":"MANUAL"},"auto_reply_ai_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auto Reply Ai Prompt"},"auto_reply_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Auto Reply Limit"},"product_links":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProductLink"},"type":"array"},{"type":"null"}],"title":"Product Links"},"addition_buttons":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdditionButtonSchema"},"type":"array"},{"type":"null"}],"title":"Addition Buttons"},"dm_quick_replies":{"anyOf":[{"items":{"$ref":"#/components/schemas/QuickReplySchema"},"type":"array"},{"type":"null"}],"title":"Dm Quick Replies"},"ask_to_follow":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ask To Follow"},"extra_data":{"anyOf":[{"$ref":"#/components/schemas/AutomationExtraData"},{"type":"null"}]},"step_delays":{"anyOf":[{"$ref":"#/components/schemas/AutomationStepDelays"},{"type":"null"}]},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_draft":{"type":"boolean","title":"Is Draft","default":false},"is_story":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Story","default":false},"is_universal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Universal","default":false},"trigger_type":{"anyOf":[{"$ref":"#/components/schemas/AutomationTriggerType"},{"type":"null"}]},"disable_url_tracking":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Url Tracking"},"disable_dm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Dm","default":false},"one_dm_per_user":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"One Dm Per User","default":false},"one_dm_per_user_window_hours":{"anyOf":[{"type":"integer","maximum":168.0,"minimum":1.0},{"type":"null"}],"title":"One Dm Per User Window Hours"},"share_media_for_dm":{"type":"boolean","title":"Share Media For Dm","default":false},"enable_opener_message":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enable Opener Message"},"keyword_trigger_type":{"anyOf":[{"$ref":"#/components/schemas/AutomationKeywordTriggerType"},{"type":"null"}],"default":"EXACT_MATCH"},"media_source":{"anyOf":[{"$ref":"#/components/schemas/MediaSource"},{"type":"null"}],"default":"INSTAGRAM"},"trigger_ai_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger Ai Prompt"},"use_next_post":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Next Post","default":false},"use_next_story":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Next Story","default":false},"use_rewind":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Rewind","default":false},"follow_up_messages":{"anyOf":[{"items":{"$ref":"#/components/schemas/FollowUpMessageSchema"},"type":"array"},{"type":"null"}],"title":"Follow Up Messages"},"collect_info_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/CollectInfoItem"},"type":"array"},{"type":"null"}],"title":"Collect Info Items"},"dm_variations":{"anyOf":[{"items":{"$ref":"#/components/schemas/AutomationDmVariationSchema"},"type":"array"},{"type":"null"}],"title":"Dm Variations"},"count":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Count","default":3}},"type":"object","required":["name","type"],"title":"DmVariationPayload","description":"A draft automation payload plus how many variations to generate.\n\nAccepts every automation type; the service decides what to generate\nfrom `type` and the content that is actually present, and returns\nnull (never a validation error) when there is nothing to vary."},"EmailToAllUsersPayload":{"properties":{"subject":{"type":"string","title":"Subject"},"html_body":{"type":"string","title":"Html Body"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"template_id":{"type":"string","title":"Template Id"},"send_at_most":{"type":"integer","title":"Send At Most"},"user_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"User Ids"},"agency_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agency User Id"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"has_active_subscription":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Active Subscription"},"exclude_india_users":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exclude India Users"}},"type":"object","title":"EmailToAllUsersPayload"},"EmailToListPayload":{"properties":{"subject":{"type":"string","title":"Subject"},"html_body":{"type":"string","title":"Html Body"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"template_id":{"type":"string","title":"Template Id"},"send_at_most":{"type":"integer","title":"Send At Most"},"emails":{"items":{"$ref":"#/components/schemas/ToEmail"},"type":"array","title":"Emails"}},"type":"object","required":["emails"],"title":"EmailToListPayload"},"EmailToUserPayload":{"properties":{"subject":{"type":"string","title":"Subject"},"html_body":{"type":"string","title":"Html Body"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"template_id":{"type":"string","title":"Template Id"},"send_at_most":{"type":"integer","title":"Send At Most"},"user_id":{"type":"integer","title":"User Id"}},"type":"object","required":["user_id"],"title":"EmailToUserPayload"},"EmptyActionData":{"properties":{},"type":"object","title":"EmptyActionData","description":"No config — use `{}`."},"EvaluateCommentForAbusePayload":{"properties":{"comment":{"type":"string","title":"Comment"}},"type":"object","required":["comment"],"title":"EvaluateCommentForAbusePayload"},"EvaluateCommentForAbuseResponse":{"properties":{"classification":{"$ref":"#/components/schemas/AbuseClassification"},"confidence":{"type":"number","title":"Confidence"}},"type":"object","required":["classification","confidence"],"title":"EvaluateCommentForAbuseResponse"},"EvaluateCommentPayload":{"properties":{"comment":{"type":"string","minLength":1,"title":"Comment"},"prompt":{"type":"string","minLength":1,"title":"Prompt"}},"type":"object","required":["comment","prompt"],"title":"EvaluateCommentPayload"},"EvaluateCommentResponse":{"properties":{"matched":{"type":"boolean","title":"Matched"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"probabilities":{"additionalProperties":{"type":"number"},"type":"object","title":"Probabilities","default":{}}},"type":"object","required":["matched"],"title":"EvaluateCommentResponse"},"EventPayload":{"properties":{"type":{"$ref":"#/components/schemas/EventType"},"source":{"$ref":"#/components/schemas/SourceType"},"automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Automation Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"extra_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Data"}},"type":"object","required":["type","source"],"title":"EventPayload"},"EventSummaryResponseSchema":{"properties":{"count":{"type":"integer","title":"Count"},"graph_data":{"items":{"$ref":"#/components/schemas/DateGraphSchema"},"type":"array","title":"Graph Data"}},"type":"object","required":["count","graph_data"],"title":"EventSummaryResponseSchema"},"EventTrackerFilterPayload":{"properties":{"page":{"type":"integer","title":"Page","default":1},"limit":{"type":"integer","title":"Limit","default":10},"automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Automation Id"},"source":{"anyOf":[{"$ref":"#/components/schemas/SourceType"},{"type":"null"}]},"type":{"anyOf":[{"$ref":"#/components/schemas/EventType"},{"type":"null"}]},"created_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By User Id"}},"type":"object","title":"EventTrackerFilterPayload"},"EventType":{"type":"string","enum":["COMMENT_RECEIVED","AUTOMATION_EXIST","AUTOMATION_NOT_FOUND","AUTODM_KEYWORD_FOUND","AUTODM_KEYWORD_NOT_FOUND","AUTODM_COMMENT_REPLIED","AUTO_DM_COMMENT_REPLY_FAILED","AUTODM_DM_SENT","AUTODM_DM_NOT_SENT","URL_CLICKED","AUTODM_SEND_FOLLOW_REQUEST","AUTODM_LIMIT_REACHED","AUTODM_SEND_OPENER_MESSAGE","AUTODM_SEND_FOLLOW_UP_MESSAGE","SEEN_MESSAGE"],"title":"EventType","description":"Enum for event type."},"ExternalApiRequestActionItem":{"properties":{"type":{"type":"string","const":"EXTERNAL_API_REQUEST","title":"Type","default":"EXTERNAL_API_REQUEST"},"data":{"$ref":"#/components/schemas/ExternalApiRequestConfig"}},"type":"object","required":["data"],"title":"ExternalApiRequestActionItem","description":"HTTP request to a third-party endpoint (webhook / CRM / Zapier)."},"ExternalApiRequestConfig":{"properties":{"url":{"type":"string","title":"Url","description":"Target URL. Must be HTTPS in production.","examples":["https://hooks.zapier.com/hooks/catch/12345/abcde"]},"method":{"$ref":"#/components/schemas/HttpMethod","description":"HTTP method. POST for webhooks; GET for simple pings.","default":"POST"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Optional request headers. Add `Authorization` here for bearer tokens.","examples":[{"Authorization":"Bearer xyz","Content-Type":"application/json"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body","description":"Raw request body (JSON string or text). Supports template variables: `{{email}}`, `{{phone}}`, `{{username}}`, `{{instagram_user_id}}`.","examples":["{\"email\": \"{{email}}\", \"source\": \"instagram\"}"]},"pass_email":{"type":"boolean","title":"Pass Email","description":"If True, also append the contact's email as a query/body param automatically.","default":false},"pass_phone":{"type":"boolean","title":"Pass Phone","description":"Auto-pass the contact's phone number.","default":false},"pass_username":{"type":"boolean","title":"Pass Username","description":"Auto-pass the contact's IG/FB username.","default":false},"pass_instagram_user_id":{"type":"boolean","title":"Pass Instagram User Id","description":"Auto-pass the contact's Instagram-scoped user id (IGSID).","default":false},"response_mappings":{"anyOf":[{"items":{"$ref":"#/components/schemas/ResponseMappingItem"},"type":"array"},{"type":"null"}],"title":"Response Mappings","description":"Optional mappings that save values from the JSON response into custom User Fields on the contact (e.g. store the CRM id the endpoint returns). Each entry: {json_path, field_key}."}},"type":"object","required":["url"],"title":"ExternalApiRequestConfig","description":"Config for an EXTERNAL_API_REQUEST action — fires an HTTP request\nto a third-party endpoint with optional contact data. Used to hand off\nleads to CRMs, send Slack pings, trigger Zapier webhooks, etc."},"FacebookAccessTokenPayload":{"properties":{"type":{"$ref":"#/components/schemas/TokenType"},"access_token":{"type":"string","title":"Access Token"},"account_id":{"type":"string","title":"Account Id"}},"type":"object","required":["type","access_token","account_id"],"title":"FacebookAccessTokenPayload"},"FacebookAccessTokenResponse":{"properties":{"type":{"$ref":"#/components/schemas/TokenType"},"account_id":{"type":"string","title":"Account Id"},"name":{"type":"string","title":"Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"profile_picture_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Picture Url"},"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"},"has_missing_permissions":{"type":"boolean","title":"Has Missing Permissions","default":false}},"type":"object","required":["type","account_id","name"],"title":"FacebookAccessTokenResponse"},"FacebookAccountPayload":{"properties":{"type":{"$ref":"#/components/schemas/AccountType"},"account_id":{"type":"string","title":"Account Id"},"name":{"type":"string","title":"Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"profile_picture_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Picture Url"},"followers_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Followers Count"}},"type":"object","required":["type","account_id","name"],"title":"FacebookAccountPayload"},"FacebookCommentReplyPayload":{"properties":{"from_account_id":{"type":"string","title":"From Account Id"},"comment_id":{"type":"string","title":"Comment Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["from_account_id","comment_id","message"],"title":"FacebookCommentReplyPayload"},"FacebookOauthSuccessPayload":{"properties":{"code":{"type":"string","title":"Code"},"redirect_uri":{"type":"string","title":"Redirect Uri"}},"type":"object","required":["code","redirect_uri"],"title":"FacebookOauthSuccessPayload"},"FacebookPageOauthSuccessResponse":{"properties":{"firebase_uid":{"type":"string","title":"Firebase Uid"},"custom_token":{"type":"string","title":"Custom Token"}},"type":"object","required":["firebase_uid","custom_token"],"title":"FacebookPageOauthSuccessResponse"},"FacebookSendMessagePayload":{"properties":{"from_account_id":{"type":"string","title":"From Account Id"},"recipient_id":{"type":"string","title":"Recipient Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["from_account_id","recipient_id","message"],"title":"FacebookSendMessagePayload"},"FacebookSendPrivateReplyPayload":{"properties":{"from_account_id":{"type":"string","title":"From Account Id"},"comment_id":{"type":"string","title":"Comment Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["from_account_id","comment_id","message"],"title":"FacebookSendPrivateReplyPayload"},"FacebookValidAccessTokenResponse":{"properties":{"has_valid_user_access_token":{"type":"boolean","title":"Has Valid User Access Token"},"has_valid_page_access_token":{"type":"boolean","title":"Has Valid Page Access Token"},"has_missing_user_permissions":{"type":"boolean","title":"Has Missing User Permissions","default":false},"page_access_tokens":{"anyOf":[{"items":{"$ref":"#/components/schemas/FacebookAccessTokenResponse"},"type":"array"},{"type":"null"}],"title":"Page Access Tokens"},"user_access_tokens":{"anyOf":[{"items":{"$ref":"#/components/schemas/FacebookAccessTokenResponse"},"type":"array"},{"type":"null"}],"title":"User Access Tokens"}},"type":"object","required":["has_valid_user_access_token","has_valid_page_access_token"],"title":"FacebookValidAccessTokenResponse"},"FacebookWebhookEntryPayload":{"properties":{"object":{"type":"string","enum":["instagram","page"],"title":"Object"},"entry":{"additionalProperties":true,"type":"object","title":"Entry"}},"type":"object","required":["object","entry"],"title":"FacebookWebhookEntryPayload","description":"One `entry` of a Facebook webhook payload with the Meta object it came under."},"FeatureCost":{"properties":{"feature":{"type":"string","title":"Feature"},"estimated_cost_usd_all_time":{"type":"number","title":"Estimated Cost Usd All Time"},"estimated_cost_usd_this_month":{"type":"number","title":"Estimated Cost Usd This Month"}},"type":"object","required":["feature","estimated_cost_usd_all_time","estimated_cost_usd_this_month"],"title":"FeatureCost"},"FlowAnalyticsKpisSchema":{"properties":{"total_triggers":{"$ref":"#/components/schemas/KpiMetricSchema"},"dm_rate":{"$ref":"#/components/schemas/KpiMetricSchema"},"click_rate":{"$ref":"#/components/schemas/KpiMetricSchema"},"people_reached":{"$ref":"#/components/schemas/KpiMetricSchema"}},"type":"object","required":["total_triggers","dm_rate","click_rate","people_reached"],"title":"FlowAnalyticsKpisSchema","description":"KPI cards for a single flow automation.\n\n- `total_triggers`: FLOW_TRIGGER_FOUND events.\n- `dm_rate`: DMs sent / triggers, as a percentage. Below 100% means\n  executions dropped out before reaching a message node (conditions,\n  failures, or the person never replied to a waiting step).\n- `click_rate`: clicks / DMs sent, as a percentage.\n- `people_reached`: distinct `from_user_id` that triggered the flow.\n  Momentum is computed from distinct counts inside each 7-day window,\n  so it is not the sum of daily distincts."},"FlowAutomationAnalyticsResponseSchema":{"properties":{"kpis":{"$ref":"#/components/schemas/FlowAnalyticsKpisSchema"},"funnel":{"$ref":"#/components/schemas/FunnelSchema"},"daily_activity":{"$ref":"#/components/schemas/DailyActivitySchema"},"clicks_by_country":{"$ref":"#/components/schemas/ClicksByCountrySchema"}},"type":"object","required":["kpis","funnel","daily_activity","clicks_by_country"],"title":"FlowAutomationAnalyticsResponseSchema","description":"Consolidated analytics payload for one flow automation.\n\n`daily_activity` keeps the `hits`/`clicks` field names of the normal\nanalytics response so the chart component is shared — `hits` carries\ntrigger counts here."},"FlowAutomationCreatePayload":{"properties":{"is_active":{"type":"boolean","title":"Is Active","default":true},"is_deleted":{"type":"boolean","title":"Is Deleted","default":false},"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"is_draft":{"type":"boolean","title":"Is Draft","default":false},"nodes":{"items":{"oneOf":[{"$ref":"#/components/schemas/TriggerGroupFlowNode"},{"$ref":"#/components/schemas/UserCommentTriggerFlowNode"},{"$ref":"#/components/schemas/UserSendsMessageTriggerFlowNode"},{"$ref":"#/components/schemas/UserSharePostTriggerFlowNode"},{"$ref":"#/components/schemas/UserStoryMentionTriggerFlowNode"},{"$ref":"#/components/schemas/PlainTextMessageFlowNode"},{"$ref":"#/components/schemas/ButtonTextMessageFlowNode"},{"$ref":"#/components/schemas/ButtonTextImageMessageFlowNode"},{"$ref":"#/components/schemas/CarouselButtonTextImageMessageFlowNode"},{"$ref":"#/components/schemas/AttachmentMessageFlowNode"},{"$ref":"#/components/schemas/MessageGroupFlowNode"},{"$ref":"#/components/schemas/MessageButtonFlowNode"},{"$ref":"#/components/schemas/DelayFlowNode"},{"$ref":"#/components/schemas/ConditionFlowNode"},{"$ref":"#/components/schemas/CollectUserInfoFlowNode"},{"$ref":"#/components/schemas/ActionFlowNode"},{"$ref":"#/components/schemas/CollectPaymentFlowNode"},{"$ref":"#/components/schemas/RandomizerFlowNode"}],"discriminator":{"propertyName":"type","mapping":{"ACTION":"#/components/schemas/ActionFlowNode","ATTACHMENT_MESSAGE":"#/components/schemas/AttachmentMessageFlowNode","BUTTON_TEXT_IMAGE_MESSAGE":"#/components/schemas/ButtonTextImageMessageFlowNode","BUTTON_TEXT_MESSAGE":"#/components/schemas/ButtonTextMessageFlowNode","CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE":"#/components/schemas/CarouselButtonTextImageMessageFlowNode","COLLECT_PAYMENT":"#/components/schemas/CollectPaymentFlowNode","COLLECT_USER_INFO":"#/components/schemas/CollectUserInfoFlowNode","CONDITION":"#/components/schemas/ConditionFlowNode","DELAY":"#/components/schemas/DelayFlowNode","MESSAGE_BUTTON":"#/components/schemas/MessageButtonFlowNode","MESSAGE_GROUP":"#/components/schemas/MessageGroupFlowNode","PLAIN_TEXT_MESSAGE":"#/components/schemas/PlainTextMessageFlowNode","RANDOMIZER":"#/components/schemas/RandomizerFlowNode","TRIGGER_GROUP":"#/components/schemas/TriggerGroupFlowNode","USER_COMMENT_TRIGGER":"#/components/schemas/UserCommentTriggerFlowNode","USER_SENDS_MESSAGE":"#/components/schemas/UserSendsMessageTriggerFlowNode","USER_SHARE_POST":"#/components/schemas/UserSharePostTriggerFlowNode","USER_STORY_MENTION":"#/components/schemas/UserStoryMentionTriggerFlowNode"}}},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/FlowEdge"},"type":"array","title":"Edges"},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"media_source":{"$ref":"#/components/schemas/MediaSource","default":"INSTAGRAM"}},"type":"object","title":"FlowAutomationCreatePayload","description":"Payload for creating a new flow automation."},"FlowAutomationRenamePayload":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"FlowAutomationRenamePayload","description":"Payload for renaming a flow automation."},"FlowAutomationResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"is_draft":{"type":"boolean","title":"Is Draft","default":false},"is_active":{"type":"boolean","title":"Is Active","default":true},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"media_source":{"$ref":"#/components/schemas/MediaSource","default":"INSTAGRAM"},"root_node_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Root Node Id"},"nodes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Nodes"},"edges":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Edges"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"created_by_user_id":{"type":"integer","title":"Created By User Id"},"updated_by_user_id":{"type":"integer","title":"Updated By User Id"}},"type":"object","required":["id","name","nodes","edges","created_at","updated_at","created_by_user_id","updated_by_user_id"],"title":"FlowAutomationResponse","description":"Response schema for a flow automation."},"FlowAutomationStatsPayload":{"properties":{"flow_automation_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Flow Automation Ids"}},"type":"object","title":"FlowAutomationStatsPayload","description":"Payload for getting flow automation stats."},"FlowAutomationTogglePayload":{"properties":{"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["is_active"],"title":"FlowAutomationTogglePayload","description":"Payload for toggling flow automation active status."},"FlowAutomationUpdatePayload":{"properties":{"is_active":{"type":"boolean","title":"Is Active","default":true},"is_deleted":{"type":"boolean","title":"Is Deleted","default":false},"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"is_draft":{"type":"boolean","title":"Is Draft","default":false},"nodes":{"items":{"oneOf":[{"$ref":"#/components/schemas/TriggerGroupFlowNode"},{"$ref":"#/components/schemas/UserCommentTriggerFlowNode"},{"$ref":"#/components/schemas/UserSendsMessageTriggerFlowNode"},{"$ref":"#/components/schemas/UserSharePostTriggerFlowNode"},{"$ref":"#/components/schemas/UserStoryMentionTriggerFlowNode"},{"$ref":"#/components/schemas/PlainTextMessageFlowNode"},{"$ref":"#/components/schemas/ButtonTextMessageFlowNode"},{"$ref":"#/components/schemas/ButtonTextImageMessageFlowNode"},{"$ref":"#/components/schemas/CarouselButtonTextImageMessageFlowNode"},{"$ref":"#/components/schemas/AttachmentMessageFlowNode"},{"$ref":"#/components/schemas/MessageGroupFlowNode"},{"$ref":"#/components/schemas/MessageButtonFlowNode"},{"$ref":"#/components/schemas/DelayFlowNode"},{"$ref":"#/components/schemas/ConditionFlowNode"},{"$ref":"#/components/schemas/CollectUserInfoFlowNode"},{"$ref":"#/components/schemas/ActionFlowNode"},{"$ref":"#/components/schemas/CollectPaymentFlowNode"},{"$ref":"#/components/schemas/RandomizerFlowNode"}],"discriminator":{"propertyName":"type","mapping":{"ACTION":"#/components/schemas/ActionFlowNode","ATTACHMENT_MESSAGE":"#/components/schemas/AttachmentMessageFlowNode","BUTTON_TEXT_IMAGE_MESSAGE":"#/components/schemas/ButtonTextImageMessageFlowNode","BUTTON_TEXT_MESSAGE":"#/components/schemas/ButtonTextMessageFlowNode","CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE":"#/components/schemas/CarouselButtonTextImageMessageFlowNode","COLLECT_PAYMENT":"#/components/schemas/CollectPaymentFlowNode","COLLECT_USER_INFO":"#/components/schemas/CollectUserInfoFlowNode","CONDITION":"#/components/schemas/ConditionFlowNode","DELAY":"#/components/schemas/DelayFlowNode","MESSAGE_BUTTON":"#/components/schemas/MessageButtonFlowNode","MESSAGE_GROUP":"#/components/schemas/MessageGroupFlowNode","PLAIN_TEXT_MESSAGE":"#/components/schemas/PlainTextMessageFlowNode","RANDOMIZER":"#/components/schemas/RandomizerFlowNode","TRIGGER_GROUP":"#/components/schemas/TriggerGroupFlowNode","USER_COMMENT_TRIGGER":"#/components/schemas/UserCommentTriggerFlowNode","USER_SENDS_MESSAGE":"#/components/schemas/UserSendsMessageTriggerFlowNode","USER_SHARE_POST":"#/components/schemas/UserSharePostTriggerFlowNode","USER_STORY_MENTION":"#/components/schemas/UserStoryMentionTriggerFlowNode"}}},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/FlowEdge"},"type":"array","title":"Edges"}},"type":"object","title":"FlowAutomationUpdatePayload","description":"Payload for updating a flow automation."},"FlowBacktrackPost":{"properties":{"node_id":{"type":"string","title":"Node Id"},"media_id":{"type":"string","title":"Media Id"},"media_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Url"},"trigger_type":{"anyOf":[{"$ref":"#/components/schemas/MediaTriggerType"},{"type":"null"}]},"keywords":{"items":{"type":"string"},"type":"array","title":"Keywords","default":[]}},"type":"object","required":["node_id","media_id"],"title":"FlowBacktrackPost","description":"One specific post a backtrack run would walk, with the keywords its\ncomment trigger listens for (shown in the backtrack dialog)."},"FlowBuilderSummary":{"properties":{"cost_basis_model":{"type":"string","title":"Cost Basis Model"},"tokens_this_month":{"$ref":"#/components/schemas/TokenTotals"},"tokens_all_time":{"$ref":"#/components/schemas/TokenTotals"},"estimated_cost_usd_this_month":{"type":"number","title":"Estimated Cost Usd This Month"},"estimated_cost_usd_all_time":{"type":"number","title":"Estimated Cost Usd All Time"},"turns_total":{"type":"integer","title":"Turns Total"},"turns_this_month":{"type":"integer","title":"Turns This Month"},"active_sessions":{"type":"integer","title":"Active Sessions"},"active_draft_sessions":{"type":"integer","title":"Active Draft Sessions"},"daily":{"$ref":"#/components/schemas/app__api__v1__admin_console__ai_usage__schemas__PeriodComparison"},"weekly":{"$ref":"#/components/schemas/app__api__v1__admin_console__ai_usage__schemas__PeriodComparison"},"monthly":{"$ref":"#/components/schemas/app__api__v1__admin_console__ai_usage__schemas__PeriodComparison"},"monthly_series":{"items":{"$ref":"#/components/schemas/MonthlyTokenPoint"},"type":"array","title":"Monthly Series"},"top_users":{"items":{"$ref":"#/components/schemas/FlowBuilderTopUser"},"type":"array","title":"Top Users"}},"type":"object","required":["cost_basis_model","tokens_this_month","tokens_all_time","estimated_cost_usd_this_month","estimated_cost_usd_all_time","turns_total","turns_this_month","active_sessions","active_draft_sessions","daily","weekly","monthly","monthly_series","top_users"],"title":"FlowBuilderSummary"},"FlowBuilderTopUser":{"properties":{"user_id":{"type":"integer","title":"User Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"total_tokens":{"type":"integer","title":"Total Tokens"},"estimated_cost_usd":{"type":"number","title":"Estimated Cost Usd"}},"type":"object","required":["user_id","total_tokens","estimated_cost_usd"],"title":"FlowBuilderTopUser"},"FlowClickEvenPayload":{"properties":{"flow_automation_id":{"type":"integer","title":"Flow Automation Id"},"url":{"type":"string","title":"Url"},"client_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Ip"},"from_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From User Id"},"from_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Username"},"trigger_node_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger Node Id"},"trigger_node_type":{"anyOf":[{"$ref":"#/components/schemas/CustomNodeType"},{"type":"null"}]},"flow_execution_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Flow Execution Id"},"next_node_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Next Node Ids"}},"type":"object","required":["flow_automation_id","url"],"title":"FlowClickEvenPayload"},"FlowEdge":{"properties":{"id":{"type":"string","title":"Id","description":"Unique edge id. Use a UUID string. Convention: 'e-<source>-<target>' or just a UUID.","examples":["e-b3c1f4a2-7e8d-4c5a"]},"source":{"type":"string","title":"Source","description":"Id of the node this edge originates from. Must match an existing node `id`."},"target":{"type":"string","title":"Target","description":"Id of the node this edge points to. Must match an existing node `id`. Cannot equal `source` (no self-loops)."},"sourceHandle":{"anyOf":[{"$ref":"#/components/schemas/SourceHandle"},{"type":"string"},{"type":"null"}],"title":"Sourcehandle","description":"Which outgoing handle of `source` this edge uses. Required when `source` is a CONDITION node (use the `source_handle` from the matching ConditionBase rule, e.g. 'SUCCESS', 'FAILED', or a custom id), a RANDOMIZER node (use the `source_handle` of the path this edge belongs to), or a COLLECT_USER_INFO node ('SUCCESS' / 'FAILED'). For MESSAGE_BUTTON edges leave null — the button's id IS the handle. For all other source node types, leave null.","examples":["SUCCESS","FAILED"]},"targetHandle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targethandle","description":"Incoming handle on `target`. Almost always null; reserved for future use."},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"Visual edge style (XYFlow). Leave null for the default; the frontend picks an appropriate style based on source/target types."}},"additionalProperties":true,"type":"object","required":["id","source","target"],"title":"FlowEdge","description":"A directed edge connecting two nodes in the flow. Defines the\nexecution order: when `source` finishes, the flow continues to `target`.\nFor nodes with multiple outputs (CONDITION, MESSAGE_BUTTON, COLLECT_USER_INFO),\n`sourceHandle` picks which branch this edge represents."},"FlowEventTrackerResponseSchema":{"properties":{"flow_automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Flow Automation Id"},"type":{"$ref":"#/components/schemas/FlowEventType"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"from_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From User Id"},"from_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Username"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"}},"type":"object","required":["type","created_at"],"title":"FlowEventTrackerResponseSchema"},"FlowEventType":{"type":"string","enum":["FLOW_TRIGGER_FOUND","URL_CLICKED","BUTTON_CLICKED","REPLIED_TO_COMMENT"],"title":"FlowEventType","description":"Enum for flow event type."},"FlowNodeStats":{"properties":{"hits":{"type":"integer","title":"Hits"},"no_of_url_clicks":{"type":"integer","title":"No Of Url Clicks"}},"type":"object","required":["hits","no_of_url_clicks"],"title":"FlowNodeStats","description":"Stats for a single MESSAGE_GROUP node."},"FlowNodeStatsPayload":{"properties":{"flow_automation_id":{"type":"integer","title":"Flow Automation Id"}},"type":"object","required":["flow_automation_id"],"title":"FlowNodeStatsPayload","description":"Payload for getting message group node stats."},"FlowNodeStatsResponse":{"properties":{"stats":{"additionalProperties":{"$ref":"#/components/schemas/FlowNodeStats"},"type":"object","title":"Stats"}},"type":"object","required":["stats"],"title":"FlowNodeStatsResponse","description":"Response for message group node stats, keyed by node_id."},"FlowNodeUsageRow":{"properties":{"node_type":{"type":"string","title":"Node Type"},"usage_count":{"type":"integer","title":"Usage Count"}},"type":"object","required":["node_type","usage_count"],"title":"FlowNodeUsageRow","description":"One row of `flow_execution_step.node_type` aggregated by usage count."},"FlowNodesByUsageResponse":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/FlowNodeUsageRow"},"type":"array","title":"Nodes"}},"type":"object","required":["nodes"],"title":"FlowNodesByUsageResponse"},"FlowRewindCommentsPayload":{"properties":{"flow_rewind_id":{"type":"integer","title":"Flow Rewind Id"},"media_id":{"type":"string","title":"Media Id"},"pending_media_ids":{"items":{"type":"string"},"type":"array","title":"Pending Media Ids","default":[]},"comment_response":{"$ref":"#/components/schemas/InstagramCommentResponse"}},"type":"object","required":["flow_rewind_id","media_id","comment_response"],"title":"FlowRewindCommentsPayload","description":"Queue payload for one page of one post's comments.\n\n`pending_media_ids` are the posts still to walk after this one, so the run\ncompletes exactly once even when the flow has several comment triggers."},"FlowRewindEditPayload":{"properties":{"status":{"$ref":"#/components/schemas/ProcessStatus"}},"type":"object","required":["status"],"title":"FlowRewindEditPayload","description":"Status change on a run — CANCELLED is \"Stop backtracking\"."},"FlowRewindResponse":{"properties":{"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"processed_no_of_comments":{"type":"integer","title":"Processed No Of Comments"},"total_no_of_comments":{"type":"integer","title":"Total No Of Comments"},"status":{"$ref":"#/components/schemas/ProcessStatus"}},"type":"object","required":["id","created_at","processed_no_of_comments","total_no_of_comments","status"],"title":"FlowRewindResponse","description":"Progress of a flow backtrack run (`flow_automation_rewind` row)."},"FlowRewindStatusResponse":{"properties":{"enable_backtrack":{"type":"boolean","title":"Enable Backtrack"},"posts":{"items":{"$ref":"#/components/schemas/FlowBacktrackPost"},"type":"array","title":"Posts","default":[]},"flow_rewind":{"anyOf":[{"$ref":"#/components/schemas/FlowRewindResponse"},{"type":"null"}]}},"type":"object","required":["enable_backtrack"],"title":"FlowRewindStatusResponse","description":"What the backtrack dialog needs: whether the flow can be backtracked,\nwhich posts/keywords are covered, and the latest run."},"FlowTodayBySourceResponse":{"properties":{"instagram":{"type":"integer","title":"Instagram"},"facebook":{"type":"integer","title":"Facebook"}},"type":"object","required":["instagram","facebook"],"title":"FlowTodayBySourceResponse","description":"Flow automations created today, broken down by media source."},"FollowUpMessageSchema":{"properties":{"follow_up_type":{"$ref":"#/components/schemas/FollowUpMessageType"},"message_type":{"$ref":"#/components/schemas/MessageType"},"dm_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dm Message"},"delay_in_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delay In Seconds"},"reaction_emoji":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reaction Emoji"}},"type":"object","required":["follow_up_type","message_type"],"title":"FollowUpMessageSchema"},"FollowUpMessageType":{"type":"string","enum":["IF_NOT_CLICKED_LINK","IF_CLICKED_LINK","IF_NO_READ_MESSAGE","IF_UNREACTED_TO_MESSAGE","IF_NO_REPLY","IF_REPLIED_TO_MESSAGE","IF_SEEN_MESSAGE","IF_UNSEEN_MESSAGE","IF_REACTED_TO_MESSAGE_WITH_EMOJI","IF_USER_FOLLOWED_ME","IF_USER_UNFOLLOWED_ME","ALWAYS"],"title":"FollowUpMessageType"},"FunnelSchema":{"properties":{"stages":{"items":{"$ref":"#/components/schemas/FunnelStageSchema"},"type":"array","title":"Stages"},"insight":{"type":"string","title":"Insight"}},"type":"object","required":["stages","insight"],"title":"FunnelSchema"},"FunnelStageSchema":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"descriptor":{"type":"string","title":"Descriptor"},"count":{"type":"integer","title":"Count"},"width_pct":{"type":"number","title":"Width Pct"},"conversion_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Conversion Pct"}},"type":"object","required":["key","label","descriptor","count","width_pct"],"title":"FunnelStageSchema"},"GatewayCurrenciesResponse":{"properties":{"provider":{"$ref":"#/components/schemas/PaymentProvider"},"default_currency":{"type":"string","title":"Default Currency"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"matched_country":{"type":"boolean","title":"Matched Country","default":false},"requires_activation":{"type":"boolean","title":"Requires Activation"},"currencies":{"items":{"$ref":"#/components/schemas/GatewayCurrency"},"type":"array","title":"Currencies"}},"type":"object","required":["provider","default_currency","requires_activation","currencies"],"title":"GatewayCurrenciesResponse","description":"The currencies one gateway can be used with."},"GatewayCurrency":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"exponent":{"type":"integer","title":"Exponent"},"countries":{"items":{"type":"string"},"type":"array","title":"Countries","default":[]},"minimum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Minimum"}},"type":"object","required":["code","name","exponent"],"title":"GatewayCurrency","description":"One currency a creator can price in on a given gateway."},"GenerateAutoReplyFlowPromptPayload":{"properties":{"nodes":{"items":{"oneOf":[{"$ref":"#/components/schemas/TriggerGroupFlowNode"},{"$ref":"#/components/schemas/UserCommentTriggerFlowNode"},{"$ref":"#/components/schemas/UserSendsMessageTriggerFlowNode"},{"$ref":"#/components/schemas/UserSharePostTriggerFlowNode"},{"$ref":"#/components/schemas/UserStoryMentionTriggerFlowNode"},{"$ref":"#/components/schemas/PlainTextMessageFlowNode"},{"$ref":"#/components/schemas/ButtonTextMessageFlowNode"},{"$ref":"#/components/schemas/ButtonTextImageMessageFlowNode"},{"$ref":"#/components/schemas/CarouselButtonTextImageMessageFlowNode"},{"$ref":"#/components/schemas/AttachmentMessageFlowNode"},{"$ref":"#/components/schemas/MessageGroupFlowNode"},{"$ref":"#/components/schemas/MessageButtonFlowNode"},{"$ref":"#/components/schemas/DelayFlowNode"},{"$ref":"#/components/schemas/ConditionFlowNode"},{"$ref":"#/components/schemas/CollectUserInfoFlowNode"},{"$ref":"#/components/schemas/ActionFlowNode"},{"$ref":"#/components/schemas/CollectPaymentFlowNode"},{"$ref":"#/components/schemas/RandomizerFlowNode"}],"discriminator":{"propertyName":"type","mapping":{"ACTION":"#/components/schemas/ActionFlowNode","ATTACHMENT_MESSAGE":"#/components/schemas/AttachmentMessageFlowNode","BUTTON_TEXT_IMAGE_MESSAGE":"#/components/schemas/ButtonTextImageMessageFlowNode","BUTTON_TEXT_MESSAGE":"#/components/schemas/ButtonTextMessageFlowNode","CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE":"#/components/schemas/CarouselButtonTextImageMessageFlowNode","COLLECT_PAYMENT":"#/components/schemas/CollectPaymentFlowNode","COLLECT_USER_INFO":"#/components/schemas/CollectUserInfoFlowNode","CONDITION":"#/components/schemas/ConditionFlowNode","DELAY":"#/components/schemas/DelayFlowNode","MESSAGE_BUTTON":"#/components/schemas/MessageButtonFlowNode","MESSAGE_GROUP":"#/components/schemas/MessageGroupFlowNode","PLAIN_TEXT_MESSAGE":"#/components/schemas/PlainTextMessageFlowNode","RANDOMIZER":"#/components/schemas/RandomizerFlowNode","TRIGGER_GROUP":"#/components/schemas/TriggerGroupFlowNode","USER_COMMENT_TRIGGER":"#/components/schemas/UserCommentTriggerFlowNode","USER_SENDS_MESSAGE":"#/components/schemas/UserSendsMessageTriggerFlowNode","USER_SHARE_POST":"#/components/schemas/UserSharePostTriggerFlowNode","USER_STORY_MENTION":"#/components/schemas/UserStoryMentionTriggerFlowNode"}}},"type":"array","title":"Nodes","description":"The flow's node graph (XYFlow nodes)."}},"type":"object","title":"GenerateAutoReplyFlowPromptPayload","description":"Body for POST /api/v1/ai/generate_auto_reply_flow_prompt.\n\nCarries a flow's node graph. The service inspects the message nodes\n(PLAIN_TEXT_MESSAGE / BUTTON_TEXT_MESSAGE / BUTTON_TEXT_IMAGE_MESSAGE /\nCAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE / MESSAGE_BUTTON) to describe what the\nDM delivers, then generates a tailored public auto-reply prompt for the\ncomment trigger. Only `nodes` is read; any `edges` / graph metadata sent\nalongside are ignored. Reuses GenerateAutoReplyPromptResponse for the reply."},"GenerateAutoReplyPromptResponse":{"properties":{"prompt":{"type":"string","title":"Prompt"}},"type":"object","required":["prompt"],"title":"GenerateAutoReplyPromptResponse","description":"Response for POST /api/v1/ai/generate_auto_reply_prompt.\n\n`prompt` is a ready-to-use AI auto-reply *instruction* (the seed the\ncreator drops into the auto-reply prompt box), generated from the draft\nAutomationPayload so each automation gets a different, on-topic prompt\ninstead of everyone shipping the same hardcoded default."},"GenerateDmVariationsResponse":{"properties":{"variations":{"items":{"$ref":"#/components/schemas/AutomationDmVariationSchema"},"type":"array","title":"Variations"}},"type":"object","required":["variations"],"title":"GenerateDmVariationsResponse"},"GroupCount":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["count"],"title":"GroupCount","description":"A {label: count} bucket — used for breakdowns by auth provider, country, etc."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthCheckResponse":{"properties":{"status":{"type":"string","title":"Status"},"database":{"type":"string","title":"Database"},"error":{"type":"string","title":"Error"}},"type":"object","required":["status","database"],"title":"HealthCheckResponse","description":"Schema for health check response."},"HttpMethod":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],"title":"HttpMethod","description":"HTTP verb for an EXTERNAL_API_REQUEST. POST is the default.\nGET/HEAD/OPTIONS requests never send a body."},"IcebreakerPayload":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"question":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question"},"answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answer"},"action":{"anyOf":[{"$ref":"#/components/schemas/QuickReplyAction"},{"type":"null"}]},"message_type":{"anyOf":[{"$ref":"#/components/schemas/app__api__v1__automation__schemas__AutomationType"},{"type":"null"}]},"automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Automation Id"},"flow_automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Flow Automation Id"}},"type":"object","title":"IcebreakerPayload","description":"An icebreaker, shaped like a DM quick-reply chip (QuickReplySchema):\n`question` is the label and `answer` the SEND_MESSAGE reply, in place of\nthe chip's `dm_message`."},"ImpersonateUserPayload":{"properties":{"firebase_uid":{"type":"string","title":"Firebase Uid"}},"type":"object","required":["firebase_uid"],"title":"ImpersonateUserPayload","description":"Impersonate User Payload."},"InactivateAllAutomationsPayload":{"properties":{"channel_id":{"type":"string","title":"Channel Id"}},"type":"object","required":["channel_id"],"title":"InactivateAllAutomationsPayload"},"InactivateAllAutomationsResponse":{"properties":{"automations_inactivated":{"type":"integer","title":"Automations Inactivated"},"flow_automations_inactivated":{"type":"integer","title":"Flow Automations Inactivated"},"inbox_automations_inactivated":{"type":"integer","title":"Inbox Automations Inactivated"}},"type":"object","required":["automations_inactivated","flow_automations_inactivated","inbox_automations_inactivated"],"title":"InactivateAllAutomationsResponse"},"InboxAutomationKeywordTriggerType":{"type":"string","enum":["EXACT_MATCH","CONTAINS"],"title":"InboxAutomationKeywordTriggerType"},"InboxAutomationMessageFrom":{"type":"string","enum":["USER","SYSTEM"],"title":"InboxAutomationMessageFrom"},"InboxAutomationMessageNode":{"properties":{"id":{"type":"string","title":"Id"},"from":{"$ref":"#/components/schemas/InboxAutomationMessageFrom"},"type":{"$ref":"#/components/schemas/InboxAutomationMessageType"},"message":{"type":"string","title":"Message"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"save_to_field_key":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},{"type":"null"}],"title":"Save To Field Key"},"childrens":{"items":{"$ref":"#/components/schemas/InboxAutomationMessageNode"},"type":"array","title":"Childrens","default":[]}},"type":"object","required":["id","type","message"],"title":"InboxAutomationMessageNode"},"InboxAutomationMessageType":{"type":"string","enum":["INPUT","CHOICE"],"title":"InboxAutomationMessageType"},"InboxAutomationPayload":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"messages_tree":{"anyOf":[{"$ref":"#/components/schemas/InboxAutomationMessageNode"},{"type":"null"}]},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_deleted":{"type":"boolean","title":"Is Deleted","default":false},"is_universal":{"type":"boolean","title":"Is Universal","default":false},"automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Automation Id"},"keyword_trigger_type":{"$ref":"#/components/schemas/InboxAutomationKeywordTriggerType","default":"EXACT_MATCH"},"media_source":{"$ref":"#/components/schemas/MediaSource","default":"INSTAGRAM"}},"type":"object","title":"InboxAutomationPayload"},"InboxAutomationPredefinedMessage":{"type":"string","enum":["EMAIL","PHONE","ANY"],"title":"InboxAutomationPredefinedMessage"},"InboxAutomationStatsPayload":{"properties":{"inbox_automation_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Inbox Automation Ids"}},"type":"object","title":"InboxAutomationStatsPayload"},"InsertProfileInfoForUserPayload":{"properties":{"user_id":{"type":"integer","title":"User Id"}},"type":"object","required":["user_id"],"title":"InsertProfileInfoForUserPayload"},"InstagramAccount":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"created_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By User Id"},"access_token":{"type":"string","title":"Access Token"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"use_queue":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Queue","default":false},"queue_speed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queue Speed"}},"type":"object","required":["user_id","created_by_user_id","access_token","expires_at"],"title":"InstagramAccount","description":"Instagram account model."},"InstagramAccountDetailsResponse":{"properties":{"account":{"$ref":"#/components/schemas/InstagramAccount"},"profile":{"$ref":"#/components/schemas/InstagramMeResponse"}},"type":"object","required":["account","profile"],"title":"InstagramAccountDetailsResponse"},"InstagramAccountResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"access_token":{"type":"string","title":"Access Token"}},"type":"object","required":["id","user_id","access_token"],"title":"InstagramAccountResponse"},"InstagramCommentData":{"properties":{"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"id":{"type":"string","title":"Id"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"from":{"anyOf":[{"$ref":"#/components/schemas/CommentFrom"},{"type":"null"}]}},"type":"object","required":["id","from"],"title":"InstagramCommentData"},"InstagramCommentResponse":{"properties":{"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/InstagramCommentData"},"type":"array"},{"type":"null"}],"title":"Data","default":[]},"paging":{"anyOf":[{"$ref":"#/components/schemas/Paging"},{"type":"null"}]}},"type":"object","title":"InstagramCommentResponse"},"InstagramConnectSuccessPayload":{"properties":{"user_access_token":{"type":"string","title":"User Access Token"}},"type":"object","required":["user_access_token"],"title":"InstagramConnectSuccessPayload"},"InstagramCursorsResponse":{"properties":{"before":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"},"after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After"}},"type":"object","title":"InstagramCursorsResponse"},"InstagramMeResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"integer"}],"title":"Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"User Id"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Type"},"profile_picture_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Picture Url"},"followers_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Followers Count"},"follows_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Follows Count"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"media_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Media Count"},"biography":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Biography"}},"type":"object","required":["id"],"title":"InstagramMeResponse"},"InstagramOauthSuccessPayload":{"properties":{"code":{"type":"string","title":"Code"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"}},"type":"object","required":["code","redirect_uri","permissions"],"title":"InstagramOauthSuccessPayload"},"InstagramOauthSuccessResponse":{"properties":{"firebase_uid":{"type":"string","title":"Firebase Uid"},"custom_token":{"type":"string","title":"Custom Token"}},"type":"object","required":["firebase_uid","custom_token"],"title":"InstagramOauthSuccessResponse"},"InstagramWebhookEntryPayload":{"properties":{"entry":{"additionalProperties":true,"type":"object","title":"Entry"}},"type":"object","required":["entry"],"title":"InstagramWebhookEntryPayload","description":"One `entry` of an Instagram webhook payload, as received from Meta."},"IntentMatchPayload":{"properties":{"configured_intent":{"type":"string","title":"Configured Intent"},"instagram_message":{"type":"string","title":"Instagram Message"}},"type":"object","required":["configured_intent","instagram_message"],"title":"IntentMatchPayload"},"IntentMatchResponse":{"properties":{"matched":{"type":"boolean","title":"Matched"}},"type":"object","required":["matched"],"title":"IntentMatchResponse"},"InvoiceData":{"properties":{"company_name":{"type":"string","title":"Company Name","default":"SPECTRALHELIX TECHNOLABS LLP"},"company_gstin":{"type":"string","title":"Company Gstin","default":"32AFJFS4401H1Z9"},"company_llpin":{"type":"string","title":"Company Llpin","default":"ACI-8273"},"company_website":{"type":"string","title":"Company Website","default":"linktodm.com"},"company_email":{"type":"string","title":"Company Email","default":"support@linktodm.com"},"product_description":{"type":"string","title":"Product Description","default":"LinktoDM - Automation Platform"},"issue_date":{"type":"string","title":"Issue Date"},"customer_name":{"type":"string","title":"Customer Name"},"customer_email":{"type":"string","title":"Customer Email"},"customer_gstin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Gstin"},"billing_address":{"type":"string","title":"Billing Address"},"item_name":{"type":"string","title":"Item Name"},"item_period":{"type":"string","title":"Item Period"},"quantity":{"type":"integer","title":"Quantity","default":1},"currency_symbol":{"type":"string","title":"Currency Symbol","default":"₹"},"subtotal_amount":{"type":"string","title":"Subtotal Amount"},"subtotal_amount_formatted":{"type":"string","title":"Subtotal Amount Formatted"},"tax_name":{"type":"string","title":"Tax Name"},"tax_amount":{"type":"string","title":"Tax Amount"},"tax_amount_formatted":{"type":"string","title":"Tax Amount Formatted"},"applied_promo_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Applied Promo Code"},"discount_amount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discount Amount"},"discount_amount_formatted":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discount Amount Formatted"},"original_subtotal_amount_formatted":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Subtotal Amount Formatted"},"total_amount_formatted":{"type":"string","title":"Total Amount Formatted"}},"type":"object","required":["issue_date","customer_name","customer_email","billing_address","item_name","item_period","subtotal_amount","subtotal_amount_formatted","tax_name","tax_amount","tax_amount_formatted","total_amount_formatted"],"title":"InvoiceData","description":"Invoice data schema for PDF generation."},"InvoicePreviewResponse":{"properties":{"id":{"type":"integer","title":"Id"},"subscription_id":{"type":"integer","title":"Subscription Id"},"customer_name":{"type":"string","title":"Customer Name"},"customer_email":{"type":"string","title":"Customer Email"},"total_amount_formatted":{"type":"string","title":"Total Amount Formatted"},"currency_symbol":{"type":"string","title":"Currency Symbol"},"issue_date":{"type":"string","title":"Issue Date"},"item_name":{"type":"string","title":"Item Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","subscription_id","customer_name","customer_email","total_amount_formatted","currency_symbol","issue_date","item_name","created_at"],"title":"InvoicePreviewResponse","description":"Invoice preview response schema for listing invoices."},"KeywordCheckType":{"type":"string","enum":["EQUALS","CONTAINS","NOT_CONTAINS","BEGINS_WITH","ENDS_WITH","CONTAINS_WHOLE_WORD","CONTAINS_WHOLE_PHRASE","GREATER_THAN","LESS_THAN","HAS_VALUE","NOT_EQUALS","NOT_HAS_VALUE"],"title":"KeywordCheckType","description":"Keyword check type for user sends message trigger."},"KeywordsCheck":{"properties":{"type":{"$ref":"#/components/schemas/KeywordCheckType","description":"How the keywords are matched against the message text. EQUALS/NOT_EQUALS: full string match. CONTAINS/NOT_CONTAINS: substring match. BEGINS_WITH/ENDS_WITH: prefix/suffix. CONTAINS_WHOLE_WORD/CONTAINS_WHOLE_PHRASE: word-boundary match. HAS_VALUE/NOT_HAS_VALUE: field presence (no keywords needed). GREATER_THAN/LESS_THAN: numeric comparison."},"keywords":{"items":{"type":"string"},"type":"array","title":"Keywords","description":"List of keywords/phrases to test against the message. Matching is case-insensitive. Leave empty only for HAS_VALUE / NOT_HAS_VALUE.","examples":[["pricing","price","cost"],["demo"]]}},"type":"object","required":["type","keywords"],"title":"KeywordsCheck","description":"One keyword-match rule inside a USER_SENDS_MESSAGE trigger. A trigger\nfires if ANY of its `keywords_checks` matches the incoming DM."},"KpiMetricSchema":{"properties":{"value":{"type":"number","title":"Value"},"change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change Pct"},"is_new":{"type":"boolean","title":"Is New","default":false}},"type":"object","required":["value"],"title":"KpiMetricSchema","description":"A single KPI card. `value` is ready to display (a count or a percent).\n\n`change_pct` is the last-7-days-vs-prior-7-days momentum; it is null when\nthere is no prior-period baseline. `is_new` is true when the current window\nhas activity but the prior window is empty (surface \"New\" instead of a\nmeaningless percentage)."},"LabelCount":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["count"],"title":"LabelCount","description":"One bucket of a group-by aggregate. `label` is None for the\nNULL bucket (e.g. an unscored verdict)."},"LatencyStats":{"properties":{"p50_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P50 Ms"},"p95_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P95 Ms"},"avg_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Ms"}},"type":"object","title":"LatencyStats","description":"Latency distribution in milliseconds. Null when there are no rows."},"LemonSqueezyManagedURLResponse":{"properties":{"customer_portal_url":{"type":"string","title":"Customer Portal Url"}},"type":"object","required":["customer_portal_url"],"title":"LemonSqueezyManagedURLResponse"},"LemonSqueezyVariantStatus":{"type":"string","enum":["pending","draft","published"],"title":"LemonSqueezyVariantStatus"},"LinkCurrentUserPayload":{"properties":{"agency_id":{"type":"integer","title":"Agency Id"},"agency_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agency User Id"}},"type":"object","required":["agency_id"],"title":"LinkCurrentUserPayload"},"LinkDraftPayload":{"properties":{"draft_key":{"type":"string","maxLength":64,"minLength":1,"title":"Draft Key"},"flow_automation_id":{"type":"integer","title":"Flow Automation Id"}},"type":"object","required":["draft_key","flow_automation_id"],"title":"LinkDraftPayload","description":"Body for `POST /ai_builder/link_draft`. Sent right after a draft\nflow is saved: reassigns the draft's active chat session to the newly\ncreated flow so the conversation carries over."},"LinkDraftResponse":{"properties":{"linked":{"type":"boolean","title":"Linked"},"flow_automation_id":{"type":"integer","title":"Flow Automation Id"},"session_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Session Id"}},"type":"object","required":["linked","flow_automation_id"],"title":"LinkDraftResponse","description":"Returned by `POST /ai_builder/link_draft`. `session_id` is null\nwhen the draft had no session to link (nothing to do)."},"LoginAccount":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"custom_token":{"type":"string","title":"Custom Token"}},"type":"object","required":["custom_token"],"title":"LoginAccount","description":"One account the email can sign in to, with its Firebase custom token."},"LogoutAllDevicesResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["success","detail"],"title":"LogoutAllDevicesResponse","description":"Response for logging the current user out of all devices."},"MRRBreakdown":{"properties":{"total_payment_in_inr":{"type":"number","title":"Total Payment In Inr"},"lemon_payment_in_inr":{"type":"number","title":"Lemon Payment In Inr"},"razorpay_payment_in_inr":{"type":"number","title":"Razorpay Payment In Inr"},"dodo_payment_in_inr":{"type":"number","title":"Dodo Payment In Inr","default":0.0}},"type":"object","required":["total_payment_in_inr","lemon_payment_in_inr","razorpay_payment_in_inr"],"title":"MRRBreakdown"},"MRRSnapshotPoint":{"properties":{"snapshot_date":{"type":"string","format":"date","title":"Snapshot Date"},"total_inr":{"type":"number","title":"Total Inr"},"razorpay_inr":{"type":"number","title":"Razorpay Inr"},"lemon_inr":{"type":"number","title":"Lemon Inr"},"dodo_inr":{"type":"number","title":"Dodo Inr","default":0.0},"active_count":{"type":"integer","title":"Active Count"}},"type":"object","required":["snapshot_date","total_inr","razorpay_inr","lemon_inr","active_count"],"title":"MRRSnapshotPoint","description":"One point on the daily-snapshot MRR chart."},"MRRTimeseriesResponse":{"properties":{"points":{"items":{"$ref":"#/components/schemas/MRRSnapshotPoint"},"type":"array","title":"Points"},"latest_snapshot_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Snapshot At"}},"type":"object","required":["points"],"title":"MRRTimeseriesResponse"},"MarkPayload":{"properties":{"automation_type":{"$ref":"#/components/schemas/app__api__v1__admin_console__automation_verification__models__AutomationType"},"automation_id":{"type":"integer","title":"Automation Id"},"status":{"anyOf":[{"$ref":"#/components/schemas/VerificationStatus"},{"type":"null"}]}},"type":"object","required":["automation_type","automation_id"],"title":"MarkPayload","description":"Set / clear a verification. `status=None` unmarks (deletes the row)."},"MarkResponse":{"properties":{"automation_type":{"$ref":"#/components/schemas/app__api__v1__admin_console__automation_verification__models__AutomationType"},"automation_id":{"type":"integer","title":"Automation Id"},"status":{"anyOf":[{"$ref":"#/components/schemas/VerificationStatus"},{"type":"null"}]},"marked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Marked At"},"marked_by_admin_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Marked By Admin Id"}},"type":"object","required":["automation_type","automation_id"],"title":"MarkResponse"},"MediaAutomation":{"properties":{"record_id":{"type":"string","title":"Record Id"},"name":{"type":"string","title":"Name"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["record_id","name","is_active"],"title":"MediaAutomation"},"MediaSelectionType":{"type":"string","enum":["SPECIFIC","ALL","NEXT"],"title":"MediaSelectionType","description":"Media selection type for triggers."},"MediaSource":{"type":"string","enum":["INSTAGRAM","FACEBOOK"],"title":"MediaSource"},"MediaTriggerType":{"type":"string","enum":["ANY","SPECIFIC_KEYWORDS","AI"],"title":"MediaTriggerType","description":"Trigger type for media-based automations."},"MediaType":{"type":"string","enum":["IMAGE","VIDEO","CAROUSEL_ALBUM"],"title":"MediaType"},"MergeAccountsRequest":{"properties":{"source_user_ids":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Source User Ids"},"target_user_id":{"type":"integer","title":"Target User Id"}},"type":"object","required":["source_user_ids","target_user_id"],"title":"MergeAccountsRequest","description":"Fold one or more source users into a target user.\n\nEverything the source users own (connected accounts, automations,\ncontacts, then the event/execution history) is re-pointed at the target."},"MergeAccountsResponse":{"properties":{"target_user_id":{"type":"integer","title":"Target User Id"},"source_user_ids":{"items":{"type":"integer"},"type":"array","title":"Source User Ids"},"core_rows_moved":{"additionalProperties":{"type":"integer"},"type":"object","title":"Core Rows Moved"},"merged_contact_field_definitions":{"type":"integer","title":"Merged Contact Field Definitions","default":0},"activity_transfer_queued":{"type":"boolean","title":"Activity Transfer Queued","default":true}},"type":"object","required":["target_user_id","source_user_ids","core_rows_moved"],"title":"MergeAccountsResponse"},"MessageButtonFlowNode":{"properties":{"id":{"type":"string","title":"Id","description":"Unique node id within the flow. Use a UUID string (e.g. 'a7f3...'). Edges reference nodes by this id, so it must be stable once created.","examples":["b3c1f4a2-5d7e-4a9b-9c8d-1f2e3a4b5c6d"]},"position":{"$ref":"#/components/schemas/NodePosition","description":"Canvas coordinates for visual layout only. Has no effect on execution. Use `{x: 0, y: 0}` if you don't care about layout."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Parent node id for grouped children. Required cases: (1) trigger nodes (USER_COMMENT_TRIGGER, USER_SENDS_MESSAGE, USER_SHARE_POST, USER_STORY_MENTION) must have the TRIGGER_GROUP's id as parentId. (2) MESSAGE_BUTTON nodes must have their parent message node's id as parentId (the BUTTON_TEXT_MESSAGE / BUTTON_TEXT_IMAGE_MESSAGE / CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE). All other nodes leave this null."},"extent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extent","description":"XYFlow visual constraint. Usually 'parent' when parentId is set. Leave null otherwise; the frontend infers this."},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"XYFlow runtime layout field. Do NOT set when generating new nodes — the editor populates this."},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"measured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Measured","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"type":{"type":"string","const":"MESSAGE_BUTTON","title":"Type","default":"MESSAGE_BUTTON"},"data":{"$ref":"#/components/schemas/MessageButtonNodeData"}},"additionalProperties":true,"type":"object","required":["id","position","data"],"title":"MessageButtonFlowNode","description":"A clickable button attached to a message. NEVER a standalone node:\nmust have `parentId` set to a BUTTON_TEXT_MESSAGE /\nBUTTON_TEXT_IMAGE_MESSAGE / CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE node.\nOutgoing edges from this button represent what happens when the user\ntaps it (the next flow step)."},"MessageButtonNodeData":{"properties":{"label":{"type":"string","title":"Label","description":"Button label shown to the user. Meta hard limit: 20 characters. Keep it short and action-oriented.","examples":["See pricing","Book a demo","Yes please"]},"action":{"anyOf":[{"$ref":"#/components/schemas/ButtonAction"},{"type":"null"}],"description":"What happens on tap. Omit to default to NONE (continue the flow)."},"carousel_item_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Carousel Item Index","description":"Only set when the button belongs to a card inside a carousel: 0-based index of the card in the carousel's `items`."}},"additionalProperties":true,"type":"object","required":["label"],"title":"MessageButtonNodeData","description":"Action: a single clickable button attached to a text/image/carousel\nmessage. Parent it (via `parentId`) to the message node it belongs to."},"MessageGroupFlowNode":{"properties":{"id":{"type":"string","title":"Id","description":"Unique node id within the flow. Use a UUID string (e.g. 'a7f3...'). Edges reference nodes by this id, so it must be stable once created.","examples":["b3c1f4a2-5d7e-4a9b-9c8d-1f2e3a4b5c6d"]},"position":{"$ref":"#/components/schemas/NodePosition","description":"Canvas coordinates for visual layout only. Has no effect on execution. Use `{x: 0, y: 0}` if you don't care about layout."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Parent node id for grouped children. Required cases: (1) trigger nodes (USER_COMMENT_TRIGGER, USER_SENDS_MESSAGE, USER_SHARE_POST, USER_STORY_MENTION) must have the TRIGGER_GROUP's id as parentId. (2) MESSAGE_BUTTON nodes must have their parent message node's id as parentId (the BUTTON_TEXT_MESSAGE / BUTTON_TEXT_IMAGE_MESSAGE / CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE). All other nodes leave this null."},"extent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extent","description":"XYFlow visual constraint. Usually 'parent' when parentId is set. Leave null otherwise; the frontend infers this."},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"XYFlow runtime layout field. Do NOT set when generating new nodes — the editor populates this."},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"measured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Measured","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"type":{"type":"string","const":"MESSAGE_GROUP","title":"Type","default":"MESSAGE_GROUP"},"data":{"$ref":"#/components/schemas/MessageGroupNodeData"}},"additionalProperties":true,"type":"object","required":["id","position","data"],"title":"MessageGroupFlowNode","description":"Visual container that groups a sequence of message nodes in the\neditor. No execution effect — purely organizational. Use sparingly."},"MessageGroupNodeData":{"properties":{},"additionalProperties":true,"type":"object","title":"MessageGroupNodeData","description":"Container node that visually groups a chain of message nodes in the\neditor. Has no fields and no execution semantics. Use `{}`."},"MessagePayloadType":{"type":"string","enum":["opener","ask_to_follow","follow_up","dm_message","flow_automation_postback_message_button","dm_quick_reply"],"title":"MessagePayloadType"},"MessageType":{"type":"string","enum":["TEXT","IMAGE_BUTTON","BUTTON"],"title":"MessageType"},"MetaAPIMode":{"type":"string","enum":["FACEBOOK","INSTAGRAM","FACEBOOK_PAGE"],"title":"MetaAPIMode"},"MetaCursorsResponse":{"properties":{"before":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"},"after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After"}},"type":"object","title":"MetaCursorsResponse"},"MetaMedia":{"properties":{"id":{"type":"string","title":"Id"},"permalink":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Permalink"},"media_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Type"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"media_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Url"},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption"},"like_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Like Count"},"comments_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Comments Count"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["id"],"title":"MetaMedia"},"MetaMediaResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/MetaMedia"},"type":"array","title":"Data","default":[]},"paging":{"anyOf":[{"$ref":"#/components/schemas/MetaPagingResponse"},{"type":"null"}]}},"type":"object","title":"MetaMediaResponse"},"MetaMediaType":{"type":"string","enum":["FACEBOOK_FEED","INSTAGRAM_POST","INSTAGRAM_STORY"],"title":"MetaMediaType"},"MetaPagingResponse":{"properties":{"cursors":{"anyOf":[{"$ref":"#/components/schemas/MetaCursorsResponse"},{"type":"null"}]}},"type":"object","title":"MetaPagingResponse"},"MonthlyTokenPoint":{"properties":{"month":{"type":"string","title":"Month"},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"estimated_cost_usd":{"type":"number","title":"Estimated Cost Usd"}},"type":"object","required":["month","input_tokens","output_tokens","estimated_cost_usd"],"title":"MonthlyTokenPoint"},"MyOwnAccount":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"picture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Picture"},"is_current":{"type":"boolean","title":"Is Current"}},"type":"object","required":["is_current"],"title":"MyOwnAccount","description":"The person's own account, to switch back to from a team."},"MyTeamAccount":{"properties":{"team_member_id":{"type":"integer","title":"Team Member Id"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"owner_picture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Picture"},"role":{"$ref":"#/components/schemas/TeamMemberRole"},"is_current":{"type":"boolean","title":"Is Current"}},"type":"object","required":["team_member_id","role","is_current"],"title":"MyTeamAccount","description":"A team the signed-in person was invited to, shown in the sidebar."},"MyTeamsResponse":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"email_verified":{"type":"boolean","title":"Email Verified"},"has_teams":{"type":"boolean","title":"Has Teams"},"teams":{"items":{"$ref":"#/components/schemas/MyTeamAccount"},"type":"array","title":"Teams"},"own_account":{"anyOf":[{"$ref":"#/components/schemas/MyOwnAccount"},{"type":"null"}]}},"type":"object","required":["email_verified","has_teams","teams"],"title":"MyTeamsResponse"},"NewFollowersFilterPayload":{"properties":{"page":{"type":"integer","title":"Page","default":1},"limit":{"type":"integer","title":"Limit","default":10},"automation_id":{"type":"integer","title":"Automation Id"},"created_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By User Id"}},"type":"object","required":["automation_id"],"title":"NewFollowersFilterPayload"},"NodePosition":{"properties":{"x":{"type":"number","title":"X","description":"Horizontal pixel offset on the canvas."},"y":{"type":"number","title":"Y","description":"Vertical pixel offset on the canvas."}},"type":"object","required":["x","y"],"title":"NodePosition","description":"XYFlow canvas coordinate for a node. Used for visual layout only —\nhas no effect on execution. Use `{x: 0, y: 0}` if you don't care\nabout layout; the frontend will lay nodes out on first load."},"OpenerMessageType":{"type":"string","enum":["Button Text","Quick Reply Text"],"title":"OpenerMessageType"},"OrderPayload":{"properties":{"checkout_token":{"type":"string","title":"Checkout Token"},"payment_gateway":{"$ref":"#/components/schemas/PaymentGateway"},"redirect_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Url"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"is_business":{"type":"boolean","title":"Is Business","default":false},"business_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Name"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"tax_country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Country Code"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"cancel_existing_subscription":{"type":"boolean","title":"Cancel Existing Subscription","default":false}},"type":"object","required":["checkout_token","payment_gateway"],"title":"OrderPayload"},"OrderResponse":{"properties":{"id":{"type":"string","title":"Id"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","required":["id"],"title":"OrderResponse"},"PagiantionSchema":{"properties":{"total":{"type":"integer","title":"Total"},"docs":{"items":{},"type":"array","title":"Docs"}},"type":"object","required":["total","docs"],"title":"PagiantionSchema"},"PagiantionSchema_InvoicePreviewResponse_":{"properties":{"total":{"type":"integer","title":"Total"},"docs":{"items":{"$ref":"#/components/schemas/InvoicePreviewResponse"},"type":"array","title":"Docs"}},"type":"object","required":["total","docs"],"title":"PagiantionSchema[InvoicePreviewResponse]"},"PagiantionSchema_str_":{"properties":{"total":{"type":"integer","title":"Total"},"docs":{"items":{"type":"string"},"type":"array","title":"Docs"}},"type":"object","required":["total","docs"],"title":"PagiantionSchema[str]"},"PaginationSchema_AgentResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AgentResponse"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["data","total","limit","offset"],"title":"PaginationSchema[AgentResponse]"},"PaginationSchema_ApiKeyResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ApiKeyResponse"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["data","total","limit","offset"],"title":"PaginationSchema[ApiKeyResponse]"},"PaginationSchema_AttachmentItem_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AttachmentItem"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["data","total","limit","offset"],"title":"PaginationSchema[AttachmentItem]"},"PaginationSchema_ContactFieldDefinitionResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ContactFieldDefinitionResponse"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["data","total","limit","offset"],"title":"PaginationSchema[ContactFieldDefinitionResponse]"},"PaginationSchema_FlowEventTrackerResponseSchema_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/FlowEventTrackerResponseSchema"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["data","total","limit","offset"],"title":"PaginationSchema[FlowEventTrackerResponseSchema]"},"PaginationSchema_UserPaymentProviderResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UserPaymentProviderResponse"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["data","total","limit","offset"],"title":"PaginationSchema[UserPaymentProviderResponse]"},"PaginationSchema_VerificationRow_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/VerificationRow"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["data","total","limit","offset"],"title":"PaginationSchema[VerificationRow]"},"Paging":{"properties":{"next":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next"},"cursors":{"anyOf":[{"$ref":"#/components/schemas/InstagramCursorsResponse"},{"type":"null"}]}},"type":"object","title":"Paging"},"PaymentGateway":{"type":"string","enum":["RAZORPAY","LEMON_SQUEEZY","DODO_PAYMENTS"],"title":"PaymentGateway","description":"Payment gateways. Canonical definition — subscription schemas re-export\nit, and settings.india_payment_gateway (the kill switch) uses it."},"PaymentMethodResponse":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type"},"card_brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Brand"},"last_four":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Four"},"expiry_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expiry Month"},"expiry_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expiry Year"},"vpa":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vpa"},"is_default":{"type":"boolean","title":"Is Default"}},"type":"object","required":["id","type","is_default"],"title":"PaymentMethodResponse"},"PaymentProvider":{"type":"string","enum":["STRIPE","RAZORPAY"],"title":"PaymentProvider","description":"A creator's gateway.\n\nDeliberately NOT app.constants.PaymentGateway — that enum is LinktoDM's\nown gateways, and its RAZORPAY member is annotated \"legacy, no new\ncheckouts\" because of the Dodo migration. That annotation is false for a\ncreator's Razorpay account, which is fully supported here."},"PerformAutoDMPayload":{"properties":{"meta_api_mode":{"$ref":"#/components/schemas/MetaAPIMode"},"comment_id":{"type":"string","title":"Comment Id"},"media_id":{"type":"string","title":"Media Id"},"recepient_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recepient Username"},"comment":{"type":"string","title":"Comment"},"recipient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Id"},"automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Automation Id"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"automation_rewind_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Automation Rewind Id"},"comment_already_sent":{"type":"boolean","title":"Comment Already Sent","default":false},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"},"is_ad":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Ad"}},"type":"object","required":["meta_api_mode","comment_id","media_id","comment"],"title":"PerformAutoDMPayload"},"PerformFlowAutomationPayload":{"properties":{"recipient_id":{"type":"string","title":"Recipient Id"},"meta_api_mode":{"$ref":"#/components/schemas/MetaAPIMode"},"comment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment Id"},"media_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Id"},"recepient_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recepient Username"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"flow_automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Flow Automation Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"},"media_source":{"$ref":"#/components/schemas/MediaSource","default":"INSTAGRAM"},"postback_payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Postback Payload"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"is_story":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Story"},"share_media_ids":{"items":{"type":"string"},"type":"array","title":"Share Media Ids","default":[]},"share_asset_ids":{"items":{"type":"string"},"type":"array","title":"Share Asset Ids","default":[]},"story_mention_media_urls":{"items":{"type":"string"},"type":"array","title":"Story Mention Media Urls","default":[]},"is_echo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Echo"}},"type":"object","required":["recipient_id","meta_api_mode"],"title":"PerformFlowAutomationPayload"},"PerformInboxAutomationPayload":{"properties":{"message":{"type":"string","title":"Message"},"recipient_id":{"type":"string","title":"Recipient Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id","default":[null]},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id","default":[null]},"postback_payload":{"additionalProperties":true,"type":"object","title":"Postback Payload","default":{}}},"type":"object","required":["message","recipient_id"],"title":"PerformInboxAutomationPayload"},"PerformQuickReplyPayload":{"properties":{"automation_id":{"type":"integer","title":"Automation Id"},"quick_reply_id":{"type":"string","title":"Quick Reply Id"},"recipient_id":{"type":"string","title":"Recipient Id"},"meta_api_mode":{"$ref":"#/components/schemas/MetaAPIMode"},"recepient_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recepient Username"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"}},"type":"object","required":["automation_id","quick_reply_id","recipient_id","meta_api_mode"],"title":"PerformQuickReplyPayload","description":"A tap on one of an automation's DM quick-reply chips."},"PerformShareAutoDMPayload":{"properties":{"meta_api_mode":{"$ref":"#/components/schemas/MetaAPIMode"},"recipient_id":{"type":"string","title":"Recipient Id"},"asset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Id"},"media_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Id"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"}},"type":"object","required":["meta_api_mode","recipient_id"],"title":"PerformShareAutoDMPayload"},"PerformStoryAutoDMPayload":{"properties":{"message":{"type":"string","title":"Message"},"media_id":{"type":"string","title":"Media Id"},"recipient_id":{"type":"string","title":"Recipient Id"},"automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Automation Id"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"is_ad":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Ad"}},"type":"object","required":["message","media_id","recipient_id"],"title":"PerformStoryAutoDMPayload"},"PerformStoryMentionAutoDMPayload":{"properties":{"recipient_id":{"type":"string","title":"Recipient Id"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"}},"type":"object","required":["recipient_id"],"title":"PerformStoryMentionAutoDMPayload"},"PlainTextMessageFlowNode":{"properties":{"id":{"type":"string","title":"Id","description":"Unique node id within the flow. Use a UUID string (e.g. 'a7f3...'). Edges reference nodes by this id, so it must be stable once created.","examples":["b3c1f4a2-5d7e-4a9b-9c8d-1f2e3a4b5c6d"]},"position":{"$ref":"#/components/schemas/NodePosition","description":"Canvas coordinates for visual layout only. Has no effect on execution. Use `{x: 0, y: 0}` if you don't care about layout."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Parent node id for grouped children. Required cases: (1) trigger nodes (USER_COMMENT_TRIGGER, USER_SENDS_MESSAGE, USER_SHARE_POST, USER_STORY_MENTION) must have the TRIGGER_GROUP's id as parentId. (2) MESSAGE_BUTTON nodes must have their parent message node's id as parentId (the BUTTON_TEXT_MESSAGE / BUTTON_TEXT_IMAGE_MESSAGE / CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE). All other nodes leave this null."},"extent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extent","description":"XYFlow visual constraint. Usually 'parent' when parentId is set. Leave null otherwise; the frontend infers this."},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"XYFlow runtime layout field. Do NOT set when generating new nodes — the editor populates this."},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"measured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Measured","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"type":{"type":"string","const":"PLAIN_TEXT_MESSAGE","title":"Type","default":"PLAIN_TEXT_MESSAGE"},"data":{"$ref":"#/components/schemas/PlainTextNodeData"}},"additionalProperties":true,"type":"object","required":["id","position","data"],"title":"PlainTextMessageFlowNode","description":"Sends a plain text DM. The most common message node — use this for\nany text-only reply. Connect outgoing edge to the next step."},"PlainTextNodeData":{"properties":{"message":{"type":"string","title":"Message","description":"DM body text. Supports template variables that are replaced at send time with the contact's values: `{{username}}`, `{{email}}`, `{{phone}}`, `{{instagram_user_id}}`. Keep under Meta's 1000-char limit for DM text.","examples":["Hey {{username}}! Thanks for reaching out. How can I help?","Here's the link you asked for: https://example.com/pricing"]}},"additionalProperties":true,"type":"object","required":["message"],"title":"PlainTextNodeData","description":"Action: send a plain text DM to the user."},"PolicyFixAutomationPayload":{"properties":{"payload":{"$ref":"#/components/schemas/AutomationPayload","description":"The AutomationPayload being fixed."},"scan_result":{"$ref":"#/components/schemas/PolicyScanResponse"}},"type":"object","required":["payload","scan_result"],"title":"PolicyFixAutomationPayload","description":"Body for POST /api/v1/ai/policy_scan_auto_fix_automation.\n\nCarries the full draft AutomationPayload + the latest scan result so\nthe backend knows exactly which fields to rewrite and why. Typed end\nto end — FastAPI rejects malformed bodies at the boundary instead of\nsurfacing a KeyError mid-fix."},"PolicyFixAutomationResponse":{"properties":{"payload":{"$ref":"#/components/schemas/AutomationPayload"},"changes":{"items":{"$ref":"#/components/schemas/_RawFix"},"type":"array","title":"Changes"},"static_fixes_applied":{"items":{"type":"string"},"type":"array","title":"Static Fixes Applied","description":"Deterministic fixes applied without LLM (e.g. capping auto_reply_limit, generating extra variations). Each entry is a human-readable summary."},"attempts":{"type":"integer","minimum":1.0,"title":"Attempts","description":"How many fix → re-scan cycles the service ran before returning. 1 = first attempt produced a clean result. Higher values mean the model needed more rounds; if it equals MAX_FIX_ATTEMPTS the response may still contain unresolved violations (see static_fixes_applied for the 'reached max' note).","default":1},"verified_clean":{"type":"boolean","title":"Verified Clean","description":"True if the final re-scan returned verdict=allow. False means we hit the attempt cap with violations still present — the frontend should surface a manual-review hint to the user.","default":false}},"type":"object","required":["payload","changes"],"title":"PolicyFixAutomationResponse","description":"Response body for POST /api/v1/ai/policy_scan_auto_fix_automation.\n\nTyped payload — frontend can rely on the rewritten data matching the\nAutomationPayload shape without runtime coercion."},"PolicyFixFlowAutomationPayload":{"properties":{"payload":{"$ref":"#/components/schemas/FlowAutomationCreatePayload","description":"The FlowAutomationCreatePayload being fixed."},"scan_result":{"$ref":"#/components/schemas/PolicyScanResponse"}},"type":"object","required":["payload","scan_result"],"title":"PolicyFixFlowAutomationPayload","description":"Body for POST /api/v1/ai/policy_scan_auto_fix_flow_automation.\n\nCarries the full draft FlowAutomationCreatePayload + the latest scan\nresult. The node graph is validated against the discriminated FlowNode\nunion before the fixer ever sees it, so the fixer can rely on shapes\nmatching `app/api/v1/flow_automation/node_schemas.py`."},"PolicyFixFlowAutomationResponse":{"properties":{"payload":{"$ref":"#/components/schemas/FlowAutomationCreatePayload"},"changes":{"items":{"$ref":"#/components/schemas/_RawFix"},"type":"array","title":"Changes"},"static_fixes_applied":{"items":{"type":"string"},"type":"array","title":"Static Fixes Applied"},"attempts":{"type":"integer","minimum":1.0,"title":"Attempts","default":1},"verified_clean":{"type":"boolean","title":"Verified Clean","default":false}},"type":"object","required":["payload","changes"],"title":"PolicyFixFlowAutomationResponse","description":"Response body for POST /api/v1/ai/policy_scan_auto_fix_flow_automation.\n\nTyped payload — frontend reads the rewritten node graph directly into\nthe form's $formData without runtime type assertion."},"PolicyScanResponse":{"properties":{"automation_type":{"type":"string","enum":["automation","flow_automation"],"title":"Automation Type"},"scanned_at":{"type":"string","title":"Scanned At"},"policy_version":{"type":"string","title":"Policy Version"},"verdict":{"type":"string","enum":["allow","warn","block"],"title":"Verdict"},"verdict_message":{"type":"string","title":"Verdict Message"},"verdict_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verdict Category"},"totals":{"$ref":"#/components/schemas/ScanTotals"},"highest_severity":{"type":"string","enum":["none","low","medium","high"],"title":"Highest Severity"},"items":{"items":{"$ref":"#/components/schemas/ScanItemResult"},"type":"array","title":"Items"}},"type":"object","required":["automation_type","scanned_at","policy_version","verdict","verdict_message","totals","highest_severity","items"],"title":"PolicyScanResponse","description":"Response body for the policy_scan_automation / policy_scan_flow_automation\nendpoints. Pre-creation scans, so no automation_id is present.\n\nNote: model name is intentionally NOT exposed in the response. It's\ncaptured in Axiom logs for ops/cost monitoring but kept private —\ncallers shouldn't depend on it."},"PolicyScanSummary":{"properties":{"total":{"type":"integer","title":"Total"},"daily":{"$ref":"#/components/schemas/app__api__v1__admin_console__ai_usage__schemas__PeriodComparison"},"weekly":{"$ref":"#/components/schemas/app__api__v1__admin_console__ai_usage__schemas__PeriodComparison"},"monthly":{"$ref":"#/components/schemas/app__api__v1__admin_console__ai_usage__schemas__PeriodComparison"},"by_verdict":{"items":{"$ref":"#/components/schemas/LabelCount"},"type":"array","title":"By Verdict"},"by_severity":{"items":{"$ref":"#/components/schemas/LabelCount"},"type":"array","title":"By Severity"},"by_endpoint":{"items":{"$ref":"#/components/schemas/LabelCount"},"type":"array","title":"By Endpoint"},"by_model":{"items":{"$ref":"#/components/schemas/LabelCount"},"type":"array","title":"By Model"},"latency":{"$ref":"#/components/schemas/LatencyStats"},"fail_open_count":{"type":"integer","title":"Fail Open Count"},"fail_open_rate":{"type":"number","title":"Fail Open Rate"},"avg_fix_attempts":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Fix Attempts"},"verified_clean_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Verified Clean Rate"},"tokens_tracked_in_axiom":{"type":"boolean","title":"Tokens Tracked In Axiom","default":true}},"type":"object","required":["total","daily","weekly","monthly","by_verdict","by_severity","by_endpoint","by_model","latency","fail_open_count","fail_open_rate"],"title":"PolicyScanSummary"},"ProcessStatus":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","COMPLETED","FAILED","CANCELLED"],"title":"ProcessStatus","description":"Process status."},"ProductLink":{"properties":{"url":{"type":"string","title":"Url"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"url_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url Label"},"addition_buttons":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdditionButtonSchema"},"type":"array"},{"type":"null"}],"title":"Addition Buttons","default":[]}},"type":"object","required":["url"],"title":"ProductLink"},"PromoCodesAnalyticsResponse":{"properties":{"promo_codes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Promo Codes"}},"type":"object","required":["promo_codes"],"title":"PromoCodesAnalyticsResponse"},"PruneContactEventsResponse":{"properties":{"deleted_events":{"type":"integer","title":"Deleted Events"},"older_than_days":{"type":"integer","title":"Older Than Days"}},"type":"object","required":["deleted_events","older_than_days"],"title":"PruneContactEventsResponse"},"PublishMediaPayload":{"properties":{"container_id":{"type":"string","title":"Container Id"},"instagram_user_id":{"type":"string","title":"Instagram User Id"}},"type":"object","required":["container_id","instagram_user_id"],"title":"PublishMediaPayload"},"QuestionTaps":{"properties":{"question":{"type":"string","title":"Question"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["question","count"],"title":"QuestionTaps"},"QueueActionPayload":{"properties":{"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"},"channel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"},"action":{"$ref":"#/components/schemas/QueueActions"}},"type":"object","required":["action"],"title":"QueueActionPayload"},"QueueActionResponse":{"properties":{"success":{"type":"boolean","title":"Success"}},"type":"object","required":["success"],"title":"QueueActionResponse"},"QueueActions":{"type":"string","enum":["PAUSE","RESUME","PURGE"],"title":"QueueActions","description":"Queue state."},"QueueDetailsResponse":{"properties":{"state":{"$ref":"#/components/schemas/QueueState"},"dm_task_count":{"type":"integer","title":"Dm Task Count"},"follow_up_task_count":{"type":"integer","title":"Follow Up Task Count"},"total_task_count":{"type":"integer","title":"Total Task Count"},"speed":{"type":"integer","title":"Speed"}},"type":"object","required":["state","dm_task_count","follow_up_task_count","total_task_count","speed"],"title":"QueueDetailsResponse"},"QueueSizeResponse":{"properties":{"size":{"type":"integer","title":"Size"}},"type":"object","required":["size"],"title":"QueueSizeResponse"},"QueueSpeedPayload":{"properties":{"instagram_user_id":{"type":"string","title":"Instagram User Id"},"speed":{"type":"integer","title":"Speed"}},"type":"object","required":["instagram_user_id","speed"],"title":"QueueSpeedPayload"},"QueueState":{"type":"string","enum":["RUNNING","PAUSED","DISABLED"],"title":"QueueState"},"QuickReplyAction":{"type":"string","enum":["SEND_MESSAGE","CONNECT_AUTOMATION","NOTHING"],"title":"QuickReplyAction","description":"What tapping a quick-reply chip does."},"QuickReplySchema":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"action":{"$ref":"#/components/schemas/QuickReplyAction"},"message_type":{"anyOf":[{"$ref":"#/components/schemas/app__api__v1__automation__schemas__AutomationType"},{"type":"null"}]},"dm_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dm Message"},"automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Automation Id"},"flow_automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Flow Automation Id"}},"type":"object","required":["label","action"],"title":"QuickReplySchema","description":"A tappable chip shown under the DM message.\n\nLike `AutomationDmVariationSchema` this carries no validators of its own:\n`check_quick_replies` holds the rules, so the payload validator can skip\nthem for drafts the way it does for every other cross-field check."},"RandomizerFlowNode":{"properties":{"id":{"type":"string","title":"Id","description":"Unique node id within the flow. Use a UUID string (e.g. 'a7f3...'). Edges reference nodes by this id, so it must be stable once created.","examples":["b3c1f4a2-5d7e-4a9b-9c8d-1f2e3a4b5c6d"]},"position":{"$ref":"#/components/schemas/NodePosition","description":"Canvas coordinates for visual layout only. Has no effect on execution. Use `{x: 0, y: 0}` if you don't care about layout."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Parent node id for grouped children. Required cases: (1) trigger nodes (USER_COMMENT_TRIGGER, USER_SENDS_MESSAGE, USER_SHARE_POST, USER_STORY_MENTION) must have the TRIGGER_GROUP's id as parentId. (2) MESSAGE_BUTTON nodes must have their parent message node's id as parentId (the BUTTON_TEXT_MESSAGE / BUTTON_TEXT_IMAGE_MESSAGE / CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE). All other nodes leave this null."},"extent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extent","description":"XYFlow visual constraint. Usually 'parent' when parentId is set. Leave null otherwise; the frontend infers this."},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"XYFlow runtime layout field. Do NOT set when generating new nodes — the editor populates this."},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"measured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Measured","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"type":{"type":"string","const":"RANDOMIZER","title":"Type","default":"RANDOMIZER"},"data":{"$ref":"#/components/schemas/RandomizerNodeData"}},"additionalProperties":true,"type":"object","required":["id","position","data"],"title":"RandomizerFlowNode","description":"Splits traffic across its outgoing paths by percentage. Each path has\nits own `source_handle`; the matching edge must carry it as `sourceHandle`\nor that share of contacts dead-ends at this node."},"RandomizerNodeData":{"properties":{"paths":{"items":{"$ref":"#/components/schemas/RandomizerPath"},"type":"array","title":"Paths","description":"The outgoing paths, in editor order (first is 'A'). An empty list means the node is unconfigured and the flow stops there."},"random_every_time":{"type":"boolean","title":"Random Every Time","description":"false (default): a contact is pinned to the path it first landed on, so re-entering the flow cannot move them between variants and A/B results stay readable. true: re-roll on every execution.","default":false}},"additionalProperties":true,"type":"object","title":"RandomizerNodeData","description":"Action: split traffic across 2-26 outgoing paths by percentage.\n\nDeliberately permissive on read: `paths` may be empty and the percentages\nneed not total 100. Stored node data is re-validated every time a flow is\nloaded, so a strict rule here would take a live automation offline over a\ndistribution the editor itself allows the user to save."},"RandomizerPath":{"properties":{"source_handle":{"type":"string","title":"Source Handle","description":"Outgoing handle id for this path. A uuid generated by the editor; the matching FlowEdge carries it as `sourceHandle`.","examples":["b3c1f4a2-5d7e-4a9b-9c8d-1f2e3a4b5c6d"]},"percentage":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Percentage","description":"Share of traffic for this path. The editor keeps the paths summing to 100 but does not enforce it, so the executor treats these as relative weights and normalises by their actual total. A path at 0 never receives traffic.","default":0,"examples":[40,25,10]}},"type":"object","required":["source_handle"],"title":"RandomizerPath","description":"One outgoing path of a RANDOMIZER node. The editor labels paths A…Z by\nposition and never stores the letter, so `source_handle` is the only stable\nidentity a path has — edges are keyed by it."},"RazorpayPeriod":{"type":"string","enum":["daily","weekly","monthly","yearly","prepaid_1_month","prepaid_3_months","prepaid_6_months","prepaid_12_months"],"title":"RazorpayPeriod","description":"RazorPay period."},"RazorpaySubscriptionOrPaymentResponse":{"properties":{"type":{"type":"string","title":"Type"}},"additionalProperties":true,"type":"object","required":["type"],"title":"RazorpaySubscriptionOrPaymentResponse","description":"Response model for Razorpay subscription or payment object.\n\nThis model accepts the full Razorpay object (subscription or payment)\nand includes a type field to indicate which one it is."},"ReferralEarningsResponse":{"properties":{"affiliates":{"items":{"$ref":"#/components/schemas/AffiliateEarningsRow"},"type":"array","title":"Affiliates"}},"type":"object","required":["affiliates"],"title":"ReferralEarningsResponse"},"ReferralPayoutListResponse":{"properties":{"docs":{"items":{"$ref":"#/components/schemas/ReferralPayoutResponse"},"type":"array","title":"Docs"},"total":{"type":"integer","title":"Total"},"total_paid_by_currency":{"additionalProperties":{"type":"integer"},"type":"object","title":"Total Paid By Currency"}},"type":"object","required":["docs","total","total_paid_by_currency"],"title":"ReferralPayoutListResponse"},"ReferralPayoutResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"amount_minor":{"type":"integer","title":"Amount Minor"},"currency":{"$ref":"#/components/schemas/CurrencyEnum"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"transaction_at":{"type":"string","format":"date-time","title":"Transaction At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","amount_minor","currency","transaction_at","created_at"],"title":"ReferralPayoutResponse"},"ReferralState":{"type":"string","enum":["LOCKED_FREE","LOCKED_FOLLOWERS","ELIGIBLE","ACTIVATED"],"title":"ReferralState","description":"Where a member stands in the referral programme.\n\nLOCKED_FREE       no paid plan\nLOCKED_FOLLOWERS  paid, but no Instagram account over the follower bar\nELIGIBLE          allowed a code, hasn't activated one yet\nACTIVATED         holds a live code"},"ReferralsAnalyticsResponse":{"properties":{"referrals":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Referrals"}},"type":"object","required":["referrals"],"title":"ReferralsAnalyticsResponse"},"ReferredUserPagiantionSchema":{"properties":{"total":{"type":"integer","title":"Total"},"docs":{"items":{},"type":"array","title":"Docs"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Offset"},"active_subscription_total":{"type":"integer","title":"Active Subscription Total","default":0},"total_earnings_with_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Total Earnings With Currency"},"total_earnings":{"anyOf":[{"type":"integer"},{"type":"number"},{"type":"null"}],"title":"Total Earnings"},"already_paid_with_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Already Paid With Currency"},"already_paid":{"anyOf":[{"type":"integer"},{"type":"number"},{"type":"null"}],"title":"Already Paid"}},"type":"object","required":["total","docs"],"title":"ReferredUserPagiantionSchema"},"ReferredUserRow":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"has_active_subscription":{"type":"boolean","title":"Has Active Subscription"}},"type":"object","required":["id","created_at","has_active_subscription"],"title":"ReferredUserRow","description":"One user referred by an affiliate (for the drill-down modal)."},"RefferalEventType":{"type":"string","enum":["URL_CLICKED","USER_REGISTERED"],"title":"RefferalEventType","description":"Enum for event type."},"RefreshFollowersCountResponse":{"properties":{"channel_id":{"type":"string","title":"Channel Id"},"followers_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Followers Count"}},"type":"object","required":["channel_id"],"title":"RefreshFollowersCountResponse"},"RefreshStatsRollupDispatchResponse":{"properties":{"dispatched":{"type":"integer","title":"Dispatched"},"failed":{"type":"integer","title":"Failed","default":0}},"type":"object","required":["dispatched"],"title":"RefreshStatsRollupDispatchResponse","description":"Response from the rollup-refresh dispatcher. `dispatched` is the\nnumber of per-automation tasks successfully enqueued onto the GCP\nCloud Tasks queue; `failed` is the number that raised during enqueue\n(each failure is logged with its automation_id and kind)."},"RefreshStatsRollupForAutomationPayload":{"properties":{"user_id":{"type":"integer","title":"User Id"},"automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Automation Id"},"flow_automation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Flow Automation Id"}},"type":"object","required":["user_id"],"title":"RefreshStatsRollupForAutomationPayload","description":"Payload for the per-automation rollup-refresh worker. Dispatched\nby `/v1/stats/refresh_rollup_all_automations` and consumed by\n`/v1/stats/refresh_rollup_for_automation`.\n\nExactly one of `automation_id` (normal automation) / `flow_automation_id`\n(flow automation) must be set — the validator below rejects requests\nthat fail this. Matches the shape of the underlying\n`automation_stats_lifetime` table."},"RefreshStatsRollupForAutomationResponse":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"RefreshStatsRollupForAutomationResponse","description":"Response from the per-automation rollup-refresh worker. `status`\nis either `ok` (delta applied / row upserted) or `skipped` (the new\nwatermark wouldn't advance past the existing one, so no work was\ndone)."},"RelatedBlogItem":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"slug":{"type":"string","title":"Slug"},"meta_description":{"type":"string","title":"Meta Description"},"hero_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hero Image Url"}},"type":"object","required":["id","title","slug","meta_description"],"title":"RelatedBlogItem","description":"One entry of a post's \"Related blogs\" section — enough to render a\nlink card without another fetch."},"RemoveContactTagActionItem":{"properties":{"type":{"type":"string","const":"REMOVE_CONTACT_TAG","title":"Type","default":"REMOVE_CONTACT_TAG"},"data":{"$ref":"#/components/schemas/TagActionData"}},"type":"object","required":["data"],"title":"RemoveContactTagActionItem","description":"Remove one or more tags from the contact."},"RemovedFeature":{"properties":{"feature":{"type":"string","title":"Feature"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["feature","reason"],"title":"RemovedFeature","description":"A feature stripped from a regular automation during a cross-channel copy."},"ReplyToCommentPayload":{"properties":{"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"},"comment_id":{"type":"string","title":"Comment Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["comment_id","message"],"title":"ReplyToCommentPayload"},"ResponseMappingItem":{"properties":{"json_path":{"type":"string","title":"Json Path","description":"JSONPath into the response JSON, e.g. '$.data.plan' or 'items[0].id'. The leading '$.' is optional; wildcards, slices and filters are supported. The first match is stored.","examples":["$.data.plan","result.score","items[0].id"]},"field_key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","title":"Field Key","description":"Slug of the User Field to store the extracted value in.","examples":["plan_tier","crm_id"]}},"type":"object","required":["json_path","field_key"],"title":"ResponseMappingItem","description":"Map one value from the API response JSON into a custom User Field\non the contact. Applied only when the request succeeds (2xx) and the\nresponse body is JSON."},"ResponseType":{"type":"string","enum":["TEXT","BOOLEAN","NUMBER"],"title":"ResponseType","description":"Data type a condition resolves to. Determines which `check` operators\nand `value` shape are valid. BOOLEAN: true/false condition like\n'is verified'. NUMBER: comparable like follower count. TEXT: string\nlike contact email."},"ResumeFlowAutomationPayload":{"properties":{"flow_execution_id":{"type":"integer","title":"Flow Execution Id"},"next_node_ids":{"items":{"type":"string"},"type":"array","title":"Next Node Ids"},"flow_automation_payload":{"anyOf":[{"$ref":"#/components/schemas/PerformFlowAutomationPayload"},{"type":"null"}]}},"type":"object","required":["flow_execution_id","next_node_ids"],"title":"ResumeFlowAutomationPayload"},"RevokeResponse":{"properties":{"revoked":{"type":"boolean","const":true,"title":"Revoked","default":true}},"type":"object","title":"RevokeResponse","description":"RFC 7009 always reports success, so revoking an already-invalid\ntoken is not an oracle for whether it existed."},"RevokeUserPaymentProviderResponse":{"properties":{"id":{"type":"integer","title":"Id"},"success":{"type":"boolean","title":"Success","default":true},"revoked_at":{"type":"string","format":"date-time","title":"Revoked At"}},"type":"object","required":["id","revoked_at"],"title":"RevokeUserPaymentProviderResponse"},"RewindAutomationCommentsPayload":{"properties":{"automation_rewind_id":{"type":"integer","title":"Automation Rewind Id"},"comment_response":{"$ref":"#/components/schemas/InstagramCommentResponse"}},"type":"object","required":["automation_rewind_id","comment_response"],"title":"RewindAutomationCommentsPayload"},"RewindCommentStatus":{"type":"string","enum":["SENDING","SENT","SKIPPED","NO_MATCH","FAILED"],"title":"RewindCommentStatus","description":"What a backtrack run did with one comment it walked."},"RewindFeedItem":{"properties":{"comment_id":{"type":"string","title":"Comment Id"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"status":{"$ref":"#/components/schemas/RewindCommentStatus"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["comment_id","status","created_at"],"title":"RewindFeedItem","description":"One comment in a backtrack run's live feed (automation or flow run)."},"RewindFeedResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RewindFeedItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"RewindFeedResponse","description":"The latest comments of a backtrack run that matched, newest first."},"RowsResponse":{"properties":{"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"}},"type":"object","required":["rows"],"title":"RowsResponse","description":"Generic envelope for the six 'latest 50' tables."},"ScanItemResult":{"properties":{"item_id":{"type":"string","title":"Item Id"},"item_type":{"type":"string","title":"Item Type"},"content_preview":{"type":"string","maxLength":120,"title":"Content Preview"},"status":{"type":"string","enum":["scanned","scan_failed"],"title":"Status"},"highest_severity":{"type":"string","enum":["none","low","medium","high"],"title":"Highest Severity"},"violations":{"items":{"$ref":"#/components/schemas/Violation"},"type":"array","title":"Violations"}},"type":"object","required":["item_id","item_type","content_preview","status","highest_severity"],"title":"ScanItemResult","description":"Per-item result returned to the client."},"ScanTotals":{"properties":{"items_total":{"type":"integer","title":"Items Total"},"items_scanned":{"type":"integer","title":"Items Scanned"},"items_failed":{"type":"integer","title":"Items Failed"},"items_with_violations":{"type":"integer","title":"Items With Violations"}},"type":"object","required":["items_total","items_scanned","items_failed","items_with_violations"],"title":"ScanTotals"},"ScheduleUserDeletionResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"detail":{"type":"string","title":"Detail"},"deletion_scheduled_at":{"type":"string","format":"date-time","title":"Deletion Scheduled At"}},"type":"object","required":["success","detail","deletion_scheduled_at"],"title":"ScheduleUserDeletionResponse","description":"Response for a scheduled (delayed) account deletion."},"ScopeDescriptor":{"properties":{"scope":{"type":"string","title":"Scope"},"description":{"type":"string","title":"Description"}},"type":"object","required":["scope","description"],"title":"ScopeDescriptor","description":"One permission, rendered as a line item on the consent screen."},"SendAutomationDMPayload":{"properties":{"automation_id":{"type":"integer","title":"Automation Id"},"recipient_id":{"type":"string","title":"Recipient Id"},"recepient_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recepient Username"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"},"payload_type":{"anyOf":[{"$ref":"#/components/schemas/MessagePayloadType"},{"type":"null"}]}},"type":"object","required":["automation_id","recipient_id"],"title":"SendAutomationDMPayload"},"SendEmailFromCsvResponse":{"properties":{"total_rows":{"type":"integer","title":"Total Rows"},"sent":{"type":"integer","title":"Sent"},"skipped":{"items":{"$ref":"#/components/schemas/SkippedRow"},"type":"array","title":"Skipped"},"batches":{"type":"integer","title":"Batches"}},"type":"object","required":["total_rows","sent","skipped","batches"],"title":"SendEmailFromCsvResponse","description":"Outcome of a CSV upload send.\n\n`sent` counts recipients ZeptoMail accepted, not recipients who received\nthe mail — delivery is asynchronous and reported by webhook."},"SendEmailVerificationPayload":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"SendEmailVerificationPayload"},"SendFollowUpMessagePayload":{"properties":{"follow_up_message_id":{"type":"integer","title":"Follow Up Message Id"},"recipient_id":{"type":"string","title":"Recipient Id"},"recepient_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recepient Username"},"from_message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Message Id"},"to_dm_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Dm Id"},"reaction_emoji":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reaction Emoji"}},"type":"object","required":["follow_up_message_id","recipient_id"],"title":"SendFollowUpMessagePayload"},"SendMagicLinkPayload":{"properties":{"email":{"type":"string","title":"Email"},"as_team_member":{"type":"boolean","title":"As Team Member","default":false}},"type":"object","required":["email"],"title":"SendMagicLinkPayload"},"SendMessageOrPrivateReplyPayload":{"properties":{"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"attachment":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attachment"},"comment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment Id"},"recipient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Id"},"meta_api_mode":{"anyOf":[{"$ref":"#/components/schemas/MetaAPIMode"},{"type":"null"}]}},"type":"object","title":"SendMessageOrPrivateReplyPayload"},"SendMessagePayload":{"properties":{"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"},"recipient_id":{"type":"string","title":"Recipient Id"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"attachment":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attachment"},"quick_replies":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Quick Replies"},"meta_api_mode":{"anyOf":[{"$ref":"#/components/schemas/MetaAPIMode"},{"type":"null"}]}},"type":"object","required":["recipient_id"],"title":"SendMessagePayload"},"SendPrivateReplyPayload":{"properties":{"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"},"comment_id":{"type":"string","title":"Comment Id"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"attachment":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attachment"},"quick_replies":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Quick Replies"}},"type":"object","required":["comment_id"],"title":"SendPrivateReplyPayload"},"SendReferralEmailPayload":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"refferal_url":{"type":"string","title":"Refferal Url"}},"type":"object","required":["email","refferal_url"],"title":"SendReferralEmailPayload"},"SendToZapierActionItem":{"properties":{"type":{"type":"string","const":"SEND_TO_ZAPIER","title":"Type","default":"SEND_TO_ZAPIER"},"data":{"$ref":"#/components/schemas/SendToZapierConfig"}},"type":"object","required":["data"],"title":"SendToZapierActionItem","description":"Send the contact to any Zap listening for this event name."},"SendToZapierConfig":{"properties":{"event_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Event Name","description":"Name creators pick this event in Zapier by. Anything unique and readable, e.g. 'New booking'.","examples":["New booking"]},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/ZapierDataItem"},"type":"array"},{"type":"null"}],"title":"Data","description":"Extra key/value pairs to send alongside the contact."}},"type":"object","title":"SendToZapierConfig","description":"Config for a SEND_TO_ZAPIER action — pushes the contact, plus any\nextra data, to every Zap subscribed to this event name.\n\nUnlike EXTERNAL_API_REQUEST, the creator never copies a webhook URL:\nZapier registers its own endpoint through the public API, and this\naction just names the event. Mirrors ManyChat's \"Trigger a Zap\" block.\n\nEvery field is optional on purpose. Stored node data re-validates on\nmany read paths including live webhook execution, so a required field\nhere would silently take running automations offline the moment an\nolder node was loaded. Presence of `event_name` is enforced at the\npayload boundary instead."},"SetPromoCodePayload":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"SetPromoCodePayload","description":"A code the member picked for themselves."},"SetUserFieldActionItem":{"properties":{"type":{"type":"string","const":"SET_USER_FIELD","title":"Type","default":"SET_USER_FIELD"},"data":{"$ref":"#/components/schemas/SetUserFieldConfig"}},"type":"object","required":["data"],"title":"SetUserFieldActionItem","description":"Write or clear one custom User Field on the contact, then continue.\nThe stored value can be reused later via `{{user.<slug>}}` in messages\nor branched on with a CONTACT_FIELD condition."},"SetUserFieldConfig":{"properties":{"field_key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","title":"Field Key","description":"Slug of an existing User Field for this business — the immutable lowercase snake_case key from the field definition, NOT its display name.","examples":["appointment_date","plan_tier","lead_score"]},"operation":{"type":"string","enum":["SET","CLEAR"],"title":"Operation","description":"SET overwrites the contact's value; CLEAR removes it.","default":"SET"},"value":{"type":"string","maxLength":2000,"title":"Value","description":"Value to store, or a template: `{{system.last_input}}` (the user's most recent reply), `{{user.<slug>}}`, `{{system.email}}`, `{{system.username}}` … Coerced server-side to the field's declared type — NUMBER: '42', DATE/DATETIME: ISO '2026-08-01', BOOLEAN: 'true'/'false', ARRAY: '[\"a\",\"b\"]'. Ignored when operation=CLEAR.","default":"","examples":["{{system.last_input}}","premium","2026-08-01","true"]}},"type":"object","required":["field_key"],"title":"SetUserFieldConfig","description":"Config for a SET_USER_FIELD action — write or clear one custom\nUser Field on the contact."},"SkippedRow":{"properties":{"row":{"type":"integer","title":"Row"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["row","reason"],"title":"SkippedRow","description":"A CSV row that was not mailed, and why."},"SourceHandle":{"type":"string","enum":["SUCCESS","FAILED"],"title":"SourceHandle","description":"Outgoing edge handle on a node with multiple branches.\nSUCCESS: condition matched / step completed normally.\nFAILED: condition did not match / step errored. CONDITION nodes always\nexpose both; most other nodes expose only SUCCESS."},"SourceType":{"type":"string","enum":["FACEBOOK","INSTAGRAM"],"title":"SourceType","description":"Enum for source type."},"StatsExtendedOverviewResponse":{"properties":{"dms_sent":{"type":"integer","title":"Dms Sent"},"follows":{"type":"integer","title":"Follows"},"contacts":{"type":"integer","title":"Contacts"}},"type":"object","required":["dms_sent","follows","contacts"],"title":"StatsExtendedOverviewResponse","description":"Conversion-side aggregate counts for the current user. Split from\n`StatsOverviewResponse` because these branches scan substantially more\nrows for high-volume users (notably the contacts and follows branches).\n\n- `dms_sent`: DMs successfully sent — `event_tracker.AUTODM_DM_SENT` for\n  normal automations plus `flow_execution_step` rows whose `node_type` is\n  one of the four message-sending node types (PLAIN_TEXT_MESSAGE,\n  BUTTON_TEXT_MESSAGE, BUTTON_TEXT_IMAGE_MESSAGE,\n  CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE) and whose `status` is COMPLETED.\n- `follows`: distinct users who received a follow request from a normal\n  automation and were subsequently sent a DM — same logic as\n  `event_tracker.get_new_followers_summary` but user-wide rather than\n  per-automation.\n- `contacts`: count of `contact` rows for the user. For `range=all` this\n  is the lifetime audience size; for any other range it's contacts first\n  seen within the window (i.e. contacts gained).\n\nCTR is derived on the frontend as `clicks / dms_sent`, so CTR only\nrenders once both this endpoint and `/v1/stats/overview` resolve."},"StatsExtendedTimeseriesResponse":{"properties":{"labels":{"items":{"type":"string"},"type":"array","title":"Labels"},"dms_sent":{"items":{"type":"integer"},"type":"array","title":"Dms Sent"},"follows":{"items":{"type":"integer"},"type":"array","title":"Follows"},"contacts":{"items":{"type":"integer"},"type":"array","title":"Contacts"}},"type":"object","required":["labels","dms_sent","follows","contacts"],"title":"StatsExtendedTimeseriesResponse","description":"Per-bucket time series matching `StatsExtendedOverviewResponse`\n(dms_sent + follows + contacts). Same bucketing rules as\n`StatsTimeseriesResponse`."},"StatsOverviewResponse":{"properties":{"hits":{"type":"integer","title":"Hits"},"clicks":{"type":"integer","title":"Clicks"},"dms_sent":{"type":"integer","title":"Dms Sent"},"ctr":{"type":"number","title":"Ctr"}},"type":"object","required":["hits","clicks","dms_sent","ctr"],"title":"StatsOverviewResponse","description":"Top-of-funnel aggregate counts for the current user, scoped to the\nrequested time range. Kept intentionally light so it answers fast — the\ngenuinely heavy metrics (follows self-join, contacts scan) live on\n`/v1/stats/extended_overview`.\n\n- `hits`: trigger matches across both surfaces — comments matched by a\n  normal automation keyword (`event_tracker.AUTODM_KEYWORD_FOUND`) plus\n  flow automation triggers fired (`flow_event_tracker.FLOW_TRIGGER_FOUND`).\n- `clicks`: tracked-URL clicks across both surfaces\n  (`event_tracker.URL_CLICKED` + flow `URL_CLICKED` / `BUTTON_CLICKED`).\n- `dms_sent`: DMs sent — `event_tracker.AUTODM_DM_SENT` for normal\n  automations plus completed message-type `flow_execution_step` rows for\n  flow automations. Cheap to count, so it lives here (next to clicks)\n  rather than on the extended endpoint, letting the page render CTR\n  without a second round-trip.\n- `ctr`: click-through rate as a percentage, `clicks / dms_sent * 100`,\n  rounded to 2 decimals. `0.0` when `dms_sent` is 0 (no divide-by-zero)."},"StatsRange":{"type":"string","enum":["all","24h","7d","30d"],"title":"StatsRange","description":"Time-range window applied to every metric on the stats page.\n\nMirrors the frontend tabs (`All time / 24 hours / 7 days / 30 days`)."},"StatsTimeseriesResponse":{"properties":{"labels":{"items":{"type":"string"},"type":"array","title":"Labels"},"hits":{"items":{"type":"integer"},"type":"array","title":"Hits"},"clicks":{"items":{"type":"integer"},"type":"array","title":"Clicks"}},"type":"object","required":["labels","hits","clicks"],"title":"StatsTimeseriesResponse","description":"Per-bucket time series matching `StatsOverviewResponse` (hits + clicks).\n\nBucket granularity is derived from `range`:\n  - `24h` → hour buckets (24 points, past 24 hours)\n  - `7d`  → day buckets  (7 points,  past 7 days)\n  - `30d` → day buckets  (30 points, past 30 days)\n  - `all` → month buckets (12 points, past 12 months including current)\n\n`labels` are ISO-8601 bucket-start timestamps (UTC); the frontend formats\nthem for display based on the active range. Every metric array has the\nsame length as `labels`; missing buckets are zero-filled server-side."},"StepDelay":{"properties":{"delay_in_seconds":{"type":"integer","exclusiveMinimum":0.0,"title":"Delay In Seconds"},"delay_unit":{"$ref":"#/components/schemas/DelayUnit","default":"SECONDS"}},"type":"object","required":["delay_in_seconds"],"title":"StepDelay","description":"Wait applied before a step runs, relative to the previous step."},"StoreContactUsageForUserPayload":{"properties":{"user_id":{"type":"integer","title":"User Id"}},"type":"object","required":["user_id"],"title":"StoreContactUsageForUserPayload"},"SubscribeWebhooksPayload":{"properties":{"instagram_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram User Id"},"instagram_business_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Business Account Id"},"facebook_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook Account Id"}},"type":"object","title":"SubscribeWebhooksPayload","description":"Exactly one of these must be set to unsubscribe from webhooks."},"SubscriptionProductName":{"type":"string","enum":["Pro","Pro+"],"title":"SubscriptionProductName"},"SubscriptionProductResponse":{"properties":{"name":{"$ref":"#/components/schemas/SubscriptionProductName"},"payment_gateway":{"anyOf":[{"$ref":"#/components/schemas/PaymentGateway"},{"type":"null"}]},"variants":{"items":{"$ref":"#/components/schemas/SubscriptionVariantResponse"},"type":"array","title":"Variants","default":[]}},"type":"object","required":["name"],"title":"SubscriptionProductResponse"},"SubscriptionRow":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At"},"subscription_id":{"type":"integer","title":"Subscription Id"},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"payment_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Provider"},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"firebase_uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firebase Uid"},"provider_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Subscription Id"},"razorpay_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Razorpay Subscription Id"},"razorpay_payment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Razorpay Payment Id"},"lemon_squeezy_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lemon Squeezy Subscription Id"},"dodo_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dodo Subscription Id"},"variant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant"},"GST_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gst Name"},"GST":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gst"}},"type":"object","required":["subscription_id"],"title":"SubscriptionRow","description":"Wide row used by the active/inactive/manual/referral tables.\n\nFields are optional because each query selects a slightly different set;\nthe union is captured here so the frontend can render them with one\ntable component."},"SubscriptionStatus":{"type":"string","enum":["on_trial","active","paused","past_due","unpaid","cancelled","expired","created"],"title":"SubscriptionStatus"},"SubscriptionVariantFeature":{"properties":{"name":{"type":"string","title":"Name"},"is_included":{"type":"boolean","title":"Is Included"}},"type":"object","required":["name","is_included"],"title":"SubscriptionVariantFeature"},"SubscriptionVariantResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"product_name":{"$ref":"#/components/schemas/SubscriptionProductName"},"interval":{"type":"string","title":"Interval"},"price_per_month_formatted":{"type":"string","title":"Price Per Month Formatted"},"price_per_month_in_cents":{"type":"integer","title":"Price Per Month In Cents"},"savings_per_month_formatted":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Savings Per Month Formatted"},"savings_per_month_in_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Savings Per Month In Cents"},"total_savings_formatted":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Total Savings Formatted"},"total_savings_in_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Savings In Cents"},"price_formatted":{"type":"string","title":"Price Formatted"},"price_in_cents":{"type":"integer","title":"Price In Cents"},"subtotal_in_cents":{"type":"number","title":"Subtotal In Cents"},"subtotal_formatted":{"type":"string","title":"Subtotal Formatted"},"currency_symbol":{"type":"string","title":"Currency Symbol"},"tax_formatted":{"type":"string","title":"Tax Formatted"},"tax_in_cents":{"type":"number","title":"Tax In Cents"},"total_formatted":{"type":"string","title":"Total Formatted"},"total_in_cents":{"type":"number","title":"Total In Cents"},"razorpay_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Razorpay Subscription Id"},"razorpay_order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Razorpay Order Id"},"checkout_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Token"},"razorpay_period":{"anyOf":[{"$ref":"#/components/schemas/RazorpayPeriod"},{"type":"null"}]},"checkout_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Url"},"is_prepaid":{"type":"boolean","title":"Is Prepaid","default":false},"applied_promo_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Applied Promo Code"},"discount_percent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Discount Percent"},"discount_in_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Discount In Cents"},"discount_formatted":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discount Formatted"},"tax_percentage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tax Percentage"},"features":{"items":{"$ref":"#/components/schemas/SubscriptionVariantFeature"},"type":"array","title":"Features","default":[]}},"type":"object","required":["id","name","product_name","interval","price_per_month_formatted","price_per_month_in_cents","price_formatted","price_in_cents","subtotal_in_cents","subtotal_formatted","currency_symbol","tax_formatted","tax_in_cents","total_formatted","total_in_cents"],"title":"SubscriptionVariantResponse"},"SubscriptionsAnalyticsResponse":{"properties":{"mrr":{"$ref":"#/components/schemas/MRRBreakdown"},"revenue_per_month":{"items":{"$ref":"#/components/schemas/XYPoint"},"type":"array","title":"Revenue Per Month"},"active_count":{"type":"integer","title":"Active Count"},"active":{"items":{"$ref":"#/components/schemas/SubscriptionRow"},"type":"array","title":"Active"},"inactive":{"items":{"$ref":"#/components/schemas/SubscriptionRow"},"type":"array","title":"Inactive"},"referral":{"items":{"$ref":"#/components/schemas/SubscriptionRow"},"type":"array","title":"Referral"},"cancellation_feedback":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Cancellation Feedback"}},"type":"object","required":["mrr","revenue_per_month","active_count","active","inactive","referral","cancellation_feedback"],"title":"SubscriptionsAnalyticsResponse"},"TagActionData":{"properties":{"tag_names":{"items":{"type":"string"},"type":"array","title":"Tag Names","description":"Tag names to add or remove. Tags are created on-the-fly if they don't exist (for ADD). Case-sensitive.","examples":[["lead","from-instagram"]]}},"type":"object","required":["tag_names"],"title":"TagActionData","description":"Config for ADD_CONTACT_TAG / REMOVE_CONTACT_TAG actions."},"TeamMemberPayload":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"role":{"$ref":"#/components/schemas/TeamMemberRole"}},"type":"object","required":["name","email","role"],"title":"TeamMemberPayload"},"TeamMemberResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"role":{"$ref":"#/components/schemas/TeamMemberRole"},"is_verified":{"type":"boolean","title":"Is Verified"}},"type":"object","required":["id","name","email","role","is_verified"],"title":"TeamMemberResponse"},"TeamMemberRole":{"type":"string","enum":["ADMIN","EDITOR","VIEWER"],"title":"TeamMemberRole"},"TestExternalApiRequestPayload":{"properties":{"url":{"type":"string","maxLength":2000,"minLength":1,"title":"Url"},"method":{"$ref":"#/components/schemas/HttpMethod","default":"POST"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","required":["url"],"title":"TestExternalApiRequestPayload","description":"Payload for the server-side 'Test Request' of an EXTERNAL_API_REQUEST\naction. Runs on the API (not the browser) so third-party endpoints\nwithout CORS headers still work."},"TestExternalApiRequestResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"elapsed_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Elapsed Ms"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","default":{}},"body":{"type":"string","title":"Body","default":""},"resolved_url":{"type":"string","title":"Resolved Url","default":""},"resolved_body":{"type":"string","title":"Resolved Body","default":""},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["ok"],"title":"TestExternalApiRequestResponse","description":"Result of a test request. `error` is set when the request itself\nfailed (network/timeout/invalid URL); otherwise status/headers/body\ndescribe the third-party response."},"ToEmail":{"properties":{"address":{"type":"string","title":"Address"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["address"],"title":"ToEmail"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","const":"bearer","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In"},"refresh_token":{"type":"string","title":"Refresh Token"},"scope":{"type":"string","title":"Scope"}},"type":"object","required":["access_token","expires_in","refresh_token","scope"],"title":"TokenResponse","description":"RFC 6749 §5.1 token response."},"TokenSchema":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type"}},"type":"object","required":["access_token","token_type"],"title":"TokenSchema","description":"Access token."},"TokenTotals":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"total_tokens":{"type":"integer","title":"Total Tokens"}},"type":"object","required":["input_tokens","output_tokens","total_tokens"],"title":"TokenTotals"},"TokenType":{"type":"string","enum":["App","Client","Page","System User","User"],"title":"TokenType"},"TriggerGroupFlowNode":{"properties":{"id":{"type":"string","title":"Id","description":"Unique node id within the flow. Use a UUID string (e.g. 'a7f3...'). Edges reference nodes by this id, so it must be stable once created.","examples":["b3c1f4a2-5d7e-4a9b-9c8d-1f2e3a4b5c6d"]},"position":{"$ref":"#/components/schemas/NodePosition","description":"Canvas coordinates for visual layout only. Has no effect on execution. Use `{x: 0, y: 0}` if you don't care about layout."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Parent node id for grouped children. Required cases: (1) trigger nodes (USER_COMMENT_TRIGGER, USER_SENDS_MESSAGE, USER_SHARE_POST, USER_STORY_MENTION) must have the TRIGGER_GROUP's id as parentId. (2) MESSAGE_BUTTON nodes must have their parent message node's id as parentId (the BUTTON_TEXT_MESSAGE / BUTTON_TEXT_IMAGE_MESSAGE / CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE). All other nodes leave this null."},"extent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extent","description":"XYFlow visual constraint. Usually 'parent' when parentId is set. Leave null otherwise; the frontend infers this."},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"XYFlow runtime layout field. Do NOT set when generating new nodes — the editor populates this."},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"measured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Measured","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"type":{"type":"string","const":"TRIGGER_GROUP","title":"Type","default":"TRIGGER_GROUP"},"data":{"$ref":"#/components/schemas/TriggerGroupNodeData"}},"additionalProperties":true,"type":"object","required":["id","position","data"],"title":"TriggerGroupFlowNode","description":"The single root node of every flow. Acts as a container for all\ntrigger nodes (which set it as their `parentId`). Every flow MUST have\nexactly one of these, with `data={}`. Outgoing edges from this node\ngo to the first action node that runs after any trigger fires."},"TriggerGroupNodeData":{"properties":{},"additionalProperties":true,"type":"object","title":"TriggerGroupNodeData","description":"Data for the single TRIGGER_GROUP node at the root of every flow.\nHas no fields of its own; exists to group all trigger nodes as children\nvia their `parentId`. Use `{}` for this field."},"TypeVerificationStat":{"properties":{"automation_type":{"$ref":"#/components/schemas/app__api__v1__admin_console__automation_verification__models__AutomationType"},"created_last_week":{"type":"integer","title":"Created Last Week"},"verified_last_week":{"type":"integer","title":"Verified Last Week"},"pct_verified":{"type":"number","title":"Pct Verified"}},"type":"object","required":["automation_type","created_last_week","verified_last_week","pct_verified"],"title":"TypeVerificationStat","description":"Prev-7-day verification coverage for one automation type."},"UpdateBillingInformationPayload":{"properties":{"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"business_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"gst_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gst No"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"country_code":{"type":"string","title":"Country Code","default":"IN"}},"type":"object","title":"UpdateBillingInformationPayload"},"UpdateBlogPayload":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"meta_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta Description"},"language_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language Code"},"content_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Html"},"content_markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Markdown"},"hero_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hero Image Url"},"written_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Written By"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_draft":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Draft"},"related_blog_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Related Blog Ids"}},"type":"object","title":"UpdateBlogPayload","example":{"content_html":"<p>Updated content</p>","content_markdown":"Updated content","hero_image_url":"https://example.com/hero.png","is_active":true,"is_draft":false,"language_code":"en","meta_description":"Updated meta description","related_blog_ids":[1,2],"title":"Updated blog title","written_by":"Author Name"}},"UpdateSubscriptionPlanPayload":{"properties":{"subscription_id":{"type":"integer","title":"Subscription Id"},"product_name":{"$ref":"#/components/schemas/SubscriptionProductName"},"variant_id":{"type":"string","title":"Variant Id"}},"type":"object","required":["subscription_id","product_name","variant_id"],"title":"UpdateSubscriptionPlanPayload","description":"Payload to update a subscription's plan/variant (e.g. change product or billing interval)."},"UpdateUserPayload":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"picture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Picture"},"instagram_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram Account Id"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"creator_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Creator Types"}},"type":"object","title":"UpdateUserPayload","description":"Create User Payload."},"UploadAttachmentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"meta_attachment_id":{"type":"string","title":"Meta Attachment Id"},"file_url":{"type":"string","title":"File Url"},"type":{"$ref":"#/components/schemas/AttachmentType"},"channel_id":{"type":"string","title":"Channel Id"}},"type":"object","required":["id","meta_attachment_id","file_url","type","channel_id"],"title":"UploadAttachmentResponse"},"UploadImage":{"properties":{"image_url":{"type":"string","title":"Image Url"}},"type":"object","required":["image_url"],"title":"UploadImage"},"UserCommentTriggerData":{"properties":{"one_trigger_per_user":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"One Trigger Per User","description":"If True, this trigger fires at most once per contact within `one_trigger_per_user_window_hours`, even if they comment, message or share again. A skipped event sends nothing: no DM flow and no public auto-reply. Null/False = fire on every matching event."},"one_trigger_per_user_window_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"One Trigger Per User Window Hours","description":"Length of the per-contact window in hours. Null = 24. Max 168 (7 days) -- enforced on the create/update payload, deliberately NOT here (same read-path reason as `ai_prompt`)."},"media_selection_type":{"$ref":"#/components/schemas/MediaSelectionType","description":"Which post(s) this trigger watches. ALL: any post on the account. SPECIFIC: only the post identified by `media_id`. NEXT: the next post published after this flow is saved (server fills in `media_id` automatically once published)."},"media_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Id","description":"Instagram/Facebook media ID. Required when `media_selection_type=SPECIFIC`. Server fills this in for NEXT."},"media_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Url","description":"Permalink to the post; informational, used for UI display."},"include_keywords":{"items":{"type":"string"},"type":"array","title":"Include Keywords","description":"Comments matching any of these keywords trigger the flow. Ignored when `trigger_type=ANY`. Case-insensitive.","default":[],"examples":[["link","info","yes"]]},"exclude_keywords":{"items":{"type":"string"},"type":"array","title":"Exclude Keywords","description":"Comments matching any of these keywords are skipped, even if include_keywords match.","default":[]},"trigger_type":{"$ref":"#/components/schemas/MediaTriggerType","description":"How comments are filtered. ANY: every comment triggers. SPECIFIC_KEYWORDS: only comments matching `include_keywords`. AI: LLM decides whether the comment is on-topic (uses ai_prompt)."},"ai_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Prompt","description":"Instruction describing which comments/replies should fire the flow. Required when `trigger_type=AI`; ignored otherwise. Keep it to 100 characters or less -- that limit is enforced on the create/update payload, deliberately NOT here (see below).","examples":["Person asks about pricing","Person wants the catalog"]},"is_story":{"type":"boolean","title":"Is Story","description":"True if this trigger watches story replies/comments instead of feed posts. Stories use a separate webhook channel.","default":false},"enable_auto_reply":{"type":"boolean","title":"Enable Auto Reply","description":"If True, the bot also publicly replies to the comment in addition to sending the DM flow. Used to nudge users to check their DMs.","default":false},"auto_reply_mode":{"$ref":"#/components/schemas/AutoReplyMode","description":"How the public auto-reply text is produced when `enable_auto_reply=True`. MANUAL: pick one at random from `auto_reply_messages`. AI: generate per-comment using `auto_reply_ai_prompt`.","default":"MANUAL"},"auto_reply_messages":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Auto Reply Messages","description":"Pool of public reply texts; one is picked at random per match. Required when `enable_auto_reply=True` and `auto_reply_mode=MANUAL`.","default":[],"examples":[["Check your DMs!","Sent you a message 📩"]]},"auto_reply_ai_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auto Reply Ai Prompt","description":"Instructions passed to the LLM to generate the public reply. Required when `enable_auto_reply=True` and `auto_reply_mode=AI`.","examples":["Write a friendly one-line reply thanking the commenter."]},"auto_reply_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Auto Reply Limit","description":"Max public auto-replies per day on this post. Null = unlimited. Use to avoid spamming the comment section."},"auto_reply_delay_in_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Auto Reply Delay In Seconds","description":"Wait this long before posting the public reply; the DM flow still runs immediately. Null = reply straight away. Scheduled as a delayed Cloud Task, same as a basic automation's comment step."},"auto_reply_delay_unit":{"$ref":"#/components/schemas/DelayUnit","description":"Unit the user entered `auto_reply_delay_in_seconds` in. Display-only round-trip for the UI; scheduling always uses seconds.","default":"SECONDS"}},"additionalProperties":true,"type":"object","required":["media_selection_type","trigger_type"],"title":"UserCommentTriggerData","description":"Trigger: fires when a user comments on an Instagram post/reel/story\n(or a Facebook Page post). The most common entry point for comment-to-DM\nautomations."},"UserCommentTriggerFlowNode":{"properties":{"id":{"type":"string","title":"Id","description":"Unique node id within the flow. Use a UUID string (e.g. 'a7f3...'). Edges reference nodes by this id, so it must be stable once created.","examples":["b3c1f4a2-5d7e-4a9b-9c8d-1f2e3a4b5c6d"]},"position":{"$ref":"#/components/schemas/NodePosition","description":"Canvas coordinates for visual layout only. Has no effect on execution. Use `{x: 0, y: 0}` if you don't care about layout."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Parent node id for grouped children. Required cases: (1) trigger nodes (USER_COMMENT_TRIGGER, USER_SENDS_MESSAGE, USER_SHARE_POST, USER_STORY_MENTION) must have the TRIGGER_GROUP's id as parentId. (2) MESSAGE_BUTTON nodes must have their parent message node's id as parentId (the BUTTON_TEXT_MESSAGE / BUTTON_TEXT_IMAGE_MESSAGE / CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE). All other nodes leave this null."},"extent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extent","description":"XYFlow visual constraint. Usually 'parent' when parentId is set. Leave null otherwise; the frontend infers this."},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"XYFlow runtime layout field. Do NOT set when generating new nodes — the editor populates this."},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"measured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Measured","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"type":{"type":"string","const":"USER_COMMENT_TRIGGER","title":"Type","default":"USER_COMMENT_TRIGGER"},"data":{"$ref":"#/components/schemas/UserCommentTriggerData"}},"additionalProperties":true,"type":"object","required":["id","position","data"],"title":"UserCommentTriggerFlowNode","description":"Trigger node: fires when someone comments on a post/reel/story.\nMust be a child of TRIGGER_GROUP (set `parentId` to the trigger group's\nid). One flow can have multiple comment triggers (e.g. different posts)."},"UserPaymentProviderPayload":{"properties":{"channel_id":{"type":"string","title":"Channel Id"},"provider":{"$ref":"#/components/schemas/PaymentProvider"},"provider_key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Key Id"},"provider_key_secret":{"type":"string","title":"Provider Key Secret"}},"type":"object","required":["channel_id","provider","provider_key_secret"],"title":"UserPaymentProviderPayload","description":"Connect a creator's own gateway to one of their channels.\n\nEverything here is identity or credentials, so there is no edit path:\nchanging any of it means a different connection. Rotating keys or moving\nto another channel is a revoke followed by a create — which is also what\nkeeps the endpoint registered at the gateway in step with the row."},"UserPaymentProviderResponse":{"properties":{"id":{"type":"integer","title":"Id"},"provider":{"$ref":"#/components/schemas/PaymentProvider"},"provider_key_id":{"type":"string","title":"Provider Key Id"},"webhook_registered":{"type":"boolean","title":"Webhook Registered"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","provider","provider_key_id","webhook_registered","created_at","updated_at"],"title":"UserPaymentProviderResponse","description":"A connection as the client sees it — credentials reduced to booleans."},"UserReferralCodeResponseSchema":{"properties":{"referral_code":{"type":"string","title":"Referral Code"},"promo_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promo Code"},"promo_discount_percent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Promo Discount Percent"},"suggested_promo_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Promo Code"},"can_refer":{"type":"boolean","title":"Can Refer","default":false},"min_followers":{"type":"integer","title":"Min Followers","default":0},"state":{"$ref":"#/components/schemas/ReferralState","default":"LOCKED_FREE"}},"type":"object","required":["referral_code"],"title":"UserReferralCodeResponseSchema","description":"What the refer-and-earn page needs: the link code plus the promo code.\n\n`promo_code` is None until the member activates one -- codes are never\nminted by reading this, because creating one also creates discounts at the\npayment providers. `suggested_promo_code` is what activating would give\nthem, computed without writing anything."},"UserRefferalCodeSchema":{"properties":{"referral_code":{"type":"string","title":"Referral Code"}},"type":"object","required":["referral_code"],"title":"UserRefferalCodeSchema","description":"Referral code on its own -- also the payload for the POST routes."},"UserRefferalEventSummaryResponseSchema":{"properties":{"count":{"type":"integer","title":"Count"}},"type":"object","required":["count"],"title":"UserRefferalEventSummaryResponseSchema"},"UserResponse":{"properties":{"firebase_uid":{"type":"string","title":"Firebase Uid"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["firebase_uid"],"title":"UserResponse","description":"User Response."},"UserSendsMessageTriggerData":{"properties":{"one_trigger_per_user":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"One Trigger Per User","description":"If True, this trigger fires at most once per contact within `one_trigger_per_user_window_hours`, even if they comment, message or share again. A skipped event sends nothing: no DM flow and no public auto-reply. Null/False = fire on every matching event."},"one_trigger_per_user_window_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"One Trigger Per User Window Hours","description":"Length of the per-contact window in hours. Null = 24. Max 168 (7 days) -- enforced on the create/update payload, deliberately NOT here (same read-path reason as `ai_prompt`)."},"trigger_type":{"$ref":"#/components/schemas/MediaTriggerType","description":"How incoming DMs are filtered. ANY: every DM triggers. SPECIFIC_KEYWORDS: only DMs matching `keywords_checks`. AI: LLM decides whether the DM matches the intent."},"keywords_checks":{"items":{"$ref":"#/components/schemas/KeywordsCheck"},"type":"array","title":"Keywords Checks","description":"List of keyword rules; the trigger fires if ANY rule matches. Required when `trigger_type=SPECIFIC_KEYWORDS`. Empty otherwise."},"ai_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Prompt","description":"Instruction describing which DMs should fire the flow. Required when `trigger_type=AI`; ignored otherwise. Keep it to 100 characters or less -- enforced on the create/update payload, not here (same read-path reason as UserCommentTriggerData.ai_prompt).","examples":["Person is ready to purchase today"]}},"additionalProperties":true,"type":"object","required":["trigger_type","keywords_checks"],"title":"UserSendsMessageTriggerData","description":"Trigger: fires when a user sends a direct message (DM) to the\nInstagram/Facebook account. Use this for inbox automations and\nkeyword-based DM responses."},"UserSendsMessageTriggerFlowNode":{"properties":{"id":{"type":"string","title":"Id","description":"Unique node id within the flow. Use a UUID string (e.g. 'a7f3...'). Edges reference nodes by this id, so it must be stable once created.","examples":["b3c1f4a2-5d7e-4a9b-9c8d-1f2e3a4b5c6d"]},"position":{"$ref":"#/components/schemas/NodePosition","description":"Canvas coordinates for visual layout only. Has no effect on execution. Use `{x: 0, y: 0}` if you don't care about layout."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Parent node id for grouped children. Required cases: (1) trigger nodes (USER_COMMENT_TRIGGER, USER_SENDS_MESSAGE, USER_SHARE_POST, USER_STORY_MENTION) must have the TRIGGER_GROUP's id as parentId. (2) MESSAGE_BUTTON nodes must have their parent message node's id as parentId (the BUTTON_TEXT_MESSAGE / BUTTON_TEXT_IMAGE_MESSAGE / CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE). All other nodes leave this null."},"extent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extent","description":"XYFlow visual constraint. Usually 'parent' when parentId is set. Leave null otherwise; the frontend infers this."},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"XYFlow runtime layout field. Do NOT set when generating new nodes — the editor populates this."},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"measured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Measured","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"type":{"type":"string","const":"USER_SENDS_MESSAGE","title":"Type","default":"USER_SENDS_MESSAGE"},"data":{"$ref":"#/components/schemas/UserSendsMessageTriggerData"}},"additionalProperties":true,"type":"object","required":["id","position","data"],"title":"UserSendsMessageTriggerFlowNode","description":"Trigger node: fires when someone sends a DM to the account. Must be\na child of TRIGGER_GROUP."},"UserSharePostTriggerData":{"properties":{"one_trigger_per_user":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"One Trigger Per User","description":"If True, this trigger fires at most once per contact within `one_trigger_per_user_window_hours`, even if they comment, message or share again. A skipped event sends nothing: no DM flow and no public auto-reply. Null/False = fire on every matching event."},"one_trigger_per_user_window_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"One Trigger Per User Window Hours","description":"Length of the per-contact window in hours. Null = 24. Max 168 (7 days) -- enforced on the create/update payload, deliberately NOT here (same read-path reason as `ai_prompt`)."},"media_selection_type":{"$ref":"#/components/schemas/MediaSelectionType","description":"Which post(s) being shared activate the trigger. ALL: any post share. SPECIFIC: only the post identified by `media_id`. NEXT: the next post you publish."},"media_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Id","description":"Required when `media_selection_type=SPECIFIC`."},"media_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Url","description":"Permalink, for UI display."}},"additionalProperties":true,"type":"object","required":["media_selection_type"],"title":"UserSharePostTriggerData","description":"Trigger: fires when a user shares a post/reel to your DMs (via the\nInstagram share button on a post). Used for 'share to get the link'\nstyle flows."},"UserSharePostTriggerFlowNode":{"properties":{"id":{"type":"string","title":"Id","description":"Unique node id within the flow. Use a UUID string (e.g. 'a7f3...'). Edges reference nodes by this id, so it must be stable once created.","examples":["b3c1f4a2-5d7e-4a9b-9c8d-1f2e3a4b5c6d"]},"position":{"$ref":"#/components/schemas/NodePosition","description":"Canvas coordinates for visual layout only. Has no effect on execution. Use `{x: 0, y: 0}` if you don't care about layout."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Parent node id for grouped children. Required cases: (1) trigger nodes (USER_COMMENT_TRIGGER, USER_SENDS_MESSAGE, USER_SHARE_POST, USER_STORY_MENTION) must have the TRIGGER_GROUP's id as parentId. (2) MESSAGE_BUTTON nodes must have their parent message node's id as parentId (the BUTTON_TEXT_MESSAGE / BUTTON_TEXT_IMAGE_MESSAGE / CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE). All other nodes leave this null."},"extent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extent","description":"XYFlow visual constraint. Usually 'parent' when parentId is set. Leave null otherwise; the frontend infers this."},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"XYFlow runtime layout field. Do NOT set when generating new nodes — the editor populates this."},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"measured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Measured","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"type":{"type":"string","const":"USER_SHARE_POST","title":"Type","default":"USER_SHARE_POST"},"data":{"$ref":"#/components/schemas/UserSharePostTriggerData"}},"additionalProperties":true,"type":"object","required":["id","position","data"],"title":"UserSharePostTriggerFlowNode","description":"Trigger node: fires when someone shares a post/reel to your DMs.\nMust be a child of TRIGGER_GROUP."},"UserStoryMentionTriggerData":{"properties":{},"additionalProperties":true,"type":"object","title":"UserStoryMentionTriggerData","description":"Trigger: fires when a user mentions your account in their Instagram\nstory. No filter fields — every mention triggers."},"UserStoryMentionTriggerFlowNode":{"properties":{"id":{"type":"string","title":"Id","description":"Unique node id within the flow. Use a UUID string (e.g. 'a7f3...'). Edges reference nodes by this id, so it must be stable once created.","examples":["b3c1f4a2-5d7e-4a9b-9c8d-1f2e3a4b5c6d"]},"position":{"$ref":"#/components/schemas/NodePosition","description":"Canvas coordinates for visual layout only. Has no effect on execution. Use `{x: 0, y: 0}` if you don't care about layout."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid","description":"Parent node id for grouped children. Required cases: (1) trigger nodes (USER_COMMENT_TRIGGER, USER_SENDS_MESSAGE, USER_SHARE_POST, USER_STORY_MENTION) must have the TRIGGER_GROUP's id as parentId. (2) MESSAGE_BUTTON nodes must have their parent message node's id as parentId (the BUTTON_TEXT_MESSAGE / BUTTON_TEXT_IMAGE_MESSAGE / CAROUSEL_BUTTON_TEXT_IMAGE_MESSAGE). All other nodes leave this null."},"extent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extent","description":"XYFlow visual constraint. Usually 'parent' when parentId is set. Leave null otherwise; the frontend infers this."},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width","description":"XYFlow runtime layout field. Do NOT set when generating new nodes — the editor populates this."},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"measured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Measured","description":"XYFlow runtime layout field. Do NOT set when generating new nodes."},"type":{"type":"string","const":"USER_STORY_MENTION","title":"Type","default":"USER_STORY_MENTION"},"data":{"$ref":"#/components/schemas/UserStoryMentionTriggerData"}},"additionalProperties":true,"type":"object","required":["id","position","data"],"title":"UserStoryMentionTriggerFlowNode","description":"Trigger node: fires when someone @mentions the account in their\nInstagram story. Must be a child of TRIGGER_GROUP."},"UsersAnalyticsResponse":{"properties":{"all_time":{"type":"integer","title":"All Time"},"daily":{"$ref":"#/components/schemas/app__api__v1__admin_console__analytics__schemas__PeriodComparison"},"weekly":{"$ref":"#/components/schemas/app__api__v1__admin_console__analytics__schemas__PeriodComparison"},"monthly":{"$ref":"#/components/schemas/app__api__v1__admin_console__analytics__schemas__PeriodComparison"},"by_auth_provider":{"items":{"$ref":"#/components/schemas/GroupCount"},"type":"array","title":"By Auth Provider"},"by_country":{"items":{"$ref":"#/components/schemas/GroupCount"},"type":"array","title":"By Country"},"signup_graph":{"items":{"$ref":"#/components/schemas/XYPoint"},"type":"array","title":"Signup Graph"},"signup_cumulative":{"items":{"$ref":"#/components/schemas/XYPoint"},"type":"array","title":"Signup Cumulative"},"top_instagram_users":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Top Instagram Users"}},"type":"object","required":["all_time","daily","weekly","monthly","by_auth_provider","by_country","signup_graph","signup_cumulative","top_instagram_users"],"title":"UsersAnalyticsResponse"},"ValidateChannelConnectionPayload":{"properties":{"channel_id":{"type":"string","title":"Channel Id"}},"type":"object","required":["channel_id"],"title":"ValidateChannelConnectionPayload"},"ValidateChannelConnectionResponse":{"properties":{"is_expired":{"type":"boolean","title":"Is Expired"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"thread_ownership_conflict":{"type":"boolean","title":"Thread Ownership Conflict","default":false},"thread_ownership_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Ownership Error"},"thread_ownership_check_skipped":{"type":"boolean","title":"Thread Ownership Check Skipped","default":false}},"type":"object","required":["is_expired"],"title":"ValidateChannelConnectionResponse"},"ValidateIntentExample":{"properties":{"text":{"type":"string","title":"Text"},"language":{"type":"string","title":"Language"}},"type":"object","required":["text","language"],"title":"ValidateIntentExample"},"ValidateIntentPayload":{"properties":{"prompt":{"type":"string","maxLength":300,"minLength":1,"title":"Prompt"},"count":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Count","default":5}},"type":"object","required":["prompt"],"title":"ValidateIntentPayload"},"ValidateIntentResponse":{"properties":{"examples":{"items":{"$ref":"#/components/schemas/ValidateIntentExample"},"type":"array","title":"Examples"}},"type":"object","required":["examples"],"title":"ValidateIntentResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerificationFilter":{"type":"string","enum":["UNMARKED","WORKING","BROKEN"],"title":"VerificationFilter","description":"Optional `verified` filter on the list endpoint — the three states an\nautomation can be in. Omit for all rows."},"VerificationRow":{"properties":{"automation_type":{"$ref":"#/components/schemas/app__api__v1__admin_console__automation_verification__models__AutomationType"},"automation_id":{"type":"integer","title":"Automation Id"},"automation_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Automation Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"user_id":{"type":"integer","title":"User Id"},"name_of_user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Of User"},"email_of_user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Of User"},"firebase_uid":{"type":"string","title":"Firebase Uid"},"status":{"anyOf":[{"$ref":"#/components/schemas/VerificationStatus"},{"type":"null"}]},"marked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Marked At"},"marked_by_admin_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Marked By Admin Id"}},"type":"object","required":["automation_type","automation_id","created_at","user_id","firebase_uid"],"title":"VerificationRow","description":"One automation + its owner + its verification note (if any)."},"VerificationStatsResponse":{"properties":{"flow":{"$ref":"#/components/schemas/TypeVerificationStat"},"basic":{"$ref":"#/components/schemas/TypeVerificationStat"}},"type":"object","required":["flow","basic"],"title":"VerificationStatsResponse"},"VerificationStatus":{"type":"string","enum":["WORKING","BROKEN"],"title":"VerificationStatus","description":"Tick / cross. Absence of a row = unmarked (not yet tested)."},"VerifyEmailPayload":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"code":{"type":"string","title":"Code"}},"type":"object","required":["email","code"],"title":"VerifyEmailPayload"},"VerifyEmailResponse":{"properties":{"email":{"type":"string","title":"Email"},"email_verified":{"type":"boolean","title":"Email Verified"}},"type":"object","required":["email","email_verified"],"title":"VerifyEmailResponse"},"VerifyLoginOtpPayload":{"properties":{"email":{"type":"string","title":"Email"},"code":{"type":"string","title":"Code"},"as_team_member":{"type":"boolean","title":"As Team Member","default":false}},"type":"object","required":["email","code"],"title":"VerifyLoginOtpPayload"},"VerifyLoginOtpResponse":{"properties":{"accounts":{"items":{"$ref":"#/components/schemas/LoginAccount"},"type":"array","title":"Accounts"}},"type":"object","required":["accounts"],"title":"VerifyLoginOtpResponse"},"Violation":{"properties":{"category":{"type":"string","title":"Category","description":"Key of the Meta policy category. Must match a key from app.api.v1.ai.policy_scan.meta_policies."},"severity":{"type":"string","enum":["low","medium","high"],"title":"Severity"},"evidence":{"type":"string","maxLength":200,"title":"Evidence","description":"Verbatim quote from the content showing the violation."},"explanation":{"type":"string","maxLength":400,"title":"Explanation","description":"One-sentence mapping of the evidence to the named category."},"policy_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Url"}},"type":"object","required":["category","severity","evidence","explanation"],"title":"Violation","description":"One violation finding on one item."},"XYPoint":{"properties":{"x":{"type":"string","title":"X"},"y":{"type":"number","title":"Y"},"cumulative_y":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cumulative Y"}},"type":"object","required":["x","y"],"title":"XYPoint","description":"Time-series point with optional cumulative value."},"ZapierDataItem":{"properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Field name as it appears in Zapier, e.g. 'booking_ref'.","examples":["booking_ref"]},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value","description":"Value, with {{variable}} templating — e.g. '{{email}}' or '{{user.plan_tier}}'.","examples":["{{email}}"]}},"type":"object","title":"ZapierDataItem","description":"One extra key/value sent alongside the contact to Zapier."},"_RawFix":{"properties":{"item_id":{"type":"string","title":"Item Id"},"action":{"type":"string","enum":["rewrite","remove"],"title":"Action"},"new_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Content"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"}},"type":"object","required":["item_id","action"],"title":"_RawFix"},"app__api__v1__admin_console__admin_auth__schemas__AdminUserListResponse":{"properties":{"admins":{"items":{"$ref":"#/components/schemas/AdminUserResponse"},"type":"array","title":"Admins"}},"type":"object","required":["admins"],"title":"AdminUserListResponse"},"app__api__v1__admin_console__ai_usage__schemas__PeriodComparison":{"properties":{"current":{"type":"integer","title":"Current"},"previous":{"type":"integer","title":"Previous"}},"type":"object","required":["current","previous"],"title":"PeriodComparison","description":"Current vs previous window counts (e.g. turns this week vs last)."},"app__api__v1__admin_console__analytics__schemas__PeriodComparison":{"properties":{"current":{"type":"integer","title":"Current"},"previous":{"type":"integer","title":"Previous"}},"type":"object","required":["current","previous"],"title":"PeriodComparison","description":"Pair of counts for a current/previous period (today vs yesterday, etc.)."},"app__api__v1__admin_console__automation_verification__models__AutomationType":{"type":"string","enum":["FLOW","BASIC"],"title":"AutomationType","description":"The customer automation kinds the verification page covers."},"app__api__v1__admin_console__automations__schemas__PeriodComparison":{"properties":{"current":{"type":"integer","title":"Current"},"previous":{"type":"integer","title":"Previous"}},"type":"object","required":["current","previous"],"title":"PeriodComparison","description":"Pair of counts for current/previous time window."},"app__api__v1__admin_console__user__schemas__AdminUserListResponse":{"properties":{"total":{"type":"integer","title":"Total"},"docs":{"items":{"$ref":"#/components/schemas/AdminUserRow"},"type":"array","title":"Docs"}},"type":"object","required":["total","docs"],"title":"AdminUserListResponse"},"app__api__v1__automation__schemas__AutomationType":{"type":"string","enum":["Auto DM Link","Auto DM Products","Button Text","Attachment"],"title":"AutomationType","description":"Stub schema."}},"securitySchemes":{"JWTBearer":{"type":"http","scheme":"bearer"}}}}