Content OS API
Base URL: https://content-os-api.pcampus.co
Content OS is an AI-native content pipeline that uses Brand DNA as the foundation for every piece of content it creates. Every agent reads Brand DNA before generating content.
Brand DNA
GET /v1/brand-dna
GET https://content-os-api.pcampus.co/v1/brand-dna
Authorization: Bearer <pip_api_key>
x-tenant-id: your-tenant-idResponse:
{
"tenantId": "pharmacy-demo",
"brandId": "brand_001",
"tone": "friendly-professional",
"voice": "ใช้ภาษาไทยที่เข้าใจง่าย เป็นกันเอง แต่ให้ความรู้สึกน่าเชื่อถือ",
"keywords": ["สุขภาพ", "ห่วงใย", "เชื่อถือได้"],
"forbiddenWords": ["ถูก", "ราคาต่ำ"],
"channels": ["line", "email"],
"updatedAt": "2026-07-01T00:00:00.000Z"
}PATCH /v1/brand-dna
PATCH https://content-os-api.pcampus.co/v1/brand-dna
Authorization: Bearer <pip_api_key>
x-tenant-id: your-tenant-id
{
"tone": "warm-expert",
"keywords": ["สุขภาพดี", "ใส่ใจ", "ไว้วางใจ"]
}Content Generation
POST /v1/generate
Trigger content generation — the Creative Director Agent reads Brand DNA and passes the brief to the Script Generator.
POST https://content-os-api.pcampus.co/v1/generate
Authorization: Bearer <pip_api_key>
x-tenant-id: your-tenant-id
{
"goal": "win-back campaign สำหรับลูกค้าที่ไม่ซื้อ >60 วัน",
"targetSegment": "at_risk",
"channel": "line",
"customerContext": {
"customerId": "cust_001",
"lastPurchase": "2026-05-10",
"topProduct": "Amlodipine 5mg"
},
"approvalMode": "manual"
}Response:
{
"contentId": "cnt_xxx",
"status": "pending_approval",
"brief": "Win-back message สำหรับลูกค้าที่ซื้อยาประจำแต่หายไป >60 วัน",
"drafts": [
{
"channel": "line",
"type": "text",
"body": "สวัสดีครับ คุณสมชาย เราคิดถึงนะครับ ยา Amlodipine ใกล้หมดรึยัง? สั่งซื้อได้เลยนะครับ ส่งถึงบ้านภายใน 2 ชั่วโมง 🏥",
"confidenceScore": 0.87
}
],
"createdAt": "2026-07-15T10:00:00.000Z"
}Approval Workflow
GET /v1/content
List content awaiting approval.
GET https://content-os-api.pcampus.co/v1/content?status=pending_approval
Authorization: Bearer <pip_api_key>
x-tenant-id: your-tenant-idPATCH /v1/content/:contentId/approve
PATCH https://content-os-api.pcampus.co/v1/content/cnt_xxx/approve
Authorization: Bearer <pip_api_key>
{
"approvedBy": "admin-001",
"note": "approved as-is"
}PATCH /v1/content/:contentId/reject
PATCH https://content-os-api.pcampus.co/v1/content/cnt_xxx/reject
Authorization: Bearer <pip_api_key>
{
"reason": "tone ยังไม่เป็นกันเองพอ",
"regenerate": true
}Publishing
POST /v1/content/:contentId/publish
Send approved content to Notification or Mail.
POST https://content-os-api.pcampus.co/v1/content/cnt_xxx/publish
Authorization: Bearer <pip_api_key>
{
"channel": "line",
"recipientIds": ["cust_001", "cust_002"],
"scheduledAt": "2026-07-16T09:00:00.000Z"
}Response:
{
"publishId": "pub_xxx",
"status": "scheduled",
"recipientCount": 2,
"scheduledAt": "2026-07-16T09:00:00.000Z"
}Assets
GET /v1/assets
GET https://content-os-api.pcampus.co/v1/assets?brandId=brand_001
Authorization: Bearer <pip_api_key>
x-tenant-id: your-tenant-idPOST /v1/assets/upload
Upload a brand asset (logo, background, template image).
POST https://content-os-api.pcampus.co/v1/assets/upload
Authorization: Bearer <pip_api_key>
Content-Type: multipart/form-data
file=@logo.png&brandId=brand_001&label=primary-logoResponse:
{
"assetId": "ast_xxx",
"url": "https://storage-api.pcampus.co/content-os/brand_001/logo.png",
"label": "primary-logo",
"mimeType": "image/png"
}