Every API here is available over the APIs.io API and to AI agents over MCP.
{"openapi":"3.0.1","info":{"title":"The Confluence Cloud REST API","description":"This document describes the REST API and resources provided by Confluence. The REST APIs are for developers who want to integrate Confluence into their application and for administrators who want to script interactions with the Confluence server.Confluence's REST APIs provide access to resources (data entities) via URI paths. To use a REST API, your application will make an HTTP request and parse the response. The response format is JSON. Your methods will be the standard HTTP methods like GET, PUT, POST and DELETE. Because the REST API is based on open standards, you can use any web development language to access the API.","termsOfService":"https://atlassian.com/terms/","version":"1.0.0"},"externalDocs":{"description":"The online and complete version of the Confluence Cloud REST API docs.","url":"https://developer.atlassian.com/cloud/confluence/rest/"},"servers":[{"url":"//your-domain.atlassian.net"}],"tags":[{"name":"Audit","description":""},{"name":"Analytics","description":""},{"name":"Content","description":""},{"name":"Content - attachments","description":""},{"name":"Content body","description":""},{"name":"Content - children and descendants","description":""},{"name":"Content - macro body","description":""},{"name":"Content comments","description":""},{"name":"Content labels","description":""},{"name":"Content permissions","description":""},{"name":"Content properties","description":""},{"name":"Content restrictions","description":""},{"name":"Content states","description":""},{"name":"Content versions","description":""},{"name":"Content watches","description":""},{"name":"Dynamic modules","description":""},{"name":"Experimental","description":"APIs in this section can change without any prior deprecation notice."},{"name":"Group","description":"**[WARNING](https://support.atlassian.com/user-management/docs/create-and-update-groups/) The standard Atlassian group names are default names only and can be edited or deleted.** For example, an admin or Atlassian support could delete the default group jira-software-users or rename it to jsw-users at any point."},{"name":"Inline tasks","description":""},{"name":"Label info","description":""},{"name":"Long-running task","description":""},{"name":"Relation","description":""},{"name":"Search","description":""},{"name":"Settings","description":""},{"name":"Space","description":""},{"name":"Space permissions","description":""},{"name":"Space properties","description":""},{"name":"Space settings","description":""},{"name":"Template","description":""},{"name":"Themes","description":""},{"name":"Users","description":""},{"name":"User properties","description":""}],"paths":{"/wiki/rest/api/audit":{"get":{"tags":["Audit"],"summary":"Get audit records","description":"Returns all records in the audit log, optionally for a certain date range.\nThis contains information about events like space exports, group membership\nchanges, app installations, etc. For more information, see\n[Audit log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html)\nin the Confluence administrator's guide.\n\n**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:\n'Confluence Administrator' global permission.","operationId":"getAuditRecords","parameters":[{"name":"startDate","in":"query","description":"Filters the results to the records on or after the `startDate`.\nThe `startDate` must be specified as [epoch time](https://www.epochconverter.com/) in milliseconds.","schema":{"type":"string"}},{"name":"endDate","in":"query","description":"Filters the results to the records on or before the `endDate`.\nThe `endDate` must be specified as [epoch time](https://www.epochconverter.com/) in milliseconds.","schema":{"type":"string"}},{"name":"searchString","in":"query","description":"Filters the results to records that have string property values\nmatching the `searchString`.","schema":{"type":"string"}},{"name":"start","in":"query","description":"The starting index of the returned records.","schema":{"minimum":0,"type":"integer","format":"int32","default":0}},{"name":"limit","in":"query","description":"The maximum number of records to return per page.\nNote, this may be restricted by fixed system limits.","schema":{"minimum":0,"type":"integer","format":"int32","default":1000}}],"responses":{"200":{"description":"Returned if the requested records are returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditRecordArray"}}}},"401":{"description":"Returned if the authentication credentials are incorrect or missing\nfrom the request.","content":{}},"403":{"description":"Returned if the calling user does not have permission to view the audit\nlog.","content":{}}},"security":[{"basicAuth":[]},{"oAuthDefinitions":["read:audit-log:confluence"]}],"x-atlassian-oauth2-scopes":[{"scheme":"oAuthDefinitions","state":"Current","scopes":["read:audit-log:confluence"]}],"x-atlassian-data-security-policy":[{"app-access-rule-exempt":true}],"x-atlassian-connect-scope":"INACCESSIBLE"},"post":{"tags":["Audit"],"summary":"Create audit record","description":"Creates a record in the audit log.\n\n**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:\n'Confluence Administrator' global permission.","operationId":"createAuditRecord","requestBody":{"description":"The record to be created in the audit log.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditRecordCreate"}}},"required":true},"responses":{"200":{"description":"Returned if the record is created in the audit log.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditRecord"}}}},"400":{"description":"Returned if the `remoteAddress` property is not specified.","content":{}},"401":{"description":"Returned if the authentication credentials are incorrect or missing\nfrom the request.","content":{}}},"security":[{"basicAuth":[]},{"oAuthDefinitions":["read:audit-log:confluence","write:audit-log:confluence"]}],"x-atlassian-oauth2-scopes":[{"scheme":"oAuthDefinitions","state":"Current","scopes":["read:audit-log:confluence","write:audit-log:confluence"]}],"x-atlassian-data-security-policy":[{"app-access-rule-exempt":true}],"x-codegen-request-body-name":"body","x-atlassian-connect-scope":"INACCESSIBLE"}},"/wiki/rest/api/audit/export":{"get":{"tags":["Audit"],"summary":"Export audit records","description":"Exports audit records as a CSV file or ZIP file.\n\n**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:\n'Confluence Administrator' global permission.","operationId":"exportAuditRecords","parameters":[{"name":"startDate","in":"query","description":"Filters the exported results to the records on or after the `startDate`.\nThe `startDate` must be specified as [epoch time](https://www.epochconverter.com/) in milliseconds.","schema":{"type":"string"}},{"name":"endDate","in":"query","description":"Filters the exported results to the records on or before the `endDate`.\nThe `endDate` must be specified as [epoch time](https://www.epochconverter.com/) in milliseconds.","schema":{"type":"string"}},{"name":"searchString","in":"query","description":"Filters the exported results to records that have string property values\nmatching the `searchString`.","schema":{"type":"string"}},{"name":"format","in":"query","description":"The format of the export file for the audit records.","schema":{"type":"string","default":"csv","enum":["csv","zip"]}}],"responses":{"200":{"description":"Returned if the requested export of the audit records is returned.","content":{"application/zip":{"schema":{"type":"string","format":"binary"}},"text/csv":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Returned if the calling user does not have permission to view the audit\nlog.","content":{}}},"security":[{"basicAuth":[]},{"oAuthDefinitions":["read:audit-log:confluence"]}],"x-atlassian-oauth2-scopes":[{"scheme":"oAuthDefinitions","state":"Current","scopes":["read:audit-log:confluence"]}],"x-atlassian-data-security-policy":[{"app-access-rule-exempt":true}],"x-atlassian-connect-scope":"INACCESSIBLE"}},"/wiki/rest/api/audit/retention":{"get":{"tags":["Audit"],"summary":"Get retention period","description":"Returns the retention period for records in the audit log. The retention\nperiod is how long an audit record is kept for, from creation date until\nit is deleted.\n\n**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:\n'Confluence Administrator' global permission.","operationId":"getRetentionPeriod","responses":{"200":{"description":"Returned if the requested retention period is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetentionPeriod"}}}},"403":{"description":"Returned if the calling user does not have permission to view the audit\nlog.","content":{}}},"security":[{"basicAuth":[]},{"oAuthDefinitions":["read:audit-log:confluence"]}],"x-atlassian-oauth2-scopes":[{"scheme":"oAuthDefinitions","state":"Current","scopes":["read:audit-log:confluence"]}],"x-atlassian-data-security-policy":[{"app-access-rule-exempt":true}],"x-atlassian-connect-scope":"INACCESSIBLE"},"put":{"tags":["Audit"],"summary":"Set retention period","description":"Sets the retention period for records in the audit log. The retention period\ncan be set to a maximum of 1 year.\n\n**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:\n'Confluence Administrator' global permission.","operationId":"setRetentionPeriod","requestBody":{"description":"The updated retention period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetentionPeriod"}}},"required":true},"responses":{"200":{"description":"Returned if the retention period is updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetentionPeriod"}}}},"403":{"description":"Returned if the calling user does not have permission to view the audit\nlog.","content":{}}},"security":[{"basicAuth":[]},{"oAuthDefinitions":["write:audit-log:confluence"]}],"x-atlassian-oauth2-scopes":[{"scheme":"oAuthDefinitions","state":"Current","scopes":["write:audit-log:confluence"]}],"x-atlassian-data-security-policy":[{"app-access-rule-exempt":true}],"x-codegen-request-body-name":"body","x-atlassian-connect-scope":"INACCESSIBLE"}},"/wiki/rest/api/audit/since":{"get":{"tags":["Audit"],"summary":"Get audit records for time period","description":"Returns records from the audit log, for a time period back from the current\ndate. For example, you can use this method to get the last 3 months of records.\n\nThis contains information about events like space exports, group membership\nchanges, app installations, etc. For more information, see\n[Audit log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html)\nin the Confluence administrator's guide.\n\n**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:\n'Confluence Administrator' global permission.","operationId":"getAuditRecordsForTimePeriod","parameters":[{"name":"number","in":"query","description":"The number of units for the time period.","schema":{"type":"integer","format":"int64","default":3}},{"name":"units","in":"query","description":"The unit of time that the time period is measured in.","schema":{"type":"string","default":"MONTHS","enum":["NANOS","MICROS","MILLIS","SECONDS","MINUTES","HOURS","HALF_DAYS","DAYS","WEEKS","MONTHS","YEARS","DECADES","CENTURIES"]}},{"name":"searchString","in":"query","description":"Filters the results to records that have string property values\nmatching the `searchString`.","schema":{"type":"string"}},{"name":"start","in":"query","description":"The starting index of the returned records.","schema":{"minimum":0,"type":"integer","format":"int32","default":0}},{"name":"limit","in":"query","description":"The maximum number of records to return per page.\nNote, this may be restricted by fixed system limits.","schema":{"minimum":0,"type":"integer","format":"int32","default":1000}}],"responses":{"200":{"description":"Returned if the requested records are returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditRecordArray"}}}},"403":{"description":"Returned if the calling user does not have permission to view the audit\nlog.","content":{}}},"security":[{"basicAuth":[]},{"oAuthDefinitions":["read:audit-log:confluence"]}],"x-atlassian-oauth2-scopes":[{"scheme":"oAuthDefinitions","state":"Current","scopes":["read:audit-log:confluence"]}],"x-atlassian-data-security-policy":[{"app-access-rule-exempt":true}],"x-atlassian-connect-scope":"INACCESSIBLE"}},"/wiki/rest/api/content/archive":{"post":{"tags":["Content"],"summary":"Archive pages","description":"Archives a list of pages. The pages to be archived are specified as a list of content IDs.\nThis API accepts the archival request and returns a task ID.\nThe archival process happens asynchronously.\nUse the /longtask/<taskId> REST API to get the copy task status.\n\nEach content ID needs to resolve to page objects that are not already in an archived state.\nThe content IDs need not belong to the same space.\n\n**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:\n'Archive' permission for each of the pages in the corresponding space it belongs to.","operationId":"archivePages","requestBody":{"description":"The pages to be archived.","content":{"application/json":{"schema":{"type":"object","properties":{"pages":{"type":"array","items":{"type":"object","required":["id"],"properties":{"id":{"type":"integer","format":"int64","description":"The `id` of the page to be archived."}}}}}}}}},"responses":{"202":{"description":"Returned if the archive request has been submitted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LongTask"}}}},"400":{"description":"Returned if:\n- there is an archival job already running for the tenant.\n- the number of pages to archive is larger than the limit of 300.\n- any of the content IDs specified in the array do not resolve to pages.\n- any of the specified pages are already archived.\n- the request is coming from a free edition tenant.\n- the request is coming from a non premium edition tenant with more than 1 page ID\n in the archive request.","content":{}},"401":{"description":"Returned if the authentication credentials are incorrect or missing\nfrom the request.","content":{}}},"security":[{"basicAuth":[]},{"oAuthDefinitions":["write:confluence-content"]}],"x-atlassian-oauth2-scopes":[{"scheme":"oAuthDefinitions","state":"Current","scopes":["write:confluence-content"]},{"scheme":"oAuthDefinitions","state":"Beta","scopes":["read:content.metadata:confluence","write:page:confluence"]}],"x-atlassian-data-security-policy":[{"app-access-rule-exempt":false}],"x-experimental":true,"x-atlassian-connect-scope":"WRITE"}},"/wiki/rest/api/content/blueprint/instance/{draftId}":{"put":{"tags":["Content"],"summary":"Publish shared draft","description":"Publishes a shared draft of a page created from a blueprint.\n\nBy default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`.\n\n**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:\nPermission to view the draft and 'Add' permission for the space that\nthe content will be created in.","operationId":"publishSharedDraft","parameters":[{"name":"draftId","in":"path","description":"The ID of the draft page that was created from a blueprint.\nYou can find the `draftId` in the Confluence application by\nopening the draft page and checking the page URL.","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","description":"The status of the content to be updated, i.e. the draft. This is set\nto 'draft' by default, so you shouldn't need to specify it.","schema":{"type":"string","default":"draft"}},{"$ref":"#/components/parameters/contentExpand"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentBlueprintDraft"}}},"required":true},"responses":{"200":{"description":"Returned if the draft was successfully published.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}}},"400":{"description":"Returned if a title is not specified or a page with the\ntitle already exists.","content":{}},"409":{"description":"Returned if the version is not set to 1.","content":{}}},"security":[{"basicAuth":[]},{"oAuthDefinitions":["write:confluence-content"]}],"x-atlassian-oauth2-scopes":[{"scheme":"oAuthDefinitions","state":"Current","scopes":["write:confluence-content"]},{"scheme":"oAuthDefinitions","state":"Beta","scopes":["read:content-details:confluence","write:content:confluence"]}],"x-atlassian-data-security-policy":[{"app-access-rule-exempt":false}],"x-codegen-request-body-name":"body","x-atlassian-connect-scope":"WRITE"},"post":{"tags":["Content"],"summary":"Publish legacy draft","description":"Publishes a legacy draft of a page created from a blueprint. Legacy drafts\nwill eventually be removed in favor of shared drafts. For now, this method\nworks the same as [Publish shared draft](#api-content-blueprint-instance-draftId-put).\n\nBy default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`.\n\n**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:\nPermission to view the draft and 'Add' permission for the space that\nthe content will be created in.","operationId":"publishLegacyDraft","parameters":[{"name":"draftId","in":"path","description":"The ID of the draft page that was created from a blueprint.\nYou can find the `draftId` in the Confluence application by\nopening the draft page and checking the page URL.","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","description":"The status of the content to be updated, i.e. the draft. This is set\nto 'draft' by default, so you shouldn't need to specify it.","schema":{"type":"string","default":"draft"}},{"$ref":"#/components/parameters/contentExpand"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentBlueprintDraft"}}},"required":true},"responses":{"200":{"description":"Returned if the draft was successfully published.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}}},"400":{"description":"Returned if a title is not specified or a page with the\ntitle already exists.","content":{}},"409":{"description":"Returned if the version is not set to 1.","content":{}}},"security":[{"basicAuth":[]},{"oAuthDefinitions":["write:confluence-content"]}],"x-atlassian-oauth2-scopes":[{"scheme":"oAuthDefinitions","state":"Current","scopes":["write:confluence-content"]},{"scheme":"oAuthDefinitions","state":"Beta","scopes":["read:content-details:confluence","write:content:confluence"]}],"x-atlassian-data-security-policy":[{"app-access-rule-exempt":false}],"x-codegen-request-body-name":"body","x-atlassian-connect-scope":"WRITE"}},"/wiki/rest/api/content/search":{"get":{"tags":["Content"],"summary":"Search content by CQL","description":"Returns the list of content that matches a Confluence Query Language\n(CQL) query. For information on CQL, see:\n[Advanced searching using CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/).\n\nExample initial call:\n```\n/wiki/rest/api/content/search?cql=type=page&limit=25\n```\n\nExample response:\n```\n{\n \"results\": [\n { ... },\n { ... },\n ...\n { ... }\n ],\n \"limit\": 25,\n \"size\": 25,\n ...\n \"_links\": {\n \"base\": \"<url>\",\n \"context\": \"<url>\",\n \"next\": \"/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg\",\n \"self\": \"<url>\"\n }\n}\n```\n\nWhen additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of results returned in each call.\nExample subsequent call (taken from example response):\n```\n/wiki/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg\n```\nThe response to this will have a `prev` URL similar to the `next` in the example response.\n\nIf the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the query limit parameter will be restricted to a maximum value of 25.\n\n**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:\nPermission to access the Confluence site ('Can use' global permission).\nOnly content that the user has permission to view will be returned.","operationId":"searchContentByCQL","parameters":[{"name":"cql","in":"query","description":"The CQL string that is used to find the requested content.","required":true,"schema":{"type":"string"}},{"name":"cqlcontext","in":"query","description":"The space, content, and content status to execute the search against.\nSpecify this as an object with the following properties:\n\n- `spaceKey` Key of the space to search against. Optional.\n- `contentId` ID of the content to search against. Optional. Must\nbe in the space spacified by `spaceKey`.\n- `contentStatuses` Content statuses to search against. Optional.","schema":{"type":"string"}},{"$ref":"#/components/parameters/contentExpand"},{"name":"cursor","in":"query","description":"Pointer to a set of search results, returned as part of the `next` or `prev` URL from the previous search call.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"The maximum number of content objects to return per page.\nNote, this may be restricted by fixed system limits.","schema":{"minimum":0,"type":"integer","format":"int32","default":25}}],"responses":{"200":{"description":"Returned if the requested list of content is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentArray"}}}},"400":{"description":"Returned if the CQL is invalid or missing.","content":{}},"401":{"description":"Returned if the authentication credentials are incorrect or missing\nfrom the request.","content":{}}},"security":[{"basicAuth":[]},{"oAuthDefinitions":["search:confluence"]}],"x-atlassian-oauth2-scopes":[{"scheme":"oAuthDefinitions","state":"Current","scopes":["search:confluence"]},{"scheme":"oAuthDefinitions","state":"Beta","scopes":["read:content-details:confluence"]}],"x-atlassian-data-security-policy":[{"app-access-rule-exempt":false}],"x-atlassian-connect-scope":"READ"}},"/wiki/rest/api/content/{id}/pageTree":{"delete":{"tags":["Experimental"],"summary":"Delete page tree","description":"Moves a pagetree rooted at a page to the space's trash:\n\n- If the content's type is `page` and its status is `current`, it will be trashed including\nall its descendants.\n- For every other combination of content type and status, this API is not supported.\n\nThis API accepts the pageTree delete request and returns a task ID.\nThe delete process happens asynchronously.\n\n Response example:\n <pre><code>\n {\n \"id\" : \"1180606\",\n \"links\" : {\n \"status\" : \"/rest/api/longtask/1180606\"\n }\n }\n </code></pre>\n Use the `/longtask/<taskId>` REST API to get the copy task status.\n\n**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:\n'Delete' permission for the space that the content is in.","operationId":"deletePageTree","parameters":[{"name":"id","in":"path","description":"The ID of the content which forms root of the page tree, to be deleted.","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Returned if the request to trash content and all its current page descendants, is successfully accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LongTask"}}}},"400":{"description":"Returned if the content id is invalid or id does not represents a 'CURRENT' page.","content":{}},"401":{"description":"Returned if the authentication credentials are incorrect or missing\nfrom the request.","content":{}},"403":{"description":"Returned if the calling user can not delete the content with specified id.","content":{}},"404":{"description":"Returned if;\n\n- There is no content with the given ID.\n- The requesting user does not have permission to trash the content or any of it's descendant pages.","content":{}}},"security":[{"basicAuth":[]},{"oAuthDefinitions":["write:confluence-content"]}],"x-atlassian-oauth2-scopes":[{"scheme":"oAuthDefinitions","state":"Current","scopes":["write:confluence-content"]},{"scheme":"oAuthDefinitions","state":"Beta","scopes":["delete:content:confluence"]}],"x-atlassian-data-security-policy":[{"app-access-rule-exempt":false}],"x-atlassian-connect-scope":"DELETE"}},"/wiki/rest/api/content/{pageId}/move/{position}/{targetId}":{"put":{"tags":["Content - children and descendants"],"summary":"Move a page to a new location relative to a target page","description":"Move a page to a new location relative to a target page:\n\n* `before` - move the page under the same parent as the target, before the target in the list of children\n* `after` - move the page under the same parent as the target, after the target in the list of children\n* `append` - move the page to be a child of the target\n\nCaution: This API can move pages to the top level of a space. Top-level pages are difficult to find in the UI\nbecause they do not show up in the page tree display. To avoid this, never use `before` or `after` positions\nwhen the `targetId` is a top-level page.","operationId":"movePage","parameters":[{"name":"pageId","in":"path","description":"The ID of the page to be moved","required":true,"schema":{"type":"string"}},{"name":"position","in":"path","description":"The position to move the page to relative to the target page:\n* `before` - move the page under the same parent as the target, before the target in the list of children\n* `after` - move the page under the same parent as the target, after the target in the list of children\n* `append` - move the page to be a child of the target","required":true,"schema":{"type":"string","enum":["before","after","append"]}},{"name":"targetId","in":"path","description":"The ID of the target page for this operation","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Page was successfully moved","content":{"application/json":{"schema":{"type":"object","properties":{"pageId":{"$ref":"#/components/schemas/ContentId"}}}}}},"400":{"description":"Returned if;\n\n- A page already exists in the target space with the same name.\n User is advised to rename page before moving.\n- The move would create a parent-child loop (page becomes a descendant and ancestor of itself)\n- The page has permission restrictions that the user does not have permission to create in the target space.\n User is advised to remove restrictions before moving.","content":{}},"403":{"description":"Returned if;\n\n- User does not have permission to remove page from current space\n- User does not have permission to create a page in target space","content":{}},"404":{"description":"Returned if;\n\n- The id or targetId refer to non-existent pages","content":{}}},"security":[{"basicAuth":[]},{"oAuthDefinitions":["write:confluence-content"]}],"x-atlassian-oauth2-scopes":[{"scheme":"oAuthDefinitions","state":"Current","scopes":["write:confluence-content"]},{"scheme":"oAuthDefinitions","state":"Beta","scopes":["write:page:confluence"]}],"x-atlassian-data-security-policy":[{"app-access-rule-exempt":false}],"x-atlassian-connect-scope":"WRITE"}},"/wiki/rest/api/content/{id}/child/attachment":{"put":{"tags":["Content - attachments"],"summary":"Create or update attachment","description":"Adds an attachment to a piece of content. If the attachment already exists\nfor the content, then the attachment is updated (i.e. a new version of the\nattachment is created).\n\nNote, you must set a `X-Atlassian-Token: nocheck` header on the request\nfor this method, otherwise it will be blocked. This protects against XSRF\nattacks, which is necessary as this method accepts multipart/form-data.\n\nThe media type 'multipart/form-data' is defined in [RFC 7578](https://www.ietf.org/rfc/rfc7578.txt).\nMost client libraries have classes that make it easier to implement\nmultipart posts, like the [MultipartEntityBuilder](https://hc.apache.org/httpcomponents-client-5.1.x/current/httpclient5/apidocs/)\nJava class provided by Apache HTTP Components.\n\nNote, according to [RFC 7578](https://tools.ietf.org/html/rfc7578#section-4.5),\nin the case where the form data is text,\nthe charset parameter for the \"text/plain\" Content-Type may be used to\nindicate the character encoding used in that part. In the case of this\nAPI endpoint, the `comment` body parameter should be sent with `type=text/plain`\nand `charset=utf-8` values. This will force the charset to be UTF-8.\n\nExample: This curl command attaches a file ('example.txt') to a piece of\ncontent (id='123') with a comment and `minorEdits`=true. If the 'example.txt'\nfile already exists, it will update it with a new version of the attachment.\n\n``` bash\ncurl -D- \\\n -u admin:admin \\\n -X PUT \\\n -H 'X-Atlassian-Token: nocheck' \\\n -F 'file=@\"example.txt\"' \\\n -F 'minorEdit=\"true\"' \\\n -F 'comment=\"Example attachment comment\"; type=text/plain; charset=utf-8' \\\n http://myhost/rest/api/content/123/child/attachment\n```\n**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:\nPermission to update the content.","operationId":"createOrUpdateAttachments","parameters":[{"name":"id","in":"path","description":"The ID of the content to add the attachment to.","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","description":"The status of the content that the attachment is being added to.\nThis should always be set to 'current'.","schema":{"type":"string","default":"current","enum":["current","draft"]}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file","minorEdit"],"properties":{"file":{"type":"string","description":"The relative location and name of the attachment to be added to\nthe content.","format":"binary"},"comment":{"type":"string","description":"The comment for the attachment that is being added.\nIf you specify a comment, then every file must have a comment and\nthe comments must be in the same order as the files. Alternatively,\ndon't specify any comments.","format":"binary"},"minorEdit":{"type":"string","description":"If `minorEdits` is set to 'true', no notification email or activity stream\nwill be generated when the attachment is added to the content.","format":"binary"}}}}},"required":true},"responses":{"200":{"description":"Returned if the attachments were added to the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentArray"}}}},"403":{"description":"Returned if;\n\n- Attachments are disabled.\n- The calling user does not have permission to add attachments to the\ncontent.","content":{}},"404":{"description":"Returned if;\n\n- The requested content is not found.\n- The user does not have permission to view it.\n- The attachment exceeds the maximum configured attachment size.","content":{}}},"security":[{"basicAuth":[]},{"oAuthDefinitions":["write:confluence-file"]}],"x-atlassian-oauth2-scopes":[{"scheme":"oAuthDefinitions","state":"Current","scopes":["write:confluence-file"]},{"scheme":"oAuthDefinitions","state":"Beta","scopes":["read:content-details:confluence","write:attachment:confluence"]}],"x-atlassian-data-security-policy":[{"app-access-rule-exempt":false}],"x-atlassian-connect-scope":"WRITE"},"post":{"tags":["Content - attachments"],"summary":"Create attachment","description":"Adds an attachment to a piece of content. This method only adds a new\nattachment. If you want to update an existing attachment, use\n[Create or update attachments](#api-content-id-child-attachment-put).\n\nNote, you must set a `X-Atlassian-Token: nocheck` header on the request\nfor this method, otherwise it will be blocked. This protects against XSRF\nattacks, which is necessary as this method accepts multipart/form-data.\n\nThe media type 'multipart/form-data' is defined in [RFC 7578](https://www.ietf.org/rfc/rfc7578.txt).\nMost client libraries have classes that make it easier to implement\nmultipart posts, like the [MultipartEntityBuilder](https://hc.apache.org/httpcomponents-client-5.1.x/current/httpclient5/apidocs/)\nJava class provided by Apache HTTP Components.\n\nNote, according to [RFC 7578](https://tools.ietf.org/html/rfc7578#section-4.5),\nin the case where the form data is text,\nthe charset parameter for the \"text/plain\" Content-Type
# --- truncated at 32 KB (404 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/atlassian-confluence/refs/heads/main/openapi/atlassian-confluence-rest-v1-openapi.json