Your unique API endpoint URL is displayed in the API Token Management page under "API Documentation" section.
POST
Content-Type: application/json
Authorization: Bearer YOUR_API_TOKEN
| Field | Type | Description |
|---|---|---|
| spaceId | string | The ID or key of the Confluence space |
| parentId | string | The ID of the parent page |
| pageTitle | string | The title of the page to create/update |
| content | string | Markdown content to import |
| Field | Type | Default | Description |
|---|---|---|---|
| overwrite | boolean | false | If true, updates existing page with same title and parent. If false, returns error if page exists |
{
"spaceId": "DOCS",
"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
}
| 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"
}
| Status Code | Response Key | Description | Solution |
|---|---|---|---|
| 400 | bad-request | Missing required fields or invalid format | Verify all required fields are present and valid |
| 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."
}
The easiest way to find the correct Space ID and Parent Page ID is through the Markdown Importer app itself:
This ensures you're using the exact IDs that the API expects and avoids any confusion with space keys vs. space IDs.