# Create inbox

URL: https://docs.hanzo.ai/docs/openapi/books/post-books-inbox

> Takes a document as RAW BYTES and queues it in the caller org's inbox as `unsorted`, answering the queued item.

`POST /v1/books/inbox`

> [Books →](https://docs.hanzo.ai/docs/openapi/books) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                        |
| ------------- | -------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/books/inbox`  |
| **Method**    | `POST`                                 |
| **Operation** | `post_books_inbox`                     |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY` |

Takes a document as RAW BYTES and queues it in the caller org's inbox as `unsorted`, answering the queued item. It is the drop box: get the paperwork in now, read it later.

It EXTRACTS NOTHING and calls no model — that is what separates it from the scan. Nothing is proposed and nothing is posted; the item simply waits to be scanned, and a booked document leaves the queue.

IDEMPOTENT BY CONTENT: the item's id is the file hash, so re-uploading the same bytes answers the existing item rather than adding a duplicate row — and it is the same id a scan of those bytes uses, which is how the two routes address one document. Scoped to the caller's own org from the validated principal and refused without one; `sandbox=true` targets the sandbox ledger, and `filename` is recorded for display. An empty or oversized upload is a 400.

## Request

1 field, body `application/octet-stream`.

| Field    | In   | Type            | Required | Description |
| -------- | ---- | --------------- | -------- | ----------- |
| `(body)` | body | string (binary) | yes      |             |

## Response

| Status | Body      | Meaning |
| ------ | --------- | ------- |
| `2XX`  | InboxItem | Success |

`2XX` body — 18 fields.

| Field                               | In   | Type        | Always | Description |
| ----------------------------------- | ---- | ----------- | ------ | ----------- |
| `category`                          | body | string      | —      |             |
| `confidence`                        | body | string      | —      |             |
| `createdAt`                         | body | string      | —      |             |
| `extracted`                         | body | Extracted   | —      |             |
| `extracted.category`                | body | string      | —      |             |
| `extracted.currency`                | body | string      | —      |             |
| `extracted.issuedAt`                | body | string      | —      |             |
| `extracted.lineItems`               | body | LineItem\[] | —      |             |
| `extracted.lineItems[].amountCents` | body | integer     | —      |             |
| `extracted.lineItems[].description` | body | string      | —      |             |
| `extracted.merchant`                | body | string      | —      |             |
| `extracted.note`                    | body | string      | —      |             |
| `extracted.taxCents`                | body | integer     | —      |             |
| `extracted.totalCents`              | body | integer     | —      |             |
| `filename`                          | body | string      | —      |             |
| `id`                                | body | string      | —      |             |
| `status`                            | body | string      | —      |             |
| `vendor`                            | body | string      | —      |             |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo books inbox create
```

**SDK**

**.ts**

```ts
import { Configuration, BooksApi } from 'hanzoai';

const api = new BooksApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postBooksInbox();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import BooksApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = BooksApi(client).post_books_inbox()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.BooksAPI.PostBooksInbox(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, books_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = books_api::post_books_inbox(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.BooksApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new BooksApi(client).postBooksInbox();
```

**HTTP**

```bash
curl -X POST https://api.hanzo.ai/v1/books/inbox \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP reaches **books** through the `books` tool, which names its 20 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_book_accounts"
         }
       }
     }'
```

---

[Books API](https://docs.hanzo.ai/docs/openapi/books) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
