Skip to main content

Exports API

All export endpoints require authentication. PDF, DOCX, Notion, and Google Docs are gated by feature flags.

PDF Export

POST /api/export/pdf
Feature flag: export_pdf Body:
FieldTypeRequiredDescription
projectIdstringYes*Export PRD from this project
contentstringYes*Or provide raw content directly
titlestringNoDocument title
*Provide either projectId or content.
curl -X POST https://app.thig.ai/api/export/pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"projectId": "proj_123", "title": "Mobile App PRD"}' \
  -o prd-export.pdf
Response: application/pdf binary file.

HTML Export

POST /api/export/html
Body: Same as PDF.
curl -X POST https://app.thig.ai/api/export/html \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"projectId": "proj_123"}' \
  -o prd-export.html
Response: text/html self-contained HTML file.

DOCX Export

POST /api/export/docx
Feature flag: export_docx Body: Same as PDF.
curl -X POST https://app.thig.ai/api/export/docx \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"projectId": "proj_123"}' \
  -o prd-export.docx
Response: application/vnd.openxmlformats-officedocument.wordprocessingml.document binary file.

Notion Export

POST /api/export/notion
Feature flag: export_notion Requires Notion integration to be connected. Body:
FieldTypeRequiredDescription
projectIdstringYesProject to export
parentPageIdstringNoNotion page to nest under
curl -X POST https://app.thig.ai/api/export/notion \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"projectId": "proj_123", "parentPageId": "notion_page_abc"}'
Response:
{
  "success": true,
  "pageUrl": "https://notion.so/...",
  "pageId": "page_123"
}

Google Docs Export

POST /api/export/google-docs
Feature flag: export_google_docs Requires Google OAuth sign-in. Body:
FieldTypeRequiredDescription
projectIdstringYesProject to export
curl -X POST https://app.thig.ai/api/export/google-docs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"projectId": "proj_123"}'
Response:
{
  "success": true,
  "documentUrl": "https://docs.google.com/...",
  "documentId": "doc_123"
}

Confluence Export

POST /api/export/confluence
Feature flag: export_confluence Requires Confluence integration. Body:
FieldTypeRequiredDescription
contentstringYesContent to export
projectNamestringNoTitle
spaceIdstringNoTarget Confluence space
parentIdstringNoParent page ID

Bulk Export

POST /api/export/bulk
Export multiple PRDs as a ZIP file. Max 20 projects. Body:
FieldTypeRequiredDescription
projectIdsstring[]YesProject IDs to export
formatstringYespdf, html, markdown, or all
curl -X POST https://app.thig.ai/api/export/bulk \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"projectIds": ["proj_123", "proj_456", "proj_789"], "format": "pdf"}' \
  -o bulk-export.zip
Response: application/zip binary file.

Scheduled Exports

Scheduled exports run automatically on a defined schedule. See Exports user guide for setup.

List Scheduled Exports

GET /api/scheduled-exports
Query parameters:
ParameterTypeDescription
projectIdstringFilter by project
Response:
{
  "schedules": [
    {
      "id": "uuid",
      "projectId": "proj_123",
      "scheduleType": "weekly",
      "format": "pdf",
      "deliveryMethod": "email",
      "recipients": ["team@example.com"],
      "isActive": true,
      "lastRunAt": "2026-03-01T09:00:00Z",
      "nextRunAt": "2026-03-08T09:00:00Z"
    }
  ]
}

Create Scheduled Export

POST /api/scheduled-exports
Body:
FieldTypeRequiredDescription
projectIdstringNoProject to export
scheduleTypestringYesweekly, on_status_change, cron, or one_time
formatstringYespdf, html, docx, or markdown
cronExpressionstringNoCron expression (required for cron type)
triggerStatusstringNoProject status trigger (for on_status_change)
scheduledAtstringNoISO datetime (for one_time)
timezonestringYesIANA timezone string
deliveryMethodstringYesemail or webhook
recipientsstring[]NoEmail recipients (for email delivery)
webhookUrlstringNoWebhook URL (for webhook delivery)
includeChangelogbooleanNoInclude changelog in export
customSubjectstringNoCustom email subject
customMessagestringNoCustom email message body
Scheduled exports are available on Pro plans and above.

Get Scheduled Export

GET /api/scheduled-exports/{exportId}

Update Scheduled Export

PATCH /api/scheduled-exports/{exportId}
Accepts any of the fields from the create endpoint.

Delete Scheduled Export

DELETE /api/scheduled-exports/{exportId}

Trigger Now

POST /api/scheduled-exports/{exportId}/trigger
Manually trigger a scheduled export immediately, regardless of its schedule.

Get Delivery Logs

GET /api/scheduled-exports/{exportId}/logs
Returns the last 50 delivery log entries for a scheduled export.
curl https://app.thig.ai/api/scheduled-exports/EXPORT_ID/logs \
  -H "Authorization: Bearer YOUR_API_KEY"
Response:
{
  "logs": [
    {
      "id": "uuid",
      "scheduledExportId": "uuid",
      "status": "delivered",
      "deliveryMethod": "email",
      "recipients": ["team@example.com"],
      "error": null,
      "createdAt": "2026-03-01T09:00:05Z"
    }
  ]
}