{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://flatbrowser.com/switching/export-schema.json","title":"Flatbrowser organisation export, format version 1","type":"object","properties":{"format":{"const":"flatbrowser.export","description":"Always \"flatbrowser.export\"."},"formatVersion":{"type":"integer","const":1,"description":"Version of this format (currently 1); raised only for incompatible changes."},"exportedAt":{"type":"string","format":"date-time","description":"When the export was generated (ISO 8601, UTC)."},"notes":{"type":"array","items":{"type":"string"},"description":"Human-readable notes about what the export does not contain and why."},"organization":{"description":"Your organisation.","type":"object","properties":{"id":{"type":"string","description":"Organisation ID."},"name":{"type":"string","description":"Display name."},"slug":{"type":"string","description":"URL-safe short name."},"createdAt":{"type":"string","format":"date-time","description":"When the organisation was created."},"suspendedAt":{"type":["string","null"],"format":"date-time","description":"When a current suspension started."},"suspendedReason":{"type":["string","null"],"description":"Reason given for a current suspension."},"closeRequestedAt":{"type":["string","null"],"format":"date-time","description":"When closing the organisation was requested."}},"required":["id","name","slug","createdAt","suspendedAt","suspendedReason","closeRequestedAt"]},"members":{"description":"People in the organisation, with their terms acceptance records.","type":"array","items":{"type":"object","properties":{"userId":{"type":"string","description":"User ID."},"name":{"type":"string","description":"Display name."},"email":{"type":"string","description":"Email address."},"role":{"type":"string","description":"owner, admin or member."},"joinedAt":{"type":"string","format":"date-time","description":"When the user joined the organisation."},"termsAcceptedAt":{"type":["string","null"],"format":"date-time","description":"When the user accepted the Terms, AUP and DPA."},"termsVersion":{"type":["string","null"],"description":"Version of the documents accepted."},"businessConfirmedAt":{"type":["string","null"],"format":"date-time","description":"When the user confirmed acting as a business (§14 BGB)."}},"required":["userId","name","email","role","joinedAt","termsAcceptedAt","termsVersion","businessConfirmedAt"]}},"invitations":{"description":"Invitations sent to join the organisation.","type":"array","items":{"type":"object","properties":{"email":{"type":"string","description":"Invited address."},"role":{"type":["string","null"],"description":"Role offered."},"status":{"type":"string","description":"pending, accepted, rejected or canceled."},"createdAt":{"type":"string","format":"date-time","description":"When the invitation was sent."},"expiresAt":{"type":"string","format":"date-time","description":"When the invitation expires."}},"required":["email","role","status","createdAt","expiresAt"]}},"apiKeys":{"description":"API-key metadata. Key secrets are never stored, so they cannot be exported.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Key ID (referenced by sessions and the connection log)."},"name":{"type":"string","description":"Name you gave the key."},"keyPrefix":{"type":"string","description":"First characters of the key, for recognising it."},"createdAt":{"type":"string","format":"date-time","description":"When the key was created."},"lastUsedAt":{"type":["string","null"],"format":"date-time","description":"When the key was last used."},"revokedAt":{"type":["string","null"],"format":"date-time","description":"When the key was revoked."}},"required":["id","name","keyPrefix","createdAt","lastUsedAt","revokedAt"]}},"subscription":{"description":"Your plan and its billing state (null if you never subscribed).","oneOf":[{"type":"object","properties":{"planCode":{"type":"string","description":"solo, team or scale."},"status":{"type":"string","description":"trialing, active, past_due or canceled."},"currentPeriodEnd":{"type":["string","null"],"format":"date-time","description":"End of the paid billing period."},"cancelAtPeriodEnd":{"type":"boolean","description":"Whether the subscription ends at the period end."},"pastDueSince":{"type":["string","null"],"format":"date-time","description":"When a renewal payment first failed."},"stripeCustomerId":{"type":["string","null"],"description":"Stripe customer reference."},"stripeSubscriptionId":{"type":["string","null"],"description":"Stripe subscription reference."},"createdAt":{"type":"string","format":"date-time","description":"When the subscription record was created."}},"required":["planCode","status","currentPeriodEnd","cancelAtPeriodEnd","pastDueSince","stripeCustomerId","stripeSubscriptionId","createdAt"]},{"type":"null"}]},"workers":{"description":"The browser workers provisioned for you.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Worker ID."},"status":{"type":"string","description":"provisioning, ready, draining, error or deleted."},"slots":{"type":"integer","description":"Concurrent sessions the worker supports."},"createdAt":{"type":"string","format":"date-time","description":"When the worker was created."},"updatedAt":{"type":"string","format":"date-time","description":"Last status change."}},"required":["id","status","slots","createdAt","updatedAt"]}},"abuseDecisions":{"description":"Decisions we took about notices concerning your organisation (DSA Art. 17). The notifier’s identity is never included.","type":"array","items":{"type":"object","properties":{"reference":{"type":"string","description":"Case reference."},"kind":{"type":"string","description":"Type of notice."},"status":{"type":"string","description":"Case status."},"decision":{"type":["string","null"],"description":"The decision taken."},"decidedAt":{"type":["string","null"],"format":"date-time","description":"When it was decided."},"statementSentAt":{"type":["string","null"],"format":"date-time","description":"When the statement of reasons was sent."},"receivedAt":{"type":"string","format":"date-time","description":"When the notice arrived."}},"required":["reference","kind","status","decision","decidedAt","statementSentAt","receivedAt"]}},"invoices":{"description":"Your invoices, read from Stripe at export time (up to 1,000). null with an \"invoicesNote\" if Stripe could not be reached; the invoices are also in the billing portal.","oneOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stripe invoice ID."},"number":{"type":["string","null"],"description":"Invoice number."},"status":{"type":["string","null"],"description":"draft, open, paid, uncollectible or void."},"currency":{"type":"string","description":"ISO currency code, lower case."},"subtotal":{"type":"integer","description":"Net amount in cents."},"total":{"type":"integer","description":"Gross amount in cents."},"amountPaid":{"type":"integer","description":"Amount paid in cents."},"createdAt":{"type":"string","format":"date-time","description":"Invoice date."},"periodStart":{"type":"string","format":"date-time","description":"Start of the billed period."},"periodEnd":{"type":"string","format":"date-time","description":"End of the billed period."},"hostedInvoiceUrl":{"type":["string","null"],"description":"Stripe-hosted invoice page."},"invoicePdf":{"type":["string","null"],"description":"Invoice PDF link."}},"required":["id","number","status","currency","subtotal","total","amountPaid","createdAt","periodStart","periodEnd","hostedInvoiceUrl","invoicePdf"]}},{"type":"null"}]},"sessions":{"description":"Your browser sessions still in the session history.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Session ID."},"workerId":{"type":["string","null"],"description":"Worker that ran it."},"hostId":{"type":["string","null"],"description":"Host that ran it."},"apiKeyId":{"type":["string","null"],"description":"API key that created it."},"status":{"type":"string","description":"starting, active, closed or failed."},"source":{"type":"string","description":"ws (born from a WebSocket connection) or rest."},"startedAt":{"type":"string","format":"date-time","description":"Start time."},"endedAt":{"type":["string","null"],"format":"date-time","description":"End time."},"closeReason":{"type":["string","null"],"description":"Why it ended."},"clientIp":{"type":["string","null"],"description":"IP address of the client that created it."},"egressIp":{"type":["string","null"],"description":"Public IP address it used for outbound traffic (null behind your own proxy)."}},"required":["id","workerId","hostId","apiKeyId","status","source","startedAt","endedAt","closeReason","clientIp","egressIp"]}},"usageEvents":{"description":"Usage and traffic records, e.g. outbound bytes per worker and time window.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Record ID."},"type":{"type":"string","description":"Record type, e.g. egress_bytes."},"quantity":{"type":"integer","description":"Amount (bytes for egress_bytes)."},"meta":{"type":["object","null"],"description":"Details: worker, host, received bytes, time window."},"createdAt":{"type":"string","format":"date-time","description":"When the record was written."}},"required":["id","type","quantity","meta","createdAt"]}},"connectionLog":{"description":"The connection-log entries about your organisation (Terms §6.1).","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Entry ID (a number, as a string)."},"at":{"type":"string","format":"date-time","description":"When it happened."},"kind":{"type":"string","description":"session.start, session.attach, session.detach, session.end, rest.action, rest.blocked, egress.bytes, org.suspended, org.close_requested, org.close_withdrawn, or a billing event: billing.checkout_completed, billing.payment_reminder, billing.dispute, billing.dispute_closed, billing.fraud_warning, billing.refund, billing.tax_id_removed or billing.tax_id_unavailable."},"apiKeyId":{"type":["string","null"],"description":"API key involved."},"sessionId":{"type":["string","null"],"description":"Session involved."},"workerId":{"type":["string","null"],"description":"Worker involved."},"hostId":{"type":["string","null"],"description":"Host involved."},"clientIp":{"type":["string","null"],"description":"IP address of the connecting client."},"egressIp":{"type":["string","null"],"description":"Public IP address used for outbound traffic."},"targetHost":{"type":["string","null"],"description":"Target hostname of a REST call."},"bytes":{"type":["integer","null"],"description":"Bytes piped or sent."},"detail":{"type":["object","null"],"description":"Kind-specific details (close reason, proxy host, outcome, …)."}},"required":["id","at","kind","apiKeyId","sessionId","workerId","hostId","clientIp","egressIp","targetHost","bytes","detail"]}},"invoicesNote":{"type":"string","description":"Present only when invoices is null: why they could not be included."}},"required":["format","formatVersion","exportedAt","notes","organization","members","invitations","apiKeys","subscription","workers","abuseDecisions","invoices","sessions","usageEvents","connectionLog"]}