
Documentation
Markdown Importer for Confluence CloudBrowse
Documentation
Markdown Importer for Confluence CloudAPI Reference
Endpoint
Your unique API endpoint URL is displayed in the API Token Management page under "API Documentation" section.
Request Format
HTTP Method
POST
Headers
Content-Type: application/json
Authorization: Bearer YOUR_API_TOKEN
Request Body
Required Fields
| Field | Type | Description |
|---|---|---|
| spaceId | string | The numeric ID of the Confluence space. The space key (for example DOCS) does not work |
| parentId | string | The ID of the parent page |
| pageTitle | string | The title of the page to create/update |
| content | string | Markdown content to import |
Optional Fields
| Field | Type | Default | Description |
|---|---|---|---|
| overwrite | boolean | false | If true, updates the existing page with the same title in the space and places it under parentId. If false, returns an error if the page exists |
Example Request Body
{
"spaceId": "98765432",
"parentId": "123456789",
"pageTitle": "API Integration Guide",
"content": "# API Integration\n\nThis guide covers how to integrate with our API.\n\n## Authentication\n\nUse Bearer tokens for authentication.",
"overwrite": false
}
Response Codes
Success Responses
| Status Code | Response Key | Description |
|---|---|---|
| 201 | created | Page created successfully |
| 200 | updated | Page updated successfully (when overwrite is true) |
Success Response Body:
{
"body": "Success: Page created successfully"
}
Error Responses
| Status Code | Response Key | Description | Solution |
|---|---|---|---|
| 400 | bad-request | Missing required fields or invalid format, or Confluence rejected the page (for example a space key instead of the numeric space ID, or a parent page that does not exist) | Verify all required fields are present, spaceId is numeric and parentId is a page in that space |
| 400 | already-exists | Page with same title exists (when overwrite is false) | Set overwrite to true or use different title |
| 401 | unauthorized | Missing or invalid token | Check Authorization header format |
| 402 | license-expired | License inactive when token created | Contact admin to renew license |
| 403 | forbidden | Token expired | Create a new token |
| 404 | not-found | Parent page or space not found | Verify spaceId and parentId are correct |
| 500 | internal-error | Server error | Retry request, contact support if persists |
Error Response Example:
{
"body": "Error: Unauthorized - Missing or invalid authorization header. Please provide a valid Bearer token."
}
Finding Space and Page IDs
The easiest way to find the correct Space ID and Parent Page ID is through the Markdown Importer app itself:
- Open Markdown Importer for Confluence in your Confluence instance
- Use the Space selector dropdown - the space ID will be visible when you select a space
- Use the Page selector dropdown to choose a parent page - the page ID will be displayed in the selection
This ensures you're using the exact IDs that the API expects. spaceId must be the numeric space ID, not the space key: sending a key such as DOCS returns a 400 bad-request error.
You can also look the IDs up yourself:
- Space ID: while logged in to Confluence, open
https://your-site.atlassian.net/wiki/api/v2/spaces?keys=DOCS(replaceDOCSwith your space key) and copy theidfield. - Parent page ID: open the page in Confluence. The ID is the number in the URL, for example
/wiki/spaces/DOCS/pages/123456789/Page+title.
Related Documentation
- Limitations - API usage limits and constraints
- Examples - Code samples in multiple languages
- Troubleshooting - Common issues and solutions
- Best Practices - Production recommendations
Guides for Markdown Importer for Confluence Cloud
Stuck on something this page does not cover? Ask the developers.