Official Document API (공문서 API)
Official Document API를 사용하여 AI 기반 공문서를 생성하고 관리할 수 있습니다.
협조문, 안내문, 공지사항 등 다양한 유형의 공식 문서를 자동으로 작성하고, PDF/DOCX 형식으로 다운로드할 수 있습니다.
인증
모든 API 요청에는 PULITZER-API-KEY 헤더에 API 키가 필요합니다.
헤더 설정
PULITZER-API-KEY: YOUR_API_KEYAPI 키 획득
API 키는 PulitzerAI 대시보드에서 발급받을 수 있습니다.
- 대시보드 로그인 후 설정 메뉴로 이동
- API 키 관리 섹션에서 새 키 생성
- 생성된 키를 안전하게 보관
인증 오류
API 키가 잘못되거나 누락된 경우 다음과 같은 응답이 반환됩니다:
{
"status": "FAIL",
"success": false,
"message": "API 키가 유효하지 않습니다."
}curl -X GET "https://api.pulitzer.ai/live/openapi/official-document/document-types" \
-H "PULITZER-API-KEY: YOUR_API_KEY"공문서 유형 조회
생성 가능한 공문서 유형 목록을 조회합니다. 공문서 생성 시 document_type 파라미터에 이 값을 사용합니다.
GET https://api.pulitzer.ai/live/openapi/official-document/document-types응답
{
"status": "SUCCESS",
"success": true,
"message": "공문서 유형 조회 성공",
"data": {
"document_types": [
{
"name": "협조문",
"description": "부서 간 협조 요청 공문서"
},
{
"name": "안내문",
"description": "일반 안내 목적의 공문서"
},
{
"name": "공지사항",
"description": "전사 공지용 공문서"
},
{
"name": "제품 출시 안내문",
"description": "신제품 출시 관련 공문서"
}
]
}
}지원 문서 유형
| 유형 | 설명 |
|---|---|
| 협조문 | 부서 간 협조 요청 공문서 |
| 안내문 | 일반 안내 목적의 공문서 |
| 공지사항 | 전사 공지용 공문서 |
| 제품 출시 안내문 | 신제품 출시 관련 공문서 |
curl -X GET "https://api.pulitzer.ai/live/openapi/official-document/document-types" \
-H "PULITZER-API-KEY: YOUR_API_KEY"공문서 생성
키워드와 문서 유형을 기반으로 AI가 공문서를 자동 생성합니다.
POST https://api.pulitzer.ai/live/openapi/official-document/create요청 본문
{
"keyword": "2024년 하반기 신제품 출시 안내",
"document_type": "제품 출시 안내문",
"language": "ko",
"is_search": true,
"reference_ids": [
1,
2
]
}Request Body Parameters
| 파라미터 | 타입 | 필수 | 기본값 | 설명 |
|---|---|---|---|---|
keyword | string | ✅ | - | 공문서 생성을 위한 핵심 키워드 (최대 1000자) |
document_type | string | ✅ | - | 공문서 유형 (document-types 엔드포인트 참조) |
language | string | ❌ | ko | 생성할 언어 (ko, en, ja, zh) |
is_search | boolean | ❌ | false | 웹 검색 기능 사용 여부 |
reference_ids | array[int] | ❌ | null | 참조할 자료 ID 목록 |
응답
{
"status": "SUCCESS",
"success": true,
"message": "공문서 생성 완료",
"data": {
"document_id": 123,
"title": "2024년 하반기 신제품 출시 안내",
"content": "수신: 전 임직원\n\n1. 목적...",
"document_type": "제품 출시 안내문",
"language": "ko",
"created_at": 1704067200
}
}Response Fields
| 필드명 | 타입 | 설명 |
|---|---|---|
data.document_id | integer | 생성된 공문서 ID |
data.title | string | 생성된 공문서 제목 |
data.content | string | 생성된 공문서 내용 |
data.document_type | string | 공문서 유형 |
data.language | string | 공문서 언어 |
data.created_at | integer | 생성 시간 (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년 하반기 신제품 출시 안내",
"document_type": "제품 출시 안내문",
"language": "ko",
"is_search": true,
"reference_ids": [1, 2]
}'공문서 직접 수정
공문서의 제목과 내용을 직접 수정합니다.
POST https://api.pulitzer.ai/live/openapi/official-document/modify요청 본문
{
"document_id": 123,
"title": "수정된 공문서 제목",
"content": "수정된 공문서 내용입니다..."
}Request Body Parameters
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
document_id | integer | ✅ | 수정할 공문서 ID |
title | string | ❌ | 수정할 제목 (미입력 시 기존 값 유지) |
content | string | ❌ | 수정할 내용 (미입력 시 기존 값 유지) |
응답
{
"status": "SUCCESS",
"success": true,
"message": "공문서 수정 완료",
"data": {
"document_id": 123,
"title": "수정된 공문서 제목",
"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": "수정된 공문서 제목",
"content": "수정된 공문서 내용입니다..."
}'공문서 AI 수정
AI를 활용하여 자연어 명령으로 공문서를 수정합니다.
POST https://api.pulitzer.ai/live/openapi/official-document/modify-ai요청 본문
{
"document_id": 123,
"modification_prompt": "더 공식적인 어조로 수정해주세요"
}Request Body Parameters
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
document_id | integer | ✅ | 수정할 공문서 ID |
modification_prompt | string | ✅ | AI에게 전달할 수정 지시사항 |
수정 프롬프트 예시
"더 공식적인 어조로 수정해주세요""영어로 번역해주세요""내용을 더 간결하게 요약해주세요""수신처를 '전 임직원'에서 '마케팅팀'으로 변경해주세요"
응답
{
"status": "SUCCESS",
"success": true,
"message": "공문서 AI 수정 완료",
"data": {
"document_id": 123,
"title": "2024년 하반기 신제품 출시 안내",
"content": "수신: 전 임직원\n\n귀하의 노고에 감사드립니다...",
"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": "더 공식적인 어조로 수정해주세요"
}'공문서 목록 조회
생성된 공문서 목록을 페이지네이션과 함께 조회합니다.
GET https://api.pulitzer.ai/live/openapi/official-document/listQuery Parameters
| 파라미터 | 타입 | 필수 | 기본값 | 설명 |
|---|---|---|---|---|
page | integer | ❌ | 1 | 페이지 번호 (1부터 시작) |
limit | integer | ❌ | 10 | 페이지당 항목 수 (최대 100) |
응답
{
"status": "SUCCESS",
"success": true,
"message": "공문서 목록 조회 성공",
"data": {
"documents": [
{
"id": 123,
"title": "2024년 하반기 신제품 출시 안내",
"document_type": "제품 출시 안내문",
"language": "ko",
"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"공문서 상세 조회
특정 공문서의 상세 정보를 조회합니다.
GET https://api.pulitzer.ai/live/openapi/official-document/{"{document_id}"}Path Parameters
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
document_id | integer | ✅ | 조회할 공문서 ID |
응답
{
"status": "SUCCESS",
"success": true,
"message": "공문서 조회 성공",
"data": {
"id": 123,
"title": "2024년 하반기 신제품 출시 안내",
"content": "수신: 전 임직원\n\n1. 목적...",
"document_type": "제품 출시 안내문",
"language": "ko",
"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 https://api.pulitzer.ai/live/openapi/official-document/{"{document_id}"}Path Parameters
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
document_id | integer | ✅ | 삭제할 공문서 ID |
응답
{
"status": "SUCCESS",
"success": true,
"message": "공문서 삭제 완료",
"data": null
}⚠️ 주의사항
- 삭제된 공문서는 복구할 수 없습니다.
- 본인이 생성한 공문서만 삭제할 수 있습니다.
curl -X DELETE "https://api.pulitzer.ai/live/openapi/official-document/123" \
-H "PULITZER-API-KEY: YOUR_API_KEY"PDF 다운로드
공문서를 PDF 파일로 다운로드합니다.
GET https://api.pulitzer.ai/live/openapi/official-document/{"{document_id}"}/download/pdfPath Parameters
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
document_id | integer | ✅ | 다운로드할 공문서 ID |
응답
성공 시 PDF 파일이 바이너리 형태로 반환됩니다.
| 헤더 | 값 |
|---|---|
| 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 다운로드
공문서를 Microsoft Word (DOCX) 파일로 다운로드합니다.
GET https://api.pulitzer.ai/live/openapi/official-document/{"{document_id}"}/download/docxPath Parameters
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
document_id | integer | ✅ | 다운로드할 공문서 ID |
응답
성공 시 DOCX 파일이 바이너리 형태로 반환됩니다.
| 헤더 | 값 |
|---|---|
| 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"참조 문서 목록 조회
공문서 생성 시 참조할 수 있는 자료 목록을 조회합니다.
GET https://api.pulitzer.ai/live/openapi/official-document/reference/listQuery Parameters
| 파라미터 | 타입 | 필수 | 기본값 | 설명 |
|---|---|---|---|---|
page | integer | ❌ | 1 | 페이지 번호 |
limit | integer | ❌ | 10 | 페이지당 항목 수 |
응답
{
"status": "SUCCESS",
"success": true,
"message": "참조 문서 목록 조회 성공",
"data": {
"references": [
{
"id": 1,
"name": "회사 소개서",
"content": "퓰리처AI는 AI 기반 문서 작성 솔루션...",
"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"참조 문서 생성
공문서 생성 시 참조할 수 있는 자료를 등록합니다. 회사 소개서, 제품 정보, 정책 문서 등을 등록하면 AI가 더 정확한 공문서를 생성할 수 있습니다.
POST https://api.pulitzer.ai/live/openapi/official-document/reference요청 본문
{
"name": "회사 소개서",
"content": "퓰리처AI는 AI 기반 문서 작성 솔루션을 제공합니다...",
"file_url": "https://example.com/company_profile.pdf"
}Request Body Parameters
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
name | string | ✅ | 참조 문서 이름 |
content | string | ❌ | 참조 문서 텍스트 내용 |
file_url | string | ❌ | 참조 파일 URL (S3 업로드 후 URL 사용) |
응답
{
"status": "SUCCESS",
"success": true,
"message": "참조 문서 생성 완료",
"data": {
"reference_id": 456,
"name": "회사 소개서",
"created_at": 1704067200
}
}💡 활용 팁
- 회사 소개서, CI 가이드라인 등을 등록하면 일관된 톤의 공문서 생성 가능
- PDF 파일은
file/upload-url엔드포인트로 먼저 업로드 후 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": "회사 소개서",
"content": "퓰리처AI는 AI 기반 문서 작성 솔루션을 제공합니다...",
"file_url": "https://example.com/company_profile.pdf"
}'참조 문서 삭제
등록된 참조 문서를 삭제합니다.
DELETE https://api.pulitzer.ai/live/openapi/official-document/reference/{"{reference_id}"}Path Parameters
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
reference_id | integer | ✅ | 삭제할 참조 문서 ID |
응답
{
"status": "SUCCESS",
"success": true,
"message": "참조 문서 삭제 완료",
"data": null
}curl -X DELETE "https://api.pulitzer.ai/live/openapi/official-document/reference/456" \
-H "PULITZER-API-KEY: YOUR_API_KEY"파일 업로드 (Presigned URL)
참조 문서로 사용할 파일을 업로드하기 위한 S3 Presigned URL을 발급받습니다.
POST https://api.pulitzer.ai/live/openapi/official-document/file/upload-url요청 본문
{
"filename": "attachment.pdf"
}Request Body Parameters
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
filename | string | ✅ | 업로드할 파일명 (확장자 포함) |
지원 파일 형식
| 형식 | Content-Type |
|---|---|
application/pdf | |
| Word | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
| PNG | image/png |
| JPEG | image/jpeg |
응답
{
"status": "SUCCESS",
"success": true,
"message": "업로드 URL 생성 완료",
"data": {
"presigned_url": "https://s3.amazonaws.com/bucket/...",
"file_url": "https://cdn.pulitzer.ai/files/abc123.pdf",
"expires_in": 3600
}
}Response Fields
| 필드명 | 타입 | 설명 |
|---|---|---|
presigned_url | string | 파일 업로드용 S3 Presigned URL |
file_url | string | 업로드 후 파일 접근 URL (참조 문서 생성 시 사용) |
expires_in | integer | Presigned URL 만료 시간 (초) |
📝 업로드 프로세스
- 1단계: 이 엔드포인트로 Presigned URL 요청
- 2단계: 발급받은
presigned_url로 파일을 PUT 메서드로 업로드 - 3단계: 업로드 완료 후
file_url을 참조 문서 생성 시 사용
⚠️ 주의사항
- Presigned URL은 발급 후 1시간 내에 사용해야 합니다.
# 1단계: 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"
}'
# 2단계: Presigned URL로 파일 업로드
curl -X PUT "PRESIGNED_URL" \
-H "Content-Type: application/pdf" \
--data-binary "@attachment.pdf"에러 응답
모든 API는 에러 발생 시 다음과 같은 형식으로 응답합니다.
{
"status": "FAIL",
"success": false,
"message": "에러 메시지",
"data": null
}HTTP 상태 코드
| 상태 코드 | 설명 |
|---|---|
| 200 | 요청 성공 |
| 400 | 잘못된 요청 (파라미터 오류) |
| 401 | 인증 실패 (API 키 오류) |
| 403 | 권한 없음 |
| 404 | 리소스를 찾을 수 없음 |
| 500 | 서버 내부 오류 |
연동 가이드
B2B 연동 시나리오
1. 기본 공문서 생성 플로우
1. document-types 조회 → 생성할 문서 유형 확인
2. create 호출 → 공문서 생성
3. 필요 시 modify 또는 modify-ai → 수정
4. download/pdf 또는 download/docx → 최종 문서 다운로드
2. 참조 문서를 활용한 정확한 공문서 생성
1. file/upload-url → 회사 소개서/제품 정보 PDF 업로드
2. reference 생성 → 참조 문서 등록
3. create (reference_ids 포함) → 참조 문서 기반 공문서 생성
SDK 지원 (예정)
현재 REST API로 제공되며, Python/JavaScript SDK는 추후 제공 예정입니다.
기술 지원
- 이메일: support@pulitzer.ai
- 문서 업데이트: 이 문서는 정기적으로 업데이트됩니다.