Official Document API (κ³΅λ¬Έμ„œ API)

Use the Official Document API to create and manage AI-powered official documents. Automatically generate various types of official documents including cooperation letters, notices, and announcements, and download them in PDF/DOCX format.

Authentication

All API requests require an API key in the PULITZER-API-KEY header.

Header Setup

PULITZER-API-KEY: YOUR_API_KEY

Getting API Key

You can obtain an API key from the PulitzerAI dashboard.

  • Navigate to Settings after logging into the dashboard
  • Create a new key in the API Key Management section
  • Store the generated key securely

Authentication Error

If the API key is invalid or missing, the following response is returned:

{
  "status": "FAIL",
  "success": false,
  "message": "API key is invalid."
}
curl -X GET "https://api.pulitzer.ai/live/openapi/official-document/document-types" \
  -H "PULITZER-API-KEY: YOUR_API_KEY"

Document Type List

Retrieve the list of available document types. Use these values in the document_type parameter when creating documents.

GET https://api.pulitzer.ai/live/openapi/official-document/document-types

Response

{
  "status": "SUCCESS",
  "success": true,
  "message": "Document types retrieved successfully",
  "data": {
    "document_types": [
      {
        "name": "Cooperation Letter",
        "description": "Interdepartmental cooperation request"
      },
      {
        "name": "Notice",
        "description": "General notice document"
      },
      {
        "name": "Announcement",
        "description": "Company-wide announcement"
      },
      {
        "name": "Product Launch Notice",
        "description": "New product launch announcement"
      }
    ]
  }
}

Supported Document Types

TypeDescription
ν˜‘μ‘°λ¬ΈInterdepartmental cooperation request
μ•ˆλ‚΄λ¬ΈGeneral notice document
곡지사항Company-wide announcement
μ œν’ˆ μΆœμ‹œ μ•ˆλ‚΄λ¬ΈNew product launch announcement
curl -X GET "https://api.pulitzer.ai/live/openapi/official-document/document-types" \
  -H "PULITZER-API-KEY: YOUR_API_KEY"

Create Document

AI automatically generates official documents based on keywords and document types.

POST https://api.pulitzer.ai/live/openapi/official-document/create

Request Body

{
  "keyword": "2024 H2 New Product Launch Announcement",
  "document_type": "Product Launch Notice",
  "language": "en",
  "is_search": true,
  "reference_ids": [
    1,
    2
  ]
}

Request Body Parameters

ParameterTypeRequiredDefaultDescription
keywordstringβœ…-Core keyword for document generation (max 1000 chars)
document_typestringβœ…-Document type (see document-types endpoint)
languagestring❌koOutput language (ko, en, ja, zh)
is_searchboolean❌falseWhether to use web search
reference_idsarray[int]❌nullList of reference material IDs

Response

{
  "status": "SUCCESS",
  "success": true,
  "message": "Document created successfully",
  "data": {
    "document_id": 123,
    "title": "2024 H2 New Product Launch Announcement",
    "content": "To: All employees\n\n1. Purpose...",
    "document_type": "Product Launch Notice",
    "language": "en",
    "created_at": 1704067200
  }
}

Response Fields

FieldTypeDescription
data.document_idintegerGenerated document ID
data.titlestringGenerated document title
data.contentstringGenerated document content
data.document_typestringDocument type
data.languagestringDocument language
data.created_atintegerCreation time (Unix timestamp)
curl -X POST "https://api.pulitzer.ai/live/openapi/official-document/create" \
  -H "PULITZER-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "keyword": "2024 H2 New Product Launch Announcement",
    "document_type": "Product Launch Notice",
    "language": "en",
    "is_search": true,
    "reference_ids": [1, 2]
  }'

Modify Document (Direct)

Directly modify the title and content of an official document.

POST https://api.pulitzer.ai/live/openapi/official-document/modify

Request Body

{
  "document_id": 123,
  "title": "Modified Document Title",
  "content": "This is the modified document content..."
}

Request Body Parameters

ParameterTypeRequiredDescription
document_idintegerβœ…Document ID to modify
titlestring❌Title to update (keeps existing if omitted)
contentstring❌Content to update (keeps existing if omitted)

Response

{
  "status": "SUCCESS",
  "success": true,
  "message": "Document modified successfully",
  "data": {
    "document_id": 123,
    "title": "Modified Document Title",
    "content": "This is the modified document content...",
    "updated_at": 1704153600
  }
}
curl -X POST "https://api.pulitzer.ai/live/openapi/official-document/modify" \
  -H "PULITZER-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document_id": 123,
    "title": "Modified Document Title",
    "content": "Modified document content..."
  }'

Modify Document (AI)

Modify official documents using natural language commands with AI.

POST https://api.pulitzer.ai/live/openapi/official-document/modify-ai

Request Body

{
  "document_id": 123,
  "modification_prompt": "Please revise to a more formal tone"
}

Request Body Parameters

ParameterTypeRequiredDescription
document_idintegerβœ…Document ID to modify
modification_promptstringβœ…Modification instructions for AI

Modification Prompt Examples

  • "더 곡식적인 μ–΄μ‘°λ‘œ μˆ˜μ •ν•΄μ£Όμ„Έμš”"
  • "μ˜μ–΄λ‘œ λ²ˆμ—­ν•΄μ£Όμ„Έμš”"
  • "λ‚΄μš©μ„ 더 κ°„κ²°ν•˜κ²Œ μš”μ•½ν•΄μ£Όμ„Έμš”"
  • "μˆ˜μ‹ μ²˜λ₯Ό 'μ „ μž„μ§μ›'μ—μ„œ 'λ§ˆμΌ€νŒ…νŒ€'으둜 λ³€κ²½ν•΄μ£Όμ„Έμš”"

Response

{
  "status": "SUCCESS",
  "success": true,
  "message": "Document AI modification completed",
  "data": {
    "document_id": 123,
    "title": "2024 H2 New Product Launch Announcement",
    "content": "To: All employees\n\nThank you for your dedication...",
    "updated_at": 1704153600
  }
}
curl -X POST "https://api.pulitzer.ai/live/openapi/official-document/modify-ai" \
  -H "PULITZER-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document_id": 123,
    "modification_prompt": "Please revise to a more formal tone"
  }'

List Documents

Retrieve a paginated list of generated official documents.

GET https://api.pulitzer.ai/live/openapi/official-document/list

Query Parameters

ParameterTypeRequiredDefaultDescription
pageinteger❌1Page number (starting from 1)
limitinteger❌10Items per page (max 100)

Response

{
  "status": "SUCCESS",
  "success": true,
  "message": "Document list retrieved successfully",
  "data": {
    "documents": [
      {
        "id": 123,
        "title": "2024 H2 New Product Launch Announcement",
        "document_type": "Product Launch Notice",
        "language": "en",
        "created_at": 1704067200
      }
    ],
    "total": 45,
    "page": 1,
    "limit": 10,
    "total_pages": 5
  }
}
curl -X GET "https://api.pulitzer.ai/live/openapi/official-document/list?page=1&limit=10" \
  -H "PULITZER-API-KEY: YOUR_API_KEY"

Document Detail

Retrieve detailed information of a specific official document.

GET https://api.pulitzer.ai/live/openapi/official-document/{"{document_id}"}

Path Parameters

ParameterTypeRequiredDescription
document_idintegerβœ…Document ID to retrieve

Response

{
  "status": "SUCCESS",
  "success": true,
  "message": "Document retrieved successfully",
  "data": {
    "id": 123,
    "title": "2024 H2 New Product Launch Announcement",
    "content": "To: All employees\n\n1. Purpose...",
    "document_type": "Product Launch Notice",
    "language": "en",
    "created_at": 1704067200,
    "updated_at": 1704153600
  }
}
curl -X GET "https://api.pulitzer.ai/live/openapi/official-document/123" \
  -H "PULITZER-API-KEY: YOUR_API_KEY"

Delete Document

Delete a specific document. Deleted documents cannot be recovered.

DELETE https://api.pulitzer.ai/live/openapi/official-document/{"{document_id}"}

Path Parameters

ParameterTypeRequiredDescription
document_idintegerβœ…Document ID to delete

Response

{
  "status": "SUCCESS",
  "success": true,
  "message": "Document deleted successfully",
  "data": null
}

⚠️ Caution

  • Deleted documents cannot be recovered.
  • You can only delete documents you created.
curl -X DELETE "https://api.pulitzer.ai/live/openapi/official-document/123" \
  -H "PULITZER-API-KEY: YOUR_API_KEY"

PDF Download

Download an official document as a PDF file.

GET https://api.pulitzer.ai/live/openapi/official-document/{"{document_id}"}/download/pdf

Path Parameters

ParameterTypeRequiredDescription
document_idintegerβœ…Document ID to download

Response

On success, the PDF file is returned in binary format.

HeaderValue
Content-Typeapplication/pdf
Content-Dispositionattachment; filename="document.pdf"
curl -X GET "https://api.pulitzer.ai/live/openapi/official-document/123/download/pdf" \
  -H "PULITZER-API-KEY: YOUR_API_KEY" \
  -o "official_document.pdf"

DOCX Download

Download an official document as a Microsoft Word (DOCX) file.

GET https://api.pulitzer.ai/live/openapi/official-document/{"{document_id}"}/download/docx

Path Parameters

ParameterTypeRequiredDescription
document_idintegerβœ…Document ID to download

Response

On success, the DOCX file is returned in binary format.

HeaderValue
Content-Typeapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
Content-Dispositionattachment; filename="document.docx"
curl -X GET "https://api.pulitzer.ai/live/openapi/official-document/123/download/docx" \
  -H "PULITZER-API-KEY: YOUR_API_KEY" \
  -o "official_document.docx"

List References

Retrieve a list of reference materials available for document creation.

GET https://api.pulitzer.ai/live/openapi/official-document/reference/list

Query Parameters

ParameterTypeRequiredDefaultDescription
pageinteger❌1Page number
limitinteger❌10Items per page

Response

{
  "status": "SUCCESS",
  "success": true,
  "message": "Reference list retrieved successfully",
  "data": {
    "references": [
      {
        "id": 1,
        "name": "Company Profile",
        "content": "PulitzerAI provides AI-powered document writing solutions...",
        "file_url": "https://example.com/company.pdf",
        "created_at": 1704067200
      }
    ],
    "total": 10,
    "page": 1,
    "limit": 10
  }
}
curl -X GET "https://api.pulitzer.ai/live/openapi/official-document/reference/list?page=1&limit=10" \
  -H "PULITZER-API-KEY: YOUR_API_KEY"

Create Reference

Register reference materials for document creation. Registering company profiles, product info, and policy documents helps AI generate more accurate documents.

POST https://api.pulitzer.ai/live/openapi/official-document/reference

Request Body

{
  "name": "Company Profile",
  "content": "PulitzerAI provides AI-powered document writing solutions...",
  "file_url": "https://example.com/company_profile.pdf"
}

Request Body Parameters

ParameterTypeRequiredDescription
namestringβœ…Reference document name
contentstring❌Reference document text content
file_urlstring❌Reference file URL (use URL after S3 upload)

Response

{
  "status": "SUCCESS",
  "success": true,
  "message": "Reference created successfully",
  "data": {
    "reference_id": 456,
    "name": "Company Profile",
    "created_at": 1704067200
  }
}

πŸ’‘ Tips

  • Register company profiles, CI guidelines, etc. for consistent document generation
  • Upload PDF files via file/upload-url endpoint first, then use the URL
curl -X POST "https://api.pulitzer.ai/live/openapi/official-document/reference" \
  -H "PULITZER-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Company Profile",
    "content": "PulitzerAI provides AI-based document writing solutions...",
    "file_url": "https://example.com/company_profile.pdf"
  }'

Delete Reference

Delete a registered reference document.

DELETE https://api.pulitzer.ai/live/openapi/official-document/reference/{"{reference_id}"}

Path Parameters

ParameterTypeRequiredDescription
reference_idintegerβœ…Reference document ID to delete

Response

{
  "status": "SUCCESS",
  "success": true,
  "message": "Reference deleted successfully",
  "data": null
}
curl -X DELETE "https://api.pulitzer.ai/live/openapi/official-document/reference/456" \
  -H "PULITZER-API-KEY: YOUR_API_KEY"

File Upload (Presigned URL)

Get an S3 Presigned URL for uploading files to use as reference documents.

POST https://api.pulitzer.ai/live/openapi/official-document/file/upload-url

Request Body

{
  "filename": "attachment.pdf"
}

Request Body Parameters

ParameterTypeRequiredDescription
filenamestringβœ…Filename to upload (including extension)

Supported File Formats

FormatContent-Type
PDFapplication/pdf
Wordapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
PNGimage/png
JPEGimage/jpeg

Response

{
  "status": "SUCCESS",
  "success": true,
  "message": "Upload URL generated successfully",
  "data": {
    "presigned_url": "https://s3.amazonaws.com/bucket/...",
    "file_url": "https://cdn.pulitzer.ai/files/abc123.pdf",
    "expires_in": 3600
  }
}

Response Fields

FieldTypeDescription
presigned_urlstringS3 Presigned URL for file upload
file_urlstringFile access URL after upload (use when creating reference)
expires_inintegerPresigned URL expiration time (seconds)

πŸ“ Upload Process

  1. Step 1: Request Presigned URL from this endpoint
  2. Step 2: Upload the file via PUT method to the issued presigned_url
  3. Step 3: Use the file_url when creating reference documents after upload

⚠️ Caution

  • The Presigned URL must be used within 1 hour of issuance.
# Step 1: Request presigned URL
curl -X POST "https://api.pulitzer.ai/live/openapi/official-document/file/upload-url" \
  -H "PULITZER-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "attachment.pdf",
    "content_type": "application/pdf"
  }'

# Step 2: Upload file to presigned URL
curl -X PUT "PRESIGNED_URL" \
  -H "Content-Type: application/pdf" \
  --data-binary "@attachment.pdf"

Error Response

All APIs respond in the following format when an error occurs.
{
  "status": "FAIL",
  "success": false,
  "message": "Error message",
  "data": null
}

HTTP Status Codes

Status CodeDescription
200Request successful
400Bad request (parameter error)
401Authentication failed (API key error)
403Unauthorized
404Resource not found
500Internal server error

Integration Guide

B2B Integration Scenarios

1. Basic Document Creation Flow

1. document-types 쑰회 β†’ 생성할 λ¬Έμ„œ μœ ν˜• 확인
2. create 호좜 β†’ κ³΅λ¬Έμ„œ 생성
3. ν•„μš” μ‹œ modify λ˜λŠ” modify-ai β†’ μˆ˜μ •
4. download/pdf λ˜λŠ” download/docx β†’ μ΅œμ’… λ¬Έμ„œ λ‹€μš΄λ‘œλ“œ

2. Accurate Document Generation with References

1. file/upload-url β†’ νšŒμ‚¬ μ†Œκ°œμ„œ/μ œν’ˆ 정보 PDF μ—…λ‘œλ“œ
2. reference 생성 β†’ μ°Έμ‘° λ¬Έμ„œ 등둝
3. create (reference_ids 포함) β†’ μ°Έμ‘° λ¬Έμ„œ 기반 κ³΅λ¬Έμ„œ 생성

SDK Support (Coming Soon)

Currently available as REST API. Python/JavaScript SDKs are planned for future release.

Technical Support

  • 이메일: support@pulitzer.ai
  • λ¬Έμ„œ μ—…λ°μ΄νŠΈ: 이 λ¬Έμ„œλŠ” μ •κΈ°μ μœΌλ‘œ μ—…λ°μ΄νŠΈλ©λ‹ˆλ‹€.