# Sendfire record schema

Version **1.0.0**. Published 2026-10-21 (HIG-1504, spec HIG-1495 "Export and schema").

A Brand export is one zip archive a Marketer or workspace admin downloads from a Brand's Manage tab, under Maintenance. The founder command `pnpm data:export` writes the same archive for each Brand of a closed workspace. This folder describes what is in it.

| File | What it describes |
| --- | --- |
| `brand-record.schema.json` | `brand-record.json`, the record in JSON (JSON Schema draft 2020-12) |
| `export-manifest.schema.json` | `manifest.json`, the list of files with the schema version and export time |
| `export-format.md` | The archive: its layout, each Markdown file's contents and reading order, and the manifest |
| `grade-contract.md` | The format an agent replies in when it grades a sent Campaign |
| `mcp-contract.md` | The tools and resource Sendfire's MCP server offers a connected agent |

## The archive

```
<brand>-record-<YYYY-MM-DD>/
  README.md                  where to start, with the files in reading order
  manifest.json              schema version, export time, every file, counts
  brand-record.json          the record, against brand-record.schema.json
  markdown/1-brand-brief.md  the Brand Brief, each section with its earlier revisions
  markdown/2-brand-memory.md memories with their sources, then Suggestions and decisions
  markdown/3-campaigns.md    one section per Campaign: Brief, copy, what Klaviyo sent, Retros, decisions, review
  markdown/4-tests.md        each Test with its hypothesis, decision rule and conclusions
  markdown/5-flow-retros.md  each Flow Retro as written, grouped by flow
  markdown/6-reports.md      each monthly Report as last written
  markdown/7-reviews.md      reviews of everything that is not a Campaign
```

The Markdown is for people and the JSON is for tools. Both are built from the same record. Retros, Flow Retros and Reports appear as written; only their heading levels change so they fit the page.

## What is never in an export

- Klaviyo, Shopify and Anthropic credentials, and anything else Sendfire stores encrypted.
- Member names, email addresses and sign-in ids. A review event says only who acted (`member`, `marketer` or `sendfire`), and a mention of a person in a comment reads `@Member`.
- Anything about individual recipients. Campaign results are Klaviyo's totals for the send.
- Sendfire's storage names: no table or column name, and no Clerk or Stripe id, appears in either bundle. Record ids are opaque; they join records inside one export and mean nothing outside it.

## Glossary

Each JSON name maps to a term in Sendfire's product vocabulary (`CONTEXT.md` at the repository root).

| JSON | Product term | Notes |
| --- | --- | --- |
| `brand` | Brand | The ecommerce business. `status` is `active`, or `inactive` for an Inactive Brand. |
| `brandBrief.sections` | Brand Brief | Identity, voice, audience, offers, constraints and goals. `revisions` is every revision, oldest first; `content` is the newest. |
| `memories` | Brand Memory | Learnings, examples and personas, with `sources`. A replaced memory has `status: "superseded"`, and the one that replaced it names it in `supersedes`. |
| `suggestions` | Suggestion | A proposed change to Brand Memory. `decision` is the Marketer's answer, or null while it waits. `set_aside` means Sendfire held it back before it reached the Marketer. |
| `campaigns` | Campaign | One send. `brief` is the Campaign's Brief, `copy` its accepted copy, `asSent` and `performance` what Klaviyo sent and its totals. |
| `campaigns[].brief.concept` | Concept | The one idea the email hangs on. |
| `campaigns[].brief.draftingIntent` | Drafting intent | The Campaign intent held while the Campaign was drafted. |
| `campaigns[].retros` | Retro | The read of a sent Campaign, as written. `memoryDecision` says whether it raised a Suggestion. |
| `tests` | Test | A hypothesis pursued through Klaviyo split tests, with its `conclusions`. `whatWeLearned` and `whatWeWillDo` are the conclusion's two fields. |
| `reports` | Report | A monthly Report. `narrative` holds its headline, summary, what mattered, what we learned, next month and flow work. |
| `flows[].flowRetros` | Flow Retro | A per-flow read, as written. Only flows with a Flow Retro are listed. |
| `reviews` | Review | What members said about an Artifact Version shared with them, and the approvals given. `subject` names the Artifact. |
| `authoredBy` | (provenance) | Who wrote a record: `sendfire` (Sendfire's AI), `marketer`, or `agent` (an agent the Marketer brought: a reply they pasted, or a connected agent). A Retro is `sendfire` unless the Marketer wrote it or imported an agent's grade (HIG-1507). |

Times are ISO 8601 timestamps; days (`periodStart`, `windowStart`, `liveOn`) are ISO dates. Rates are fractions: 0.482 is 48.2%. Amounts are in the Brand's `reportingCurrency`.

## Licence

- The record schema (`brand-record.schema.json` and `export-manifest.schema.json`), the grade contract (`grade-contract.md`) and the MCP tool and resource contract (`mcp-contract.md`) are under the MIT License, in `LICENSE-MIT.md`. Each schema names the licence in its `$comment`.
- The prose of the export format (`export-format.md`) is under Creative Commons Attribution 4.0 International, in `LICENSE-CC-BY-4.0.md`.
- The copyright holder is Sendfire Email Inc. The licences cover the files named here and nothing else: the Sendfire application and the rest of this repository stay private, and no licence covers them.
- Status (2026-10-21, HIG-1511): published. Liam confirmed on 2026-10-21 that Sendfire Email Inc owns the code; this folder is served at https://sendfire.ai/record-schema/1.0.0/ and the public docs page is product-guide/open-record.

## Versioning

The version is `major.minor.patch`. A new optional field or a new value in a list is a minor version. Removing or renaming a field, or changing what one means, is a major version. A wording fix in this document is a patch. `schemaVersion` in `brand-record.json` and `manifest.json` names the version an archive was written against.

## Change log

- **1.0.0** (2026-10-21, HIG-1504). First version: Brand, Brand Brief with revisions, Brand Memory with sources, Suggestions with decisions, Campaigns with Brief, copy, Retros and results, Tests with conclusions, Reports, Flow Retros and reviews. `authoredBy` is present on Retros and Flow Retros. A Flow Retro is always `sendfire`; a Retro is `marketer` or `agent` when the Marketer wrote it or imported a grade (HIG-1507, same day, no change to the shape).
