API Reference

Update a single section

Description

Fully replaces all details of a section given its properties; this is not a partial update.

PUT /documents/{documentId}/sections/{sectionId}

🚧

Required OAuth Scopes:

file:write

Parameters

ParameterInTypeRequiredDescription
documentIdpathstringtrueThe unique identifier of the document
sectionIdpathstringtrueThe unique identifier of the section
bodybodySectiontrueAll properties for the section, not just those to update

Body parameter example

{
  "index": 1,
  "name": "Risk Factor",
  "parent": {
    "id": "a8b3adb687644b27fafcb3a9875f0f0d_18"
  }
}

Code Samples

curl -X PUT https://api.app.wdesk.com/platform/v1/documents/{documentId}/sections/{sectionId}  \ 
-H 'Content-Type: application/json' \ 
-H 'Accept: application/json' \ 
-H 'Authorization: Bearer {access-token}'
http PUT https://api.app.wdesk.com/platform/v1/documents/{documentId}/sections/{sectionId}  \ 
Content-Type:application/json \ 
Accept:application/json \ 
Authorization:"Bearer {access-token}"
wget --method=PUT "https://api.app.wdesk.com/platform/v1/documents/{documentId}/sections/{sectionId}" \
 --output-document -  \ 
 --header 'Content-Type: application/json' \ 
 --header 'Accept: application/json' \ 
 --header 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api.app.wdesk.com/platform/v1/documents/{documentId}/sections/{sectionId}', headers = headers)

print(r.json())

Returns

200 - OK

Returns a Section object containing details about the updated Section.

Example Responses


{
  "id": "b9b3ddb587744a27aafda3c9865f1f0a_1",
  "name": "February",
  "parent": null,
  "index": 1,
  "children": [],
  "nonPrinting": false
}