---
title: "Create Book"
method: POST
path: "/v1/book/add"
tags: ["Book Commands"]
---

# Create Book

`POST /v1/book/add`

## Request

- Base URL: `https://api.ocrolus.com`
- URL: `https://api.ocrolus.com/v1/book/add`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://auth.ocrolus.com/oauth/token`

Create a <<glossary:Book>> that you can use to group related <<glossary:Document>>s. Each document must be uploaded to a <<glossary:Book>>, so you'll need to create one with this endpoint before you can upload files. <<glossary:Book>>s are generally used to store related <<glossary:Document>>s, such as for a loan application or a case file.
  > 📘 Note
    > This endpoint can return errors with an HTTP 200 status code. In such cases, the response body contains an error code and message instead of the expected success response. To view the error response schema, select **Error** from the schema dropdown above.

## Request body

- object
  - `name` string, required: The name of the <<glossary:Book>> that will be created.
  - `book_class` 'COMPLETE' | 'INSTANT' | 'INSTANT_CLASSIFY_ONLY' | 'INSTANT_CLASSIFY_ISO_CAPTURE': The processing type of the book. Can be either 'COMPLETE' or 'INSTANT'. By default this value will be set to `COMPLETE` unless your organization is configured to have `INSTANT` as the default.
  - `book_type` 'DEFAULT' | 'INSTANT_ML' | 'WIDGET': Describes how the <<glossary:Book>> was created. This feature is in beta. To learn more, see [WIDGET](https://docs.ocrolus.com/docs/widget) guide.
  - `is_public` boolean: `true` allows all users in your organization to see and upload <<glossary:Document>>s into this <<glossary:Book>>.
  - `xid` string: A free form field that can be used to associate a <<glossary:Book>> with some identity outside of Ocrolus.

## Response `200`

Success

- union
  - object
    - `status` integer: A numerical code that indicates the status of the request.
    - `response` object: An object received from the server that potentially contains data.
      - `name` string: The name of the <<glossary:Book>> that will be created.
      - `created` string: ISO 8601 timestamp when the <<glossary:Book>> was created.
      - `created_ts` string: ISO 8601 timestamp when the <<glossary:Book>> was created.
      - `pk` integer: The unique primary key of the <<glossary:Book>>
      - `owner_email` string: The email of the user that created or currently owns the <<glossary:Book>>.
      - `is_public` boolean: Indicates if all users in your organization can see and upload <<glossary:Document>>s into this <<glossary:Book>>."
      - `uuid` string: The unique identifier of the <<glossary:Book>>.
      - `book_type` 'DEFAULT' | 'INSTANT_ML' | 'WIDGET': Determines what type of processing the <<glossary:Book>> will go through.
      - `xid` string, nullable: A free form field that can be used to associate a <<glossary:Book>> with some identity outside of Ocrolus.
      - `id` integer: The <<glossary:PK>> of the <<glossary:Book>>.
      - `book_class` 'COMPLETE' | 'INSTANT' | 'INSTANT_CLASSIFY_ONLY' | 'INSTANT_CLASSIFY_ISO_CAPTURE': The processing type of the Book.
    - `message` string: A textual description that indicates details about this response's status.
  - object
    - `status` integer: A numerical code that indicates the status of the request.
    - `code` integer: A numerical code that indicates the nature of an error.
    - `response` object: An object received from the server that potentially contains data.
    - `message` string: A textual description that indicates details about this response's status.
    - `meta` object: An object received from the server that potentially contains data.
      - `status` integer: A numerical code that indicates the status of the request.
      - `message` string: A textual description that indicates details about this response's status.
      - `code` integer: A numerical code that indicates the nature of an error.

---

[API](https://skmtc.dev/ocrolus/apis/book-commands.md) - [All operations](https://skmtc.dev/ocrolus/apis/book-commands/llms.txt) - [OpenAPI document](https://skmtc.dev/ocrolus/apis/book-commands/revisions/2b1d4cab8032?raw)
