> ## Documentation Index
> Fetch the complete documentation index at: https://docs.truemath.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Domains

> A domain is a collection of variables and activities that models a specific area of calculation, such as a mortgage or a construction estimate.

A **domain** is a self-contained model of a calculation area. It bundles the
[variables](https://docs.truemath.ai/concepts/variables.md) you calculate with and the
[activities](https://docs.truemath.ai/concepts/activities.md) — the equations — that relate them. A domain is
the unit you target when you run a calculation.

A mortgage domain, for example, brings together variables like home price, down
payment, interest rate, term, and monthly payment, along with the activities that
connect them. A construction domain brings together material quantities, unit
conversions, and cost projections. The domain changes from one area to the next; the
way you work with it does not.

## What a domain contains

* **Variables** — the named values in the domain, each with a type, an optional
  default, and units. See [Variables](https://docs.truemath.ai/concepts/variables.md).
* **Activities** — the equations that define how variables relate. Depending on which
  values are known, an activity can solve for different variables. See
  [Activities](https://docs.truemath.ai/concepts/activities.md).

## Identity and versions

A domain is identified by a stable **UUID** — the `domain_id` you pass to the
[API](https://docs.truemath.ai/api/calculate.md) — and carries a title and description. The description is written for
both people and machines; clear, precise descriptions improve natural-language and agent
results. The UUID is what you use to reference a domain.

A domain also carries a stable **key** that TrueMath assigns when the domain is created.
Where the UUID identifies a domain within the account it belongs to, the key is how TrueMath
recognizes the *same* domain across accounts: when you
[copy a domain to another account](https://docs.truemath.ai/authoring/creating-a-domain.md#copy-to-another-account), the
copy shares the source's key but takes its own UUID, so copying it again later updates that
copy in place rather than creating a duplicate. The key is assigned, not chosen, and it does
*not* appear in a domain's exported definition — an
[import](https://docs.truemath.ai/authoring/creating-a-domain.md#export-and-import-json) overrides the domain you import
it into, which you select; it is not matched by a key in the JSON. See
[Creating a domain](https://docs.truemath.ai/authoring/creating-a-domain.md#managing-a-domain).

A domain moves through a [version](https://docs.truemath.ai/concepts/versioning.md) lifecycle: you edit a draft,
then publish it. Calculations always run against the published version, and only
published domains are available through the [API](https://docs.truemath.ai/api/domains.md) and the
[Playground](https://docs.truemath.ai/playground/tour.md).

## Where domains come from

* **The domain library** — TrueMath ships pre-built, role-based domains across several
  professional verticals. See the [Domain library](https://docs.truemath.ai/domain-library/overview.md).
* **Your own domains** — author a domain from scratch, or customize a library domain to
  match your conventions and business logic. See [Authoring overview](https://docs.truemath.ai/authoring/overview.md).

> [!NOTE]
>
> To list the published domains available to your account, use
> [`GET /v1/domains`](https://docs.truemath.ai/api/domains).

> [card] [Browse the domain library](https://docs.truemath.ai/domain-library/overview.md)
>
> See what's available out of the box.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.