> For the complete documentation index, see [llms.txt](https://docs.autonomi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.autonomi.com/developers/core-concepts/data-types.md). Agents can also search and read this documentation through its [MCP server](https://docs.autonomi.com/~gitbook/mcp).

# Data Types

When you store something on Autonomi, you upload data or files. They are self-encrypted on your machine before they leave it, and you get back either a public address or a private `DataMap` to read them with. Two further types build on stored content: a [pointer](#pointers) gives changing content one fixed address, and a [manifest](#manifests) lets you share a set of files as one item.

Stored data is immutable and cannot be deleted. Read [Keeping data private](#keeping-data-private) before you upload anything that is not meant to be public.

## Why it matters

Which operation you choose decides who can read your data, now and later. Public and private uploads differ in where the `DataMap` lives, and that difference cannot be changed after upload.

## Developer-facing operations at a glance

| Operation            | What it stores                                                                                          | Typical use                                                       |
| -------------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| Private data or file | Self-encrypted chunks; the `DataMap` stays with you                                                     | User data and anything not meant to be public                     |
| Public data or file  | Self-encrypted chunks plus a published `DataMap` at an address                                          | Content you want to make public and available for anyone to read  |
| Pointer              | A small owner-signed record at a fixed address, naming a target address: public data or another pointer | An address that always leads to the latest version of public data |
| Manifest             | A document listing files and how to fetch each one; not itself stored                                   | Sharing a folder or release as one `.ant` file or `ant://` link   |

## How self-encryption works

Autonomi has one underlying storage unit: the chunk. When you upload data or a file:

* self-encryption, on your machine, turns the content into encrypted chunks
* a `DataMap` records how those chunks fit back together, and is the key to reading them
* stored chunks are content-addressed: changing the content produces a different address

Stored content never changes in place. When you need an address that follows new versions of your content, use a [pointer](#pointers).

## Public and private data

Public and private uploads use the same encrypted chunks. They differ only in where the `DataMap` lives:

* **Private:** the `DataMap` is returned to you and is not stored on the network. Only someone holding it can read the data.
* **Public:** the `DataMap` is stored on the network, unencrypted, and you get its address. Public data may be viewed by anyone, whether or not you share its address.

In the [`antd`](https://docs.autonomi.com/developers/sdk/install/use-antd.md) REST API, `POST /v1/data` returns a `DataMap` and `POST /v1/data/public` returns an address. The CLI's `ant file upload` keeps a private upload's `DataMap` in a local `.datamap` file, and `--public` publishes it.

## Files

File uploads use the same model for content that already lives on disk. `antd` and the CLI both read and write the files for you, so you do not handle the bytes yourself.

## Pointers

A pointer is the one stored record that can change. It lives at a fixed address, derived from its owner's key, and names a target: a chunk address, such as the address of public data, or another pointer. Its owner can point it at a new target at any time, so readers who keep the pointer's address always reach the latest version.

* **Pointers are for public data, not private data.** A pointer is public, and anyone can follow it. To lead to a file, it must name the address of a public upload. A private upload has no such address, because its `DataMap` is not on the network. Creating or updating a pointer stores only the pointer record; it never uploads or publishes content.
* Each write, including the first, is paid, at about the price of one chunk, and each attempt pays again.
* Only the holder of the owner key can write. The key cannot be replaced, because the pointer's address comes from it.
* An owner can transfer a pointer to another pointer for good. After that, the recipient's owner decides where it leads, and the transferred pointer can no longer change.
* Reading or resolving a pointer is free.

The [CLI](https://docs.autonomi.com/developers/cli/use-the-cli.md) provides `ant pointer` commands, and `antd` provides [pointer endpoints](https://docs.autonomi.com/developers/sdk/reference/rest-api.md#pointers).

## Manifests

A manifest describes a set of files. Each entry has either a public address or an embedded `DataMap` to fetch the file with, and can record a path, the file's size, and its SHA-256 hash. You share the manifest as a `.ant` document or, when it is small enough, as an `ant://manifest/...` link. The manifest itself is not stored on the network.

Use manifests to share or publish a set of files together, much like a torrent file. They also make files faster to open: an embedded entry carries the file's `DataMap`, so a reader skips the network lookup that a bare address needs before downloading can start. Embedding is safe for public files. For a private file, the embedded `DataMap` is its key, so anyone holding the manifest can read that file.

The size and hash in an entry are the creator's claim; check the hash after you download.

The CLI provides `ant manifest` commands, and `antd` provides [manifest endpoints](https://docs.autonomi.com/developers/sdk/reference/rest-api.md#manifests).

## Keeping data private

What you upload cannot be taken back, so design your application to keep private data private from the start:

* **Use private uploads for anything that is not meant to be public**, including your users' data unless they have chosen to publish it.
* **Public data may be viewed by anyone, whether or not you share its address.** Keeping the address to yourself does not keep the data private.
* **Treat a `DataMap` as a key.** Anyone who holds it can read the data. Store it as you would a password, and keep it out of logs and source control.
* **Share manifests with care.** A manifest with an embedded entry for a private file gives whoever holds it access to that file.
* **Never store data as a raw chunk.** Raw chunk operations skip self-encryption and are for testing on local networks only. They must never be used on the live production network.
* **Keep pointer owner keys private.** Anyone who holds one can change or hand over that pointer, and the key cannot be replaced.
* **Check before you upload.** Stored data is immutable and cannot be deleted.

## Practical example

These interfaces map onto the operations as follows:

* use `POST /v1/data` when you want to keep the `DataMap` yourself, and `POST /v1/data/public` when you want it published as an address
* use `ant file upload ...` to upload a file privately, and add `--public` to publish it; `POST /v1/files` and `POST /v1/files/public` do the same through `antd`
* use `POST /v1/pointers` or `ant pointer create ...` when you want a fixed address that you can move to new content later
* use `POST /v1/manifests/build` when you want to share several files you have already uploaded as one item; it pays nothing
* use `ant manifest create ...` when you want to upload several files and describe them in one manifest; it uploads, and pays for, the files

## Related pages

* [Store and Retrieve Data with the SDKs](https://docs.autonomi.com/developers/sdk/how-to-guides/store-and-retrieve-data.md)
* [Payment Model](https://docs.autonomi.com/developers/core-concepts/payment-model.md)
* [Keys, Addresses, and DataMaps](https://docs.autonomi.com/developers/core-concepts/keys-addresses-and-datamaps.md)
* [Self-encryption](https://docs.autonomi.com/developers/core-concepts/self-encryption.md)
