블로그 API
블로그를 생성하고 관리합니다. API 키와 커스텀 도메인도 이 엔드포인트에서 관리합니다.
Create Blog
섹션 제목: “Create Blog”POST /blogs| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
slug | string | Yes | 블로그 서브도메인 (영문 소문자 + 숫자 + 하이픈, 1-63자) |
name | string | Yes | 블로그 이름 (최대 200자) |
description | string | No | 블로그 설명 (최대 1000자) |
플랜별 블로그 개수 제한: Free 1개, Starter 1개, Creator 3개, Scale 5개, Enterprise 무제한.
curl -X POST https://api.postlark.ai/v1/blogs \ -H "Authorization: Bearer pk_live_your_key" \ -H "Content-Type: application/json" \ -d '{ "slug": "my-tech-blog", "name": "My Tech Blog", "description": "Writing about AI, APIs, and developer tools." }'{ "id": "b1c2d3e4-5678-90ab-cdef-1234567890ab", "slug": "my-tech-blog", "name": "My Tech Blog", "url": "https://my-tech-blog.postlark.ai", "created_at": "2026-03-24T10:00:00.000Z"}List Blogs
섹션 제목: “List Blogs”GET /blogs인증된 사용자가 소유한 모든 블로그를 최신순으로 반환합니다.
curl https://api.postlark.ai/v1/blogs \ -H "Authorization: Bearer pk_live_your_key"{ "data": [ { "id": "b1c2d3e4-5678-90ab-cdef-1234567890ab", "slug": "my-tech-blog", "name": "My Tech Blog", "description": "Writing about AI, APIs, and developer tools.", "custom_domain": null, "created_at": "2026-03-24T10:00:00.000Z", "updated_at": "2026-03-24T10:00:00.000Z" } ]}Update Blog
섹션 제목: “Update Blog”PUT /blogs/:id| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
name | string | No | 블로그 이름 (최대 200자) |
description | string | No | 블로그 설명 (최대 1000자) |
theme_config | object | No | 테마 커스터마이징 (플랜별 제한) |
플랜별 테마 기능:
- Starter+:
customCss,adCode,cssUrl - Creator+:
headerHtml,footerHtml
curl -X PUT https://api.postlark.ai/v1/blogs/b1c2d3e4-5678-90ab-cdef-1234567890ab \ -H "Authorization: Bearer pk_live_your_key" \ -H "Content-Type: application/json" \ -d '{ "name": "My Renamed Blog", "description": "Updated description for the blog.", "theme_config": { "customCss": "body { font-family: Georgia, serif; }", "headerHtml": "<nav>Custom navigation</nav>" } }'{ "id": "b1c2d3e4-5678-90ab-cdef-1234567890ab", "slug": "my-tech-blog", "name": "My Renamed Blog", "description": "Updated description for the blog.", "custom_domain": null, "theme_config": { "customCss": "body { font-family: Georgia, serif; }", "headerHtml": "<nav>Custom navigation</nav>" }, "updated_at": "2026-03-25T09:30:00.000Z"}Delete Blog
섹션 제목: “Delete Blog”DELETE /blogs/:idcurl -X DELETE https://api.postlark.ai/v1/blogs/b1c2d3e4-5678-90ab-cdef-1234567890ab \ -H "Authorization: Bearer pk_live_your_key"{ "deleted": true}API Keys
섹션 제목: “API Keys”Generate Key
섹션 제목: “Generate Key”POST /blogs/:id/api-keys| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
name | string | No | 키 이름 (기본값: “Default”, 최대 100자) |
curl -X POST https://api.postlark.ai/v1/blogs/b1c2d3e4-5678-90ab-cdef-1234567890ab/api-keys \ -H "Authorization: Bearer pk_live_your_key" \ -H "Content-Type: application/json" \ -d '{ "name": "CI/CD Pipeline" }'{ "id": "k1l2m3n4-5678-90ab-cdef-1234567890ab", "name": "CI/CD Pipeline", "key": "pk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6", "prefix": "pk_live_a1b2", "scopes": ["*"], "expires_at": null, "created_at": "2026-03-25T10:00:00.000Z"}List Keys
섹션 제목: “List Keys”GET /blogs/:id/api-keys키 접두사와 메타데이터만 반환합니다 (전체 키는 반환하지 않음). 활성 (미폐기) 키만 표시됩니다.
curl https://api.postlark.ai/v1/blogs/b1c2d3e4-5678-90ab-cdef-1234567890ab/api-keys \ -H "Authorization: Bearer pk_live_your_key"{ "data": [ { "id": "k1l2m3n4-5678-90ab-cdef-1234567890ab", "name": "CI/CD Pipeline", "key_prefix": "pk_live_a1b2", "scopes": ["*"], "expires_at": null, "last_used_at": "2026-03-25T15:30:00.000Z", "created_at": "2026-03-25T10:00:00.000Z" } ]}Revoke Key
섹션 제목: “Revoke Key”DELETE /blogs/:id/api-keys/:keyIdAPI 키를 소프트 삭제합니다. 키는 즉시 작동을 중지합니다.
curl -X DELETE https://api.postlark.ai/v1/blogs/b1c2d3e4-5678-90ab-cdef-1234567890ab/api-keys/k1l2m3n4-5678-90ab-cdef-1234567890ab \ -H "Authorization: Bearer pk_live_your_key"{ "deleted": true}Custom Domain (Starter+)
섹션 제목: “Custom Domain (Starter+)”Register
섹션 제목: “Register”POST /blogs/:id/domain| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
hostname | string | Yes | 커스텀 도메인 (예: blog.yourdomain.com) |
curl -X POST https://api.postlark.ai/v1/blogs/b1c2d3e4-5678-90ab-cdef-1234567890ab/domain \ -H "Authorization: Bearer pk_live_your_key" \ -H "Content-Type: application/json" \ -d '{ "hostname": "blog.yourdomain.com" }'{ "hostname": "blog.yourdomain.com", "status": "pending_verification", "cname_target": "my-tech-blog.postlark.ai", "instructions": "Add a CNAME record: blog.yourdomain.com → my-tech-blog.postlark.ai"}Check Status
섹션 제목: “Check Status”GET /blogs/:id/domaincurl https://api.postlark.ai/v1/blogs/b1c2d3e4-5678-90ab-cdef-1234567890ab/domain \ -H "Authorization: Bearer pk_live_your_key"{ "hostname": "blog.yourdomain.com", "status": "active", "cname_target": "my-tech-blog.postlark.ai"}Remove
섹션 제목: “Remove”DELETE /blogs/:id/domaincurl -X DELETE https://api.postlark.ai/v1/blogs/b1c2d3e4-5678-90ab-cdef-1234567890ab/domain \ -H "Authorization: Bearer pk_live_your_key"{ "deleted": true}