---
title: "Handle Paper Processing Webhook"
method: POST
path: "/api/webhooks/paper-processing/{job_id}"
---

# Handle Paper Processing Webhook

`POST /api/webhooks/paper-processing/{job_id}`

## Request

- Base URL: `https://api.openpaper.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openpaper.ai/api/webhooks/paper-processing/{job_id}`
- Auth: none declared

Handle webhook from paper processing jobs service.

## Path parameters

- `job_id` string, required

## Request body

- PdfProcessingWebhookData: Schema for webhook data from PDF processing service
  - `task_id` string, required
  - `status` string, required
  - `result` PDFProcessingResult: Result of PDF processing
    - `success` boolean, required
    - `job_id` string, required
    - `raw_content` string, nullable
    - `page_offset_map` object, nullable
    - `metadata` PaperMetadataExtraction
      - `title` string, required: Title of the paper in normal case
      - `authors` string[]: List of authors
      - `abstract` string: Abstract of the paper
      - `institutions` string[]: List of institutions involved in the publication.
      - `keywords` string[]: 3-8 concise topical keywords in normal case (not Title Case or ALL CAPS); capitalize only proper nouns and acronyms.
      - `summary` string: A concise, well-structured summary of the paper in markdown format. Include: 1. Key findings and contributions 2. Research methodology 3. Results and implications 4. Potential applications or impact Format guidelines: - Optional opening title (under 10 words) - First paragraph: 2-4 sentence overview of the paper - Use clear headings, bullet points, and tables for organization - Include relevant data points and metrics when available - Use plain language while preserving technical accuracy - Include inline citations to support claims that refer to the paper's content. This is especially important for claims about the findings, methodology, and results. Citation guidelines: - Use [^1], [^2], [^6, ^7] etc. for citations in the summary - Always increase the index of the citation sequentially, starting from 1 - You will separately provide a list of citations in the `summary_citations` field with the raw text and index The summary should be accessible to readers with basic domain knowledge while maintaining scientific integrity.
      - `summary_citations` ResponseCitation[]: List of citations that are relevant to the summary. These should be direct quotes or paraphrases from the paper that support the summary provided. Remember to include the citation index (e.g., [^1], [^2]) in the summary.
        - `text` string, required: The raw text of the citation as it appears in the paper. Ensure that this is a direct quote or paraphrase from the paper.
        - `index` integer, required: The index of the citation in the paper's reference list. This is used to identify the citation in discussions or findings.
        - `paper_id` string, nullable: The unique identifier of the paper from which this citation is drawn. This helps to contextualize the citation within the broader multi-paper analysis. This is required when there are multiple papers being analyzed.
      - `publish_date` string, nullable: Publishing date of the paper in YYYY-MM-DD format
      - `highlights` AIHighlight[]: List of key highlights from the paper. These should be significant quotes that are must-reads of the paper's findings and contributions. Each highlight should include the text of the highlight and an annotation explaining its significance or relevance to the paper's content. Particularly drill into interesting, novel findings, methodologies, or implications that are worth noting. Pay special attention to tables, figures, and diagrams that may contain important information.
        - `text` string, required: The raw text of the highlight as it appears in the paper. Ensure that this is a direct quote or paraphrase from the paper.
        - `annotation` string, required: The context or annotation for the highlight, explaining its significance or relevance to the paper's content. Less than 350 characters.
        - `type` 'topic' | 'motivation' | 'method' | 'evidence' | 'result' | 'impact' | 'general', required
    - `s3_object_key` string, nullable
    - `file_url` string, nullable
    - `preview_url` string, nullable
    - `preview_object_key` string, nullable
    - `error` string, nullable
    - `duration` number, nullable
  - `error` string, nullable
  - `user_message` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/openpaper/apis/open-paper.md) - [All operations](https://skmtc.dev/openpaper/apis/open-paper/llms.txt) - [OpenAPI document](https://skmtc.dev/openpaper/apis/open-paper/revisions/c2ad03216101?raw)
