---
title: "Create and analyze a document synchronously"
method: POST
path: "/api/v1/documents/analyze"
tags: ["Documents"]
---

# Create and analyze a document synchronously

`POST /api/v1/documents/analyze`

## Request

- Base URL: `https://www.ifillpdf.com`
- URL: `https://www.ifillpdf.com/api/v1/documents/analyze`
- Auth: HTTP bearer

Runs the full analysis before responding. Best for short documents where the caller can hold a 10-30 second request.

## Request body

- union
  - object
    - `pending_upload_id` string, required
    - `pdf_url` string, uri
    - `name` string
    - `description` string
    - `suggested_entities` SuggestedEntity[]
      - `id` string, required
      - `label` string, required
      - `color` string
      - `source` 'user' | 'history'
  - object
    - `pending_upload_id` string
    - `pdf_url` string, uri, required
    - `name` string
    - `description` string
    - `suggested_entities` SuggestedEntity[]
      - `id` string, required
      - `label` string, required
      - `color` string
      - `source` 'user' | 'history'

## Response `200`

Analysis complete.

- AnalyzeResponse
  - `document_id` string, uuid, required
  - `page_count` integer, required
  - `schema` DocumentSchema, required
    - `version` integer
    - `documentType` string
    - `pages` object[]
    - `parties` DocumentEntity[]
      - `id` string
      - `label` string
      - `description` string
      - `color` string
    - `fields` DocumentField[]
      - `id` string
      - `name` string
      - `label` string
      - `type` 'text' | 'checkbox' | 'signature' | 'date' | 'number'
      - `page` integer
      - `partyId` string
      - `rect` object
  - `page_dimensions` object[]
  - `page_images_count` integer
  - `preview_image_url` string, nullable
  - `quota` Quota, required
    - `remaining` integer
    - `plan` string

## Other responses

- `401`: Missing or invalid API key.
- `402`: Team page quota is exhausted.
- `429`: Rate limit exceeded.

---

[API](https://skmtc.dev/ifillpdf/apis/ifillpdf-api.md) · [All operations](https://skmtc.dev/ifillpdf/apis/ifillpdf-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ifillpdf/apis/ifillpdf-api/revisions/17d927bde9ea?raw)
