{"openapi":"3.1.0","info":{"title":"Rev Firm Platform","version":"0.1"},"paths":{"/auth/config":{"get":{"summary":"Auth Config","operationId":"auth_config_auth_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/request-link":{"post":{"summary":"Auth Request Link","operationId":"auth_request_link_auth_request_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/verify":{"post":{"summary":"Auth Verify","operationId":"auth_verify_auth_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/access":{"post":{"summary":"Auth Access","description":"A reusable internal access link (made with /admin/access-links).","operationId":"auth_access_auth_access_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/handoff":{"post":{"summary":"Auth Handoff","description":"Someone arriving from a tool that already verified their email (HIR).","operationId":"auth_handoff_auth_handoff_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/sign-out":{"post":{"summary":"Auth Sign Out","operationId":"auth_sign_out_auth_sign_out_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools":{"get":{"summary":"List Tools","operationId":"list_tools_tools_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me":{"get":{"summary":"Me","operationId":"me_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/credits":{"get":{"summary":"Me Credits","operationId":"me_credits_me_credits_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/usage":{"get":{"summary":"Me Usage","operationId":"me_usage_me_usage_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/run/{slug}":{"post":{"summary":"Run Tool","description":"Run a tool with the user's inputs; charges credits when the engine accepts the job.","operationId":"run_tool_run__slug__post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/run/{slug}/autocomplete":{"get":{"summary":"Run Autocomplete","operationId":"run_autocomplete_run__slug__autocomplete_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/jobs":{"get":{"summary":"Me Jobs","operationId":"me_jobs_me_jobs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/jobs/{job_id}":{"get":{"summary":"Job Status","operationId":"job_status_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/jobs/{job_id}/pdf":{"get":{"summary":"Job Pdf","description":"Bearer header, or ?session= so a plain link/download works.","operationId":"job_pdf_jobs__job_id__pdf_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}},{"name":"session","in":"query","required":false,"schema":{"type":"string","default":"","title":"Session"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/check":{"post":{"summary":"Check","description":"May this person run this tool right now? Never raises for 'no': returns allowed=false.","operationId":"check_check_post","parameters":[{"name":"x-tool-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Tool-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notify":{"post":{"summary":"Notify","description":"A tool emails one of its users (alerts), from the portal's mailbox.","operationId":"notify_notify_post","parameters":[{"name":"x-tool-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Tool-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/record":{"post":{"summary":"Record","operationId":"record_record_post","parameters":[{"name":"x-tool-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Tool-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tools":{"post":{"summary":"Admin Register Tool","operationId":"admin_register_tool_admin_tools_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Admin List Tools","operationId":"admin_list_tools_admin_tools_get","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/grant":{"post":{"summary":"Admin Grant","operationId":"admin_grant_admin_grant_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/signin-link":{"post":{"summary":"Admin Signin Link","description":"One-time sign-in link returned to the admin instead of emailed.","operationId":"admin_signin_link_admin_signin_link_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/access-links":{"post":{"summary":"Admin Access Link","description":"A reusable sign-in link for internal testing. The link is shown once.","operationId":"admin_access_link_admin_access_links_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessLinkIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Admin Access Links","operationId":"admin_access_links_admin_access_links_get","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/access-links/revoke":{"post":{"summary":"Admin Access Link Revoke","operationId":"admin_access_link_revoke_admin_access_links_revoke_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits":{"post":{"summary":"Admin Credits","operationId":"admin_credits_admin_credits_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/usage":{"get":{"summary":"Admin Usage","operationId":"admin_usage_admin_usage_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/gmail-token":{"post":{"summary":"Admin Gmail Token","operationId":"admin_gmail_token_admin_gmail_token_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/packs":{"get":{"summary":"Billing Packs","description":"Signed-in only: prices are shown inside the purchase flow, nowhere public.","operationId":"billing_packs_billing_packs_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/checkout":{"post":{"summary":"Billing Checkout","operationId":"billing_checkout_billing_checkout_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/packs":{"get":{"summary":"Admin List Packs","operationId":"admin_list_packs_admin_packs_get","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Admin Save Pack","operationId":"admin_save_pack_admin_packs_post","parameters":[{"name":"x-admin-token","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Admin-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/stripe-webhook":{"post":{"summary":"Stripe Webhook","operationId":"stripe_webhook_billing_stripe_webhook_post","parameters":[{"name":"stripe-signature","in":"header","required":false,"schema":{"type":"string","default":"","title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AccessLinkIn":{"properties":{"email":{"type":"string","title":"Email"},"days":{"type":"integer","title":"Days","default":90},"label":{"type":"string","title":"Label","default":""}},"type":"object","required":["email"],"title":"AccessLinkIn"},"CheckIn":{"properties":{"session":{"type":"string","title":"Session","default":""},"email":{"type":"string","title":"Email","default":""}},"type":"object","title":"CheckIn"},"CheckoutIn":{"properties":{"pack_id":{"type":"integer","title":"Pack Id"}},"type":"object","required":["pack_id"],"title":"CheckoutIn"},"CreditsIn":{"properties":{"email":{"type":"string","title":"Email"},"credits":{"type":"integer","title":"Credits"},"ref":{"type":"string","title":"Ref","default":""},"note":{"type":"string","title":"Note","default":""}},"type":"object","required":["email","credits"],"title":"CreditsIn"},"GrantIn":{"properties":{"email":{"type":"string","title":"Email"},"tool":{"type":"string","title":"Tool"},"plan":{"type":"string","title":"Plan"},"days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days"},"note":{"type":"string","title":"Note","default":""}},"type":"object","required":["email","tool","plan"],"title":"GrantIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LinkIn":{"properties":{"email":{"type":"string","title":"Email"},"next":{"type":"string","title":"Next","default":""}},"type":"object","required":["email"],"title":"LinkIn"},"NotifyIn":{"properties":{"user_id":{"type":"integer","title":"User Id"},"subject":{"type":"string","title":"Subject"},"text":{"type":"string","title":"Text"},"html":{"type":"string","title":"Html","default":""}},"type":"object","required":["user_id","subject","text"],"title":"NotifyIn"},"PackIn":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"credits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits"},"price_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Cents"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"PackIn"},"RecordIn":{"properties":{"user_id":{"type":"integer","title":"User Id"},"job_ref":{"type":"string","title":"Job Ref","default":""},"units":{"type":"integer","title":"Units","default":1},"cost_usd":{"type":"number","title":"Cost Usd","default":0.0},"detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["user_id"],"title":"RecordIn"},"RevokeIn":{"properties":{"id":{"type":"integer","title":"Id"}},"type":"object","required":["id"],"title":"RevokeIn"},"ToolIn":{"properties":{"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"url":{"type":"string","title":"Url","default":""},"form_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"Form Schema"},"sort_order":{"type":"integer","title":"Sort Order","default":100},"credit_cost":{"type":"integer","title":"Credit Cost","default":1},"rotate_key":{"type":"boolean","title":"Rotate Key","default":false},"api_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Url"},"run_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Key"},"private":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Private"},"handoff":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Handoff"}},"type":"object","required":["slug","name"],"title":"ToolIn"},"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"},"VerifyIn":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"VerifyIn"}}}}