Interact with Atlassian Confluence Cloud using the REST API v2. This skill enables reading, creating, updating, and deleting Confluence content including pages, blog posts, attachments, comments, spaces, labels, and more.
Required Environment Variables:
bash
CONFLUENCE_EMAIL=your_email@example.com
CONFLUENCE_API_TOKEN=your_api_token
CONFLUENCE_DOMAIN=your_domain # e.g. "yourcompany" for yourcompany.atlassian.net
text
https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2
bash
--user "$CONFLUENCE_EMAIL:$CONFLUENCE_API_TOKEN"
curl Authentication Header:
bash
-H "Authorization: Basic $(echo -n '$CONFLUENCE_EMAIL:$CONFLUENCE_API_TOKEN' | base64)"
bash
# Linux/Mac
echo -n "$CONFLUENCE_EMAIL:$CONFLUENCE_API_TOKEN" | base64
# Windows PowerShell
[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("$CONFLUENCE_EMAIL:$CONFLUENCE_API_TOKEN"))
bash
-H "Accept: application/json"
-H "Content-Type: application/json"
-H "Authorization: Basic <base64_encoded_auth>"
Total: 100+ API Endpoints across 29 API Groups
MethodEndpointDescriptionGET/admin-keyGet Admin Key statusPOST/admin-keyEnable Admin KeyDELETE/admin-keyDisable Admin Key
Get Admin Key:
bash
curl -X GET "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/admin-key" \
-H "Authorization: Basic <base64_auth>"
Enable Admin Key (10 min default):
bash
curl -X POST "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/admin-key" \
-H "Authorization: Basic <base64_auth>" \
-H "Content-Type: application/json" \
-d '{"durationInMinutes": 10}'
MethodEndpointDescriptionGET/attachmentsGet all attachmentsGET/attachments/{id}Get attachment by IDDELETE/attachments/{id}Delete attachmentGET/attachments/{id}/labelsGet labels for attachmentGET/attachments/{id}/operationsGet permitted operationsGET/attachments/{id}/versionsGet attachment versionsGET/attachments/{id}/versions/{version-number}Get version detailsGET/attachments/{id}/footer-commentsGet attachment comments
Get All Attachments:
bash
curl -X GET "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/attachments?limit=25" \
-H "Authorization: Basic <base64_auth>"
Get Attachment by ID:
bash
curl -X GET "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/attachments/att123456" \
-H "Authorization: Basic <base64_auth>"
Delete Attachment (move to trash):
bash
curl -X DELETE "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/attachments/att123456" \
-H "Authorization: Basic <base64_auth>"
Purge (permanently delete) trashed attachment:
bash
curl -X DELETE "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/attachments/att123456?purge=true" \
-H "Authorization: Basic <base64_auth>"
MethodEndpointDescriptionGET/blogpostsGet all blog postsPOST/blogpostsCreate blog postGET/blogposts/{id}Get blog post by IDPUT/blogposts/{id}Update blog postDELETE/blogposts/{id}Delete blog postGET/blogposts/{id}/attachmentsGet attachmentsGET/blogposts/{id}/custom-contentGet custom contentGET/blogposts/{id}/labelsGet labelsGET/blogposts/{id}/likes/countGet like countGET/blogposts/{id}/likes/usersGet users who likedGET/blogposts/{id}/operationsGet operationsGET/blogposts/{id}/versionsGet versionsGET/blogposts/{id}/versions/{version-number}Get version detailsGET/blogposts/{id}/footer-commentsGet footer commentsGET/blogposts/{id}/inline-commentsGet inline comments
Get All Blog Posts:
bash
curl -X GET "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/blogposts?limit=25&space-id=123" \
-H "Authorization: Basic <base64_auth>"
Create Blog Post:
bash
curl -X POST "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/blogposts" \
-H "Authorization: Basic <base64_auth>" \
-H "Content-Type: application/json" \
-d '{
"spaceId": "SPACE_KEY",
"title": "My Blog Post",
"body": {
"representation": "storage",
"value": "<p>Blog post content here</p>"
}
}'
Get Blog Post with Body:
bash
curl -X GET "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/blogposts/123?body-format=storage" \
-H "Authorization: Basic <base64_auth>"
MethodEndpointDescriptionGET/footer-commentsGet all footer commentsPOST/footer-commentsCreate footer commentGET/footer-comments/{comment-id}Get footer commentPUT/footer-comments/{comment-id}Update footer commentDELETE/footer-comments/{comment-id}Delete footer commentGET/footer-comments/{id}/childrenGet child commentsGET/inline-commentsGet all inline commentsPOST/inline-commentsCreate inline commentGET/inline-comments/{comment-id}Get inline commentPUT/inline-comments/{comment-id}Update inline commentDELETE/inline-comments/{comment-id}Delete inline commentGET/inline-comments/{id}/childrenGet child inline comments
Create Footer Comment on Page:
bash
curl -X POST "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/footer-comments" \
-H "Authorization: Basic <base64_auth>" \
-H "Content-Type: application/json" \
-d '{
"pageId": "123456",
"body": {
"representation": "storage",
"value": "<p>Comment content</p>"
}
}'
Create Inline Comment:
bash
curl -X POST "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/inline-comments" \
-H "Authorization: Basic <base64_auth>" \
-H "Content-Type: application/json" \
-d '{
"pageId": "123456",
"body": {
"representation": "storage",
"value": "<p>Inline comment</p>"
},
"inlineCommentProperties": {
"textSelection": "selected text",
"textSelectionMatchCount": 1,
"textSelectionMatchIndex": 0
}
}'
Resolve Inline Comment:
bash
curl -X PUT "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/inline-comments/123" \
-H "Authorization: Basic <base64_auth>" \
-H "Content-Type: application/json" \
-d '{
"version": {"number": 2},
"resolved": true
}'
For: Attachments, Blog Posts, Pages, Custom Content, Whiteboards, Databases, Folders, Comments, Smart Links
MethodEndpoint PatternDescriptionGET/{type}/{id}/propertiesGet all propertiesPOST/{type}/{id}/propertiesCreate propertyGET/{type}/{id}/properties/{property-id}Get propertyPUT/{type}/{id}/properties/{property-id}Update propertyDELETE/{type}/{id}/properties/{property-id}Delete property
Get Page Properties:
bash
curl -X GET "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/pages/123456/properties" \
-H "Authorization: Basic <base64_auth>"
Create Page Property:
bash
curl -X POST "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/pages/123456/properties" \
-H "Authorization: Basic <base64_auth>" \
-H "Content-Type: application/json" \
-d '{
"key": "custom-key",
"value": {"nested": "value"}
}'
Update Page Property:
bash
curl -X PUT "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/pages/123456/properties/789" \
-H "Authorization: Basic <base64_auth>" \
-H "Content-Type: application/json" \
-d '{
"key": "custom-key",
"value": {"updated": "value"},
"version": {"number": 2}
}'
MethodEndpointDescriptionGET/labelsGet all labelsGET/labels/{id}/attachmentsGet attachments with labelGET/labels/{id}/blogpostsGet blog posts with labelGET/labels/{id}/pagesGet pages with labelGET/attachments/{id}/labelsGet attachment labelsGET/blogposts/{id}/labelsGet blog post labelsGET/custom-content/{id}/labelsGet custom content labelsGET/pages/{id}/labelsGet page labelsGET/spaces/{id}/labelsGet space labelsGET/spaces/{id}/content/labelsGet space content labels
Get Page Labels:
bash
curl -X GET "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/pages/123456/labels" \
-H "Authorization: Basic <base64_auth>"
MethodEndpointDescriptionGET/pagesGet all pagesPOST/pagesCreate pageGET/pages/{id}Get page by IDPUT/pages/{id}Update pageDELETE/pages/{id}Delete pagePUT/pages/{id}/titleUpdate page titleGET/pages/{id}/attachmentsGet attachmentsGET/pages/{id}/custom-contentGet custom contentGET/pages/{id}/labelsGet labelsGET/pages/{id}/operationsGet operationsGET/pages/{id}/versionsGet versionsGET/pages/{id}/versions/{version-number}Get version detailsGET/pages/{id}/footer-commentsGet footer commentsGET/pages/{id}/inline-commentsGet inline comments
Get All Pages in Space:
bash
curl -X GET "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/pages?space-id=123&limit=50" \
-H "Authorization: Basic <base64_auth>"
Get Page with Body:
bash
curl -X GET "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/pages/123456?body-format=storage" \
-H "Authorization: Basic <base64_auth>"
Create Page:
bash
curl -X POST "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/pages" \
-H "Authorization: Basic <base64_auth>" \
-H "Content-Type: application/json" \
-d '{
"spaceId": "SPACE_KEY",
"title": "My New Page",
"parentId": "123456",
"body": {
"representation": "storage",
"value": "<p>Page content in storage format</p>"
}
}'
Update Page:
bash
curl -X PUT "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/pages/123456" \
-H "Authorization: Basic <base64_auth>" \
-H "Content-Type: application/json" \
-d '{
"id": "123456",
"status": "current",
"title": "Updated Page Title",
"body": {
"representation": "storage",
"value": "<p>Updated content</p>"
},
"version": {
"number": 5,
"message": "Updated page content"
}
}'
Delete Page (move to trash):
bash
curl -X DELETE "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/pages/123456" \
-H "Authorization: Basic <base64_auth>"
MethodEndpointDescriptionGET/spacesGet all spacesPOST/spacesCreate spaceGET/spaces/{id}Get space by IDPUT/spaces/{id}Update spaceDELETE/spaces/{id}Delete spaceGET/spaces/{id}/pagesGet space pagesGET/spaces/{id}/pages/searchSearch pages in spaceGET/spaces/{id}/blogpostsGet space blog postsGET/spaces/{id}/contentGet space contentGET/spaces/{id}/content/typesGet content typesGET/spaces/{id}/labelsGet space labelsGET/spaces/{id}/content/labelsGet space content labelsGET/spaces/{id}/operationsGet space operationsGET/spaces/{id}/permissionsGet space permissionsGET/spaces/{id}/propertiesGet space propertiesPOST/spaces/{id}/propertiesCreate space propertyGET/spaces/{id}/properties/{property-id}Get space propertyPUT/spaces/{id}/properties/{property-id}Update space propertyDELETE/spaces/{id}/properties/{property-id}Delete space propertyGET/spaces/{id}/iconsGet space iconsPOST/spaces/{id}/iconsSet space iconGET/spaces/{id}/lookupsLookup space by key
Get All Spaces:
bash
curl -X GET "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/spaces?limit=50" \
-H "Authorization: Basic <base64_auth>"
Get Space by Key:
bash
curl -X GET "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/spaces?keys=SPACE_KEY" \
-H "Authorization: Basic <base64_auth>"
Create Space:
bash
curl -X POST "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/spaces" \
-H "Authorization: Basic <base64_auth>" \
-H "Content-Type: application/json" \
-d '{
"name": "My New Space",
"key": "MYSpace",
"description": {
"plain": {
"value": "Space description"
}
}
}'
MethodEndpointDescriptionGET/users/meGet current userGET/users/{id}Get user by IDGET/users/bulkGet multiple usersPOST/users/bulkBulk get users by emailsGET/user/access/check-access-by-emailCheck user access by emailPOST/user/access/check-access-by-emailCheck user accessGET/user/access/invite-by-emailGet user invite by emailPOST/user/access/invite-by-emailInvite user by emailPOST/user/access/batch-invite-by-emailBatch invite users
Get Current User:
bash
curl -X GET "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/users/me" \
-H "Authorization: Basic <base64_auth>"
Get User by ID:
bash
curl -X GET "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/users/123456" \
-H "Authorization: Basic <base64_auth>"
Bulk Get Users:
bash
curl -X GET "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/users/bulk?ids=123,456" \
-H "Authorization: Basic <base64_auth>"
MethodEndpointDescriptionGET/pages/{id}/versionsGet page versionsGET/pages/{id}/versions/{version-number}Get specific versionGET/blogposts/{id}/versionsGet blog post versionsGET/blogposts/{id}/versions/{version-number}Get specific versionGET/attachments/{id}/versionsGet attachment versionsGET/attachments/{id}/versions/{version-number}Get specific versionPOST/pages/{id}/versions/restoreRestore page versionPOST/blogposts/{id}/versions/restoreRestore blog post version
Get Page Versions:
bash
curl -X GET "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/pages/123456/versions?limit=10" \
-H "Authorization: Basic <base64_auth>"
Restore Page Version:
bash
curl -X POST "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/pages/123456/versions/restore" \
-H "Authorization: Basic <base64_auth>" \
-H "Content-Type: application/json" \
-d '{"newVersion": {"message": "Restoring previous version"}}'
MethodEndpointDescriptionGET/whiteboardsGet all whiteboardsPOST/whiteboardsCreate whiteboardGET/whiteboards/{id}Get whiteboard by IDPUT/whiteboards/{id}Update whiteboardDELETE/whiteboards/{id}Delete whiteboardGET/whiteboards/{id}/connectionsGet whiteboard connectionsGET/whiteboards/{id}/operationsGet whiteboard operations
Create Whiteboard:
bash
curl -X POST "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/whiteboards" \
-H "Authorization: Basic <base64_auth>" \
-H "Content-Type: application/json" \
-d '{
"spaceId": "123456",
"title": "My Whiteboard"
}'
The V2 API uses cursor-based pagination. Responses include a _links.next URL when more results are available.
bash
curl -X GET "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/pages?space-id=123456&limit=100" \
-H "Authorization: Basic <base64_auth>"
Response:
json
{
"results": [...],
"_links": {
"next": "/wiki/api/v2/pages?cursor=abc123",
"base": "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki"
}
}
bash
curl -X GET "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/pages?title=My%20Page&space-id=123456" \
-H "Authorization: Basic <base64_auth>"
bash
curl -X GET "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/pages/123456?include-labels=true&include-properties=true&include-versions=true&body-format=storage" \
-H "Authorization: Basic <base64_auth>"
bash
curl -X PUT "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/pages/123456/title" \
-H "Authorization: Basic <base64_auth>" \
-H "Content-Type: application/json" \
-d '{"value": "New Page Title"}'
bash
curl -X POST "https://$CONFLUENCE_DOMAIN.atlassian.net/wiki/api/v2/pages/123456/redact" \
-H "Authorization: Basic <base64_auth>" \
-H "Content-Type: application/json" \
-d '{
"version": {"number": 3},
"body": {
"representation": "storage",
"value": "<p>Redacted content</p>"
}
}'
StatusMeaning400Bad request or malformed data401Invalid credentials or expired token403Permission denied404Resource not found409Conflict (e.g., duplicate title)429Rate limited - wait and retry500Internal server error
<p>Paragraph</p>, <h1>Heading</h1>, <ul><li>Item</li></ul>_links.next for pagination