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_KEYGetting 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-typesResponse
{
"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
| Type | Description |
|---|---|
| νμ‘°λ¬Έ | 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/createRequest 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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
keyword | string | β | - | Core keyword for document generation (max 1000 chars) |
document_type | string | β | - | Document type (see document-types endpoint) |
language | string | β | ko | Output language (ko, en, ja, zh) |
is_search | boolean | β | false | Whether to use web search |
reference_ids | array[int] | β | null | List 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
| Field | Type | Description |
|---|---|---|
data.document_id | integer | Generated document ID |
data.title | string | Generated document title |
data.content | string | Generated document content |
data.document_type | string | Document type |
data.language | string | Document language |
data.created_at | integer | Creation 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/modifyRequest Body
{
"document_id": 123,
"title": "Modified Document Title",
"content": "This is the modified document content..."
}Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
document_id | integer | β | Document ID to modify |
title | string | β | Title to update (keeps existing if omitted) |
content | string | β | 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-aiRequest Body
{
"document_id": 123,
"modification_prompt": "Please revise to a more formal tone"
}Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
document_id | integer | β | Document ID to modify |
modification_prompt | string | β | 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/listQuery Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
page | integer | β | 1 | Page number (starting from 1) |
limit | integer | β | 10 | Items 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
| Parameter | Type | Required | Description |
|---|---|---|---|
document_id | integer | β | 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
| Parameter | Type | Required | Description |
|---|---|---|---|
document_id | integer | β | 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/pdfPath Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
document_id | integer | β | Document ID to download |
Response
On success, the PDF file is returned in binary format.
| Header | Value |
|---|---|
| Content-Type | application/pdf |
| Content-Disposition | attachment; 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/docxPath Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
document_id | integer | β | Document ID to download |
Response
On success, the DOCX file is returned in binary format.
| Header | Value |
|---|---|
| Content-Type | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
| Content-Disposition | attachment; 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/listQuery Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
page | integer | β | 1 | Page number |
limit | integer | β | 10 | Items 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/referenceRequest Body
{
"name": "Company Profile",
"content": "PulitzerAI provides AI-powered document writing solutions...",
"file_url": "https://example.com/company_profile.pdf"
}Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | β | Reference document name |
content | string | β | Reference document text content |
file_url | string | β | 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-urlendpoint 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
| Parameter | Type | Required | Description |
|---|---|---|---|
reference_id | integer | β | 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-urlRequest Body
{
"filename": "attachment.pdf"
}Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
filename | string | β | Filename to upload (including extension) |
Supported File Formats
| Format | Content-Type |
|---|---|
application/pdf | |
| Word | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
| PNG | image/png |
| JPEG | image/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
| Field | Type | Description |
|---|---|---|
presigned_url | string | S3 Presigned URL for file upload |
file_url | string | File access URL after upload (use when creating reference) |
expires_in | integer | Presigned URL expiration time (seconds) |
π Upload Process
- Step 1: Request Presigned URL from this endpoint
- Step 2: Upload the file via PUT method to the issued
presigned_url - Step 3: Use the
file_urlwhen 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 Code | Description |
|---|---|
| 200 | Request successful |
| 400 | Bad request (parameter error) |
| 401 | Authentication failed (API key error) |
| 403 | Unauthorized |
| 404 | Resource not found |
| 500 | Internal 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
- λ¬Έμ μ λ°μ΄νΈ: μ΄ λ¬Έμλ μ κΈ°μ μΌλ‘ μ λ°μ΄νΈλ©λλ€.