
Documentation
Markdown Exporter for ConfluenceBrowse
Documentation
Markdown Exporter for ConfluenceAPI Reference
Base URL
Two URL formats are supported:
https://api.atlassian.com/svc/confluence/{cloudId}/apps/{appId}_{envId}/{path}
https://{site-name}/gateway/api/svc/confluence/apps/{appId}_{envId}/{path}
Retrieve your cloudId from https://your-site.atlassian.net/_edge/tenant_info.
App IDs
| Field | Value |
|---|---|
| App ID | 0def1d4f-1593-4dd0-99a3-a098b3959067 |
| Production env ID | 796457c9-9c03-4382-b44f-d19571068ece |
| Staging env ID | 73c9d7be-47c5-479a-b08d-14fb79453df8 |
| Dev env ID | 08a10a13-932b-47bb-b760-0cc1e93d4a50 |
Find your Cloud ID at https://your-site.atlassian.net/_edge/tenant_info.
Endpoints
POST /bulkExport
Export a Confluence space, a page tree, or a page and all its descendants.
Production URL:
POST https://api.atlassian.com/svc/confluence/{cloudId}/apps/0def1d4f-1593-4dd0-99a3-a098b3959067_796457c9-9c03-4382-b44f-d19571068ece/bulkExport
Request body:
{
"spaceKey": "MYSPACE",
"pageId": "123456",
"bulkExport": false,
"maxPages": 50,
"includeAttachments": false
}
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
spaceKey |
string | conditional | — | Export all pages in a space. Required if pageId is not provided. |
pageId |
string | conditional | — | Root page for the export. Required if spaceKey is not provided. If both are provided, pageId takes precedence. |
bulkExport |
boolean | no | false |
When true, exports pageId and all descendants. Ignored when spaceKey is used. |
maxPages |
integer | no | 50 |
Maximum pages to include. Maximum allowed: 100. |
includeAttachments |
boolean | no | false |
Include page attachments in the ZIP. |
Response:
{
"success": true,
"exportId": "uuid",
"spaceKey": "MYSPACE",
"pageId": null,
"pageCount": 42,
"zipBase64": "UEsDBBQ..."
}
| Field | Description |
|---|---|
exportId |
Recorded in Export History |
spaceKey |
null when exported by pageId |
pageId |
null when exported by spaceKey |
zipBase64 |
Base64-encoded ZIP archive |
POST /singleExport
Export a single Confluence page.
Production URL:
POST https://api.atlassian.com/svc/confluence/{cloudId}/apps/0def1d4f-1593-4dd0-99a3-a098b3959067_796457c9-9c03-4382-b44f-d19571068ece/singleExport
Request body:
{
"pageId": "123456",
"includeAttachments": false
}
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
pageId |
string | yes | — | ID of the page to export |
includeAttachments |
boolean | no | false |
Include attachments in the response |
Response — no attachments (default):
Returns the Markdown content as plain text. No ZIP, no JSON wrapper.
HTTP/1.1 200 OK
Content-Type: text/plain
# My Page
Page content in Markdown…
Response — with attachments (includeAttachments: true):
Returns a ZIP as base64 inside a JSON body:
{
"success": true,
"exportId": "uuid",
"pageId": "123456",
"title": "My Page",
"zipBase64": "UEsDBBQ..."
}
Request Headers
| Header | Value |
|---|---|
Authorization |
Bearer YOUR_ACCESS_TOKEN |
Content-Type |
application/json |
ZIP Structure
The ZIP mirrors the Confluence page hierarchy. For each page:
{slug}.md— page content as Markdownattachments/— page attachments (only whenincludeAttachments: true){slug}/— subfolder for child pages
Filenames are slugified: lowercased, special characters transliterated to ASCII, spaces replaced with -.
Example:
project-docs.md
attachments/
architecture.png
project-docs/
guides/
setup-guide.md
attachments/
diagram.pdf
Error Responses
| Status | Cause |
|---|---|
400 |
Missing spaceKey or pageId |
401 |
Token missing, expired, or lacks the required scope |
403 |
App REST APIs not enabled, or OAuth integration connected to the wrong environment |
404 |
No pages found for the given space or page ID |
500 |
Unexpected server error — check Forge logs with forge logs -e production |
Limits
| Constraint | Value |
|---|---|
| Max pages per request | 100 (maxPages cap) |
| Default pages per request | 50 |
| Max attachment size per file | 300 KB |
| Max total attachment data per export | 2 MB |
| Max response body | 5 MB (Forge platform limit) |
| Function timeout | 25 seconds (Forge platform limit) |
For spaces larger than 100 pages, call the API in batches using specific pageId values.
Guides for Markdown Exporter for Confluence
Stuck on something this page does not cover? Ask the developers.