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

# Write a record for someone else

> Inbox records: one user writes, another owns and reads it, and nothing on chain names either.

Sometimes the record belongs to someone other than the writer: a shop owner sends a customer a
receipt, a clinic issues a result, an app hands a user a credential. With plain Arkiv the writer
would have to know the recipient's wallet and make it the owner, which links them in public.

Inbox records work like stealth addresses (ERC-5564). The recipient shares an **inbox address**.
Anyone can write to it; each record gets a one-time owner that only the recipient controls,
encrypted so only the recipient can read it.

## Share your inbox address

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
const inbox = await alice.inboxAddress() // "arkognito-inbox1:02…"
```

It is stable for the user and app. Publish it wherever the writer can find it.

## Send

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
await bob.sendTo(inbox, {
  payload: new TextEncoder().encode(JSON.stringify({ receipt: "R-1042" })),
  contentType: "application/json",
  attributes: { type: "receipt" },
  expires: ExpirationTime.fromDays(30),
})
```

The payload is always encrypted to the recipient. Bob's client pays with Bob's rate-limit token;
the relayer writes the record like any other.

## Receive

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
const alice = await createPrivateClient({ app: "my-app", wallet, inbox: true })
const mine = await alice.myEntities() // includes records sent to you; ref.kind === "inbox"
const proof = await alice.proveOwnership(mine[0].entityKey, { challenge, verifier: "desk-1" })
```

Scanning for inbox records costs one elliptic-curve multiplication per record in the app, so it is
off unless you pass `inbox: true`.

## What others can tell

| Party | Learns | Does not learn |
| - | - | - |
| Anyone reading Arkiv | that a record is an inbox record (its envelope is not signed by its owner) | who it is for, who sent it, what it says |
| The sender | the record they wrote | anything about the recipient's other records; they cannot read it back or prove ownership |
| The relayer | the same as for any record | who the recipient is |


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