Create document
curl --request POST \
--url https://staging.api.us.aptlydone.com/document/v1/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"tenantId": "550e8400-e29b-41d4-a716-446655440000",
"documentName": "Global Delegation of Authority Policy - ProxyComm Inc.",
"documentDescription": "Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.",
"documentIcon": "link-outlined",
"documentOwnerId": "550e8400-e29b-41d4-a716-446655440003",
"documentOwnerUsername": "John Doe",
"documentMetadata": "{ \"code\": \"GOV-DFA-2\", \"version\": \"2024.2\" }",
"fileId": "550e8400-e29b-41d4-a716-446655440001",
"documentTypeId": "550e8400-e29b-41d4-a716-446655440002",
"documentTypeName": "Policy",
"documentStatus": "DRAFT",
"documentSharingType": "RESTRICTED",
"documentUploadType": "LINKED",
"documentUrl": "intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy",
"documentSharingGroups": [
{
"groupId": "550e8400-e29b-41d4-a716-446655440013",
"tenantGroupTypeId": "550e8400-e29b-41d4-a716-446655440023"
}
],
"documentSharingUsers": [
{
"userId": "550e8400-e29b-41d4-a716-446655440033"
}
],
"responsibleUserId": "550e8400-e29b-41d4-a716-446655440033",
"reviewerUserId": "550e8400-e29b-41d4-a716-446655440033",
"approverUserId": "550e8400-e29b-41d4-a716-446655440033",
"responsibleUsername": "Responsible user name ",
"reviewerUsername": "Reviewer user name ",
"approverUsername": "Approver user name",
"approverPositionId": "550e8400-e29b-41d4-a716-446655440023",
"responsiblePositionId": "550e8400-e29b-41d4-a716-446655440023",
"reviewerPositionId": "550e8400-e29b-41d4-a716-446655440023",
"approverPositionName": "Approver position name",
"reviewerPositionName": "Reviewer position name",
"responsiblePositionName": "Responsible position name",
"isExternal": "true"
}
EOFimport requests
url = "https://staging.api.us.aptlydone.com/document/v1/documents"
payload = {
"tenantId": "550e8400-e29b-41d4-a716-446655440000",
"documentName": "Global Delegation of Authority Policy - ProxyComm Inc.",
"documentDescription": "Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.",
"documentIcon": "link-outlined",
"documentOwnerId": "550e8400-e29b-41d4-a716-446655440003",
"documentOwnerUsername": "John Doe",
"documentMetadata": "{ \"code\": \"GOV-DFA-2\", \"version\": \"2024.2\" }",
"fileId": "550e8400-e29b-41d4-a716-446655440001",
"documentTypeId": "550e8400-e29b-41d4-a716-446655440002",
"documentTypeName": "Policy",
"documentStatus": "DRAFT",
"documentSharingType": "RESTRICTED",
"documentUploadType": "LINKED",
"documentUrl": "intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy",
"documentSharingGroups": [
{
"groupId": "550e8400-e29b-41d4-a716-446655440013",
"tenantGroupTypeId": "550e8400-e29b-41d4-a716-446655440023"
}
],
"documentSharingUsers": [{ "userId": "550e8400-e29b-41d4-a716-446655440033" }],
"responsibleUserId": "550e8400-e29b-41d4-a716-446655440033",
"reviewerUserId": "550e8400-e29b-41d4-a716-446655440033",
"approverUserId": "550e8400-e29b-41d4-a716-446655440033",
"responsibleUsername": "Responsible user name ",
"reviewerUsername": "Reviewer user name ",
"approverUsername": "Approver user name",
"approverPositionId": "550e8400-e29b-41d4-a716-446655440023",
"responsiblePositionId": "550e8400-e29b-41d4-a716-446655440023",
"reviewerPositionId": "550e8400-e29b-41d4-a716-446655440023",
"approverPositionName": "Approver position name",
"reviewerPositionName": "Reviewer position name",
"responsiblePositionName": "Responsible position name",
"isExternal": "true"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tenantId: '550e8400-e29b-41d4-a716-446655440000',
documentName: 'Global Delegation of Authority Policy - ProxyComm Inc.',
documentDescription: 'Defines the framework for delegating authority across ProxyComm\'s global operations, outlining roles, responsibilities, and decision-making limits.',
documentIcon: 'link-outlined',
documentOwnerId: '550e8400-e29b-41d4-a716-446655440003',
documentOwnerUsername: 'John Doe',
documentMetadata: '{ "code": "GOV-DFA-2", "version": "2024.2" }',
fileId: '550e8400-e29b-41d4-a716-446655440001',
documentTypeId: '550e8400-e29b-41d4-a716-446655440002',
documentTypeName: 'Policy',
documentStatus: 'DRAFT',
documentSharingType: 'RESTRICTED',
documentUploadType: 'LINKED',
documentUrl: 'intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy',
documentSharingGroups: [
{
groupId: '550e8400-e29b-41d4-a716-446655440013',
tenantGroupTypeId: '550e8400-e29b-41d4-a716-446655440023'
}
],
documentSharingUsers: [{userId: '550e8400-e29b-41d4-a716-446655440033'}],
responsibleUserId: '550e8400-e29b-41d4-a716-446655440033',
reviewerUserId: '550e8400-e29b-41d4-a716-446655440033',
approverUserId: '550e8400-e29b-41d4-a716-446655440033',
responsibleUsername: 'Responsible user name ',
reviewerUsername: 'Reviewer user name ',
approverUsername: 'Approver user name',
approverPositionId: '550e8400-e29b-41d4-a716-446655440023',
responsiblePositionId: '550e8400-e29b-41d4-a716-446655440023',
reviewerPositionId: '550e8400-e29b-41d4-a716-446655440023',
approverPositionName: 'Approver position name',
reviewerPositionName: 'Reviewer position name',
responsiblePositionName: 'Responsible position name',
isExternal: 'true'
})
};
fetch('https://staging.api.us.aptlydone.com/document/v1/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.us.aptlydone.com/document/v1/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tenantId' => '550e8400-e29b-41d4-a716-446655440000',
'documentName' => 'Global Delegation of Authority Policy - ProxyComm Inc.',
'documentDescription' => 'Defines the framework for delegating authority across ProxyComm\'s global operations, outlining roles, responsibilities, and decision-making limits.',
'documentIcon' => 'link-outlined',
'documentOwnerId' => '550e8400-e29b-41d4-a716-446655440003',
'documentOwnerUsername' => 'John Doe',
'documentMetadata' => '{ "code": "GOV-DFA-2", "version": "2024.2" }',
'fileId' => '550e8400-e29b-41d4-a716-446655440001',
'documentTypeId' => '550e8400-e29b-41d4-a716-446655440002',
'documentTypeName' => 'Policy',
'documentStatus' => 'DRAFT',
'documentSharingType' => 'RESTRICTED',
'documentUploadType' => 'LINKED',
'documentUrl' => 'intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy',
'documentSharingGroups' => [
[
'groupId' => '550e8400-e29b-41d4-a716-446655440013',
'tenantGroupTypeId' => '550e8400-e29b-41d4-a716-446655440023'
]
],
'documentSharingUsers' => [
[
'userId' => '550e8400-e29b-41d4-a716-446655440033'
]
],
'responsibleUserId' => '550e8400-e29b-41d4-a716-446655440033',
'reviewerUserId' => '550e8400-e29b-41d4-a716-446655440033',
'approverUserId' => '550e8400-e29b-41d4-a716-446655440033',
'responsibleUsername' => 'Responsible user name ',
'reviewerUsername' => 'Reviewer user name ',
'approverUsername' => 'Approver user name',
'approverPositionId' => '550e8400-e29b-41d4-a716-446655440023',
'responsiblePositionId' => '550e8400-e29b-41d4-a716-446655440023',
'reviewerPositionId' => '550e8400-e29b-41d4-a716-446655440023',
'approverPositionName' => 'Approver position name',
'reviewerPositionName' => 'Reviewer position name',
'responsiblePositionName' => 'Responsible position name',
'isExternal' => 'true'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.api.us.aptlydone.com/document/v1/documents"
payload := strings.NewReader("{\n \"tenantId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"documentName\": \"Global Delegation of Authority Policy - ProxyComm Inc.\",\n \"documentDescription\": \"Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.\",\n \"documentIcon\": \"link-outlined\",\n \"documentOwnerId\": \"550e8400-e29b-41d4-a716-446655440003\",\n \"documentOwnerUsername\": \"John Doe\",\n \"documentMetadata\": \"{ \\\"code\\\": \\\"GOV-DFA-2\\\", \\\"version\\\": \\\"2024.2\\\" }\",\n \"fileId\": \"550e8400-e29b-41d4-a716-446655440001\",\n \"documentTypeId\": \"550e8400-e29b-41d4-a716-446655440002\",\n \"documentTypeName\": \"Policy\",\n \"documentStatus\": \"DRAFT\",\n \"documentSharingType\": \"RESTRICTED\",\n \"documentUploadType\": \"LINKED\",\n \"documentUrl\": \"intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy\",\n \"documentSharingGroups\": [\n {\n \"groupId\": \"550e8400-e29b-41d4-a716-446655440013\",\n \"tenantGroupTypeId\": \"550e8400-e29b-41d4-a716-446655440023\"\n }\n ],\n \"documentSharingUsers\": [\n {\n \"userId\": \"550e8400-e29b-41d4-a716-446655440033\"\n }\n ],\n \"responsibleUserId\": \"550e8400-e29b-41d4-a716-446655440033\",\n \"reviewerUserId\": \"550e8400-e29b-41d4-a716-446655440033\",\n \"approverUserId\": \"550e8400-e29b-41d4-a716-446655440033\",\n \"responsibleUsername\": \"Responsible user name \",\n \"reviewerUsername\": \"Reviewer user name \",\n \"approverUsername\": \"Approver user name\",\n \"approverPositionId\": \"550e8400-e29b-41d4-a716-446655440023\",\n \"responsiblePositionId\": \"550e8400-e29b-41d4-a716-446655440023\",\n \"reviewerPositionId\": \"550e8400-e29b-41d4-a716-446655440023\",\n \"approverPositionName\": \"Approver position name\",\n \"reviewerPositionName\": \"Reviewer position name\",\n \"responsiblePositionName\": \"Responsible position name\",\n \"isExternal\": \"true\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.api.us.aptlydone.com/document/v1/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tenantId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"documentName\": \"Global Delegation of Authority Policy - ProxyComm Inc.\",\n \"documentDescription\": \"Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.\",\n \"documentIcon\": \"link-outlined\",\n \"documentOwnerId\": \"550e8400-e29b-41d4-a716-446655440003\",\n \"documentOwnerUsername\": \"John Doe\",\n \"documentMetadata\": \"{ \\\"code\\\": \\\"GOV-DFA-2\\\", \\\"version\\\": \\\"2024.2\\\" }\",\n \"fileId\": \"550e8400-e29b-41d4-a716-446655440001\",\n \"documentTypeId\": \"550e8400-e29b-41d4-a716-446655440002\",\n \"documentTypeName\": \"Policy\",\n \"documentStatus\": \"DRAFT\",\n \"documentSharingType\": \"RESTRICTED\",\n \"documentUploadType\": \"LINKED\",\n \"documentUrl\": \"intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy\",\n \"documentSharingGroups\": [\n {\n \"groupId\": \"550e8400-e29b-41d4-a716-446655440013\",\n \"tenantGroupTypeId\": \"550e8400-e29b-41d4-a716-446655440023\"\n }\n ],\n \"documentSharingUsers\": [\n {\n \"userId\": \"550e8400-e29b-41d4-a716-446655440033\"\n }\n ],\n \"responsibleUserId\": \"550e8400-e29b-41d4-a716-446655440033\",\n \"reviewerUserId\": \"550e8400-e29b-41d4-a716-446655440033\",\n \"approverUserId\": \"550e8400-e29b-41d4-a716-446655440033\",\n \"responsibleUsername\": \"Responsible user name \",\n \"reviewerUsername\": \"Reviewer user name \",\n \"approverUsername\": \"Approver user name\",\n \"approverPositionId\": \"550e8400-e29b-41d4-a716-446655440023\",\n \"responsiblePositionId\": \"550e8400-e29b-41d4-a716-446655440023\",\n \"reviewerPositionId\": \"550e8400-e29b-41d4-a716-446655440023\",\n \"approverPositionName\": \"Approver position name\",\n \"reviewerPositionName\": \"Reviewer position name\",\n \"responsiblePositionName\": \"Responsible position name\",\n \"isExternal\": \"true\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.us.aptlydone.com/document/v1/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tenantId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"documentName\": \"Global Delegation of Authority Policy - ProxyComm Inc.\",\n \"documentDescription\": \"Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.\",\n \"documentIcon\": \"link-outlined\",\n \"documentOwnerId\": \"550e8400-e29b-41d4-a716-446655440003\",\n \"documentOwnerUsername\": \"John Doe\",\n \"documentMetadata\": \"{ \\\"code\\\": \\\"GOV-DFA-2\\\", \\\"version\\\": \\\"2024.2\\\" }\",\n \"fileId\": \"550e8400-e29b-41d4-a716-446655440001\",\n \"documentTypeId\": \"550e8400-e29b-41d4-a716-446655440002\",\n \"documentTypeName\": \"Policy\",\n \"documentStatus\": \"DRAFT\",\n \"documentSharingType\": \"RESTRICTED\",\n \"documentUploadType\": \"LINKED\",\n \"documentUrl\": \"intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy\",\n \"documentSharingGroups\": [\n {\n \"groupId\": \"550e8400-e29b-41d4-a716-446655440013\",\n \"tenantGroupTypeId\": \"550e8400-e29b-41d4-a716-446655440023\"\n }\n ],\n \"documentSharingUsers\": [\n {\n \"userId\": \"550e8400-e29b-41d4-a716-446655440033\"\n }\n ],\n \"responsibleUserId\": \"550e8400-e29b-41d4-a716-446655440033\",\n \"reviewerUserId\": \"550e8400-e29b-41d4-a716-446655440033\",\n \"approverUserId\": \"550e8400-e29b-41d4-a716-446655440033\",\n \"responsibleUsername\": \"Responsible user name \",\n \"reviewerUsername\": \"Reviewer user name \",\n \"approverUsername\": \"Approver user name\",\n \"approverPositionId\": \"550e8400-e29b-41d4-a716-446655440023\",\n \"responsiblePositionId\": \"550e8400-e29b-41d4-a716-446655440023\",\n \"reviewerPositionId\": \"550e8400-e29b-41d4-a716-446655440023\",\n \"approverPositionName\": \"Approver position name\",\n \"reviewerPositionName\": \"Reviewer position name\",\n \"responsiblePositionName\": \"Responsible position name\",\n \"isExternal\": \"true\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"timestamp": "2026-01-12T09:12:23.874Z",
"message": "Success",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440100",
"tenantId": "550e8400-e29b-41d4-a716-446655440000",
"documentName": "Global Delegation of Authority Policy - ProxyComm Inc.",
"documentDescription": "Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits to ensure compliance, accountability, and operational consistency.",
"documentMetadata": "{ \"code\": \"GOV-DFA-2\", \"version\": \"2024.2\" }",
"fileId": "550e8400-e29b-41d4-a716-446655440001",
"documentTypeId": "550e8400-e29b-41d4-a716-446655440002",
"documentStatus": "DRAFT",
"documentSharingType": "RESTRICTED",
"documentIcon": "link-outlined",
"documentOwnerId": "550e8400-e29b-41d4-a716-446655440003",
"documentUploadType": "LINKED",
"documentUrl": "intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy",
"uploadedOn": "2025-02-13T12:00:00Z",
"lastUpdatedBy": "550e8400-e29b-41d4-a716-446655440004",
"lastUpdatedOn": "2025-02-14T15:30:00Z",
"archivedOn": "2025-03-01T10:00:00Z",
"deletedOn": "2025-04-01T12:00:00Z",
"documentDisplayId": "10000",
"link": "/documents/view/eyJ0ZW5hbnRJZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMCIsImRvY3VtZW50SWQiOiJjMDBjMGNkNy03ZmJjLTRmZTEtOWYxMy1lYzc5OTlmMjhjNDgifQ=="
}
}Documents
Create document
Create a document in Aptly with its name, description, metadata, file, type, status and sharing settings.
POST
/
v1
/
documents
Create document
curl --request POST \
--url https://staging.api.us.aptlydone.com/document/v1/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"tenantId": "550e8400-e29b-41d4-a716-446655440000",
"documentName": "Global Delegation of Authority Policy - ProxyComm Inc.",
"documentDescription": "Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.",
"documentIcon": "link-outlined",
"documentOwnerId": "550e8400-e29b-41d4-a716-446655440003",
"documentOwnerUsername": "John Doe",
"documentMetadata": "{ \"code\": \"GOV-DFA-2\", \"version\": \"2024.2\" }",
"fileId": "550e8400-e29b-41d4-a716-446655440001",
"documentTypeId": "550e8400-e29b-41d4-a716-446655440002",
"documentTypeName": "Policy",
"documentStatus": "DRAFT",
"documentSharingType": "RESTRICTED",
"documentUploadType": "LINKED",
"documentUrl": "intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy",
"documentSharingGroups": [
{
"groupId": "550e8400-e29b-41d4-a716-446655440013",
"tenantGroupTypeId": "550e8400-e29b-41d4-a716-446655440023"
}
],
"documentSharingUsers": [
{
"userId": "550e8400-e29b-41d4-a716-446655440033"
}
],
"responsibleUserId": "550e8400-e29b-41d4-a716-446655440033",
"reviewerUserId": "550e8400-e29b-41d4-a716-446655440033",
"approverUserId": "550e8400-e29b-41d4-a716-446655440033",
"responsibleUsername": "Responsible user name ",
"reviewerUsername": "Reviewer user name ",
"approverUsername": "Approver user name",
"approverPositionId": "550e8400-e29b-41d4-a716-446655440023",
"responsiblePositionId": "550e8400-e29b-41d4-a716-446655440023",
"reviewerPositionId": "550e8400-e29b-41d4-a716-446655440023",
"approverPositionName": "Approver position name",
"reviewerPositionName": "Reviewer position name",
"responsiblePositionName": "Responsible position name",
"isExternal": "true"
}
EOFimport requests
url = "https://staging.api.us.aptlydone.com/document/v1/documents"
payload = {
"tenantId": "550e8400-e29b-41d4-a716-446655440000",
"documentName": "Global Delegation of Authority Policy - ProxyComm Inc.",
"documentDescription": "Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.",
"documentIcon": "link-outlined",
"documentOwnerId": "550e8400-e29b-41d4-a716-446655440003",
"documentOwnerUsername": "John Doe",
"documentMetadata": "{ \"code\": \"GOV-DFA-2\", \"version\": \"2024.2\" }",
"fileId": "550e8400-e29b-41d4-a716-446655440001",
"documentTypeId": "550e8400-e29b-41d4-a716-446655440002",
"documentTypeName": "Policy",
"documentStatus": "DRAFT",
"documentSharingType": "RESTRICTED",
"documentUploadType": "LINKED",
"documentUrl": "intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy",
"documentSharingGroups": [
{
"groupId": "550e8400-e29b-41d4-a716-446655440013",
"tenantGroupTypeId": "550e8400-e29b-41d4-a716-446655440023"
}
],
"documentSharingUsers": [{ "userId": "550e8400-e29b-41d4-a716-446655440033" }],
"responsibleUserId": "550e8400-e29b-41d4-a716-446655440033",
"reviewerUserId": "550e8400-e29b-41d4-a716-446655440033",
"approverUserId": "550e8400-e29b-41d4-a716-446655440033",
"responsibleUsername": "Responsible user name ",
"reviewerUsername": "Reviewer user name ",
"approverUsername": "Approver user name",
"approverPositionId": "550e8400-e29b-41d4-a716-446655440023",
"responsiblePositionId": "550e8400-e29b-41d4-a716-446655440023",
"reviewerPositionId": "550e8400-e29b-41d4-a716-446655440023",
"approverPositionName": "Approver position name",
"reviewerPositionName": "Reviewer position name",
"responsiblePositionName": "Responsible position name",
"isExternal": "true"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tenantId: '550e8400-e29b-41d4-a716-446655440000',
documentName: 'Global Delegation of Authority Policy - ProxyComm Inc.',
documentDescription: 'Defines the framework for delegating authority across ProxyComm\'s global operations, outlining roles, responsibilities, and decision-making limits.',
documentIcon: 'link-outlined',
documentOwnerId: '550e8400-e29b-41d4-a716-446655440003',
documentOwnerUsername: 'John Doe',
documentMetadata: '{ "code": "GOV-DFA-2", "version": "2024.2" }',
fileId: '550e8400-e29b-41d4-a716-446655440001',
documentTypeId: '550e8400-e29b-41d4-a716-446655440002',
documentTypeName: 'Policy',
documentStatus: 'DRAFT',
documentSharingType: 'RESTRICTED',
documentUploadType: 'LINKED',
documentUrl: 'intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy',
documentSharingGroups: [
{
groupId: '550e8400-e29b-41d4-a716-446655440013',
tenantGroupTypeId: '550e8400-e29b-41d4-a716-446655440023'
}
],
documentSharingUsers: [{userId: '550e8400-e29b-41d4-a716-446655440033'}],
responsibleUserId: '550e8400-e29b-41d4-a716-446655440033',
reviewerUserId: '550e8400-e29b-41d4-a716-446655440033',
approverUserId: '550e8400-e29b-41d4-a716-446655440033',
responsibleUsername: 'Responsible user name ',
reviewerUsername: 'Reviewer user name ',
approverUsername: 'Approver user name',
approverPositionId: '550e8400-e29b-41d4-a716-446655440023',
responsiblePositionId: '550e8400-e29b-41d4-a716-446655440023',
reviewerPositionId: '550e8400-e29b-41d4-a716-446655440023',
approverPositionName: 'Approver position name',
reviewerPositionName: 'Reviewer position name',
responsiblePositionName: 'Responsible position name',
isExternal: 'true'
})
};
fetch('https://staging.api.us.aptlydone.com/document/v1/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.us.aptlydone.com/document/v1/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tenantId' => '550e8400-e29b-41d4-a716-446655440000',
'documentName' => 'Global Delegation of Authority Policy - ProxyComm Inc.',
'documentDescription' => 'Defines the framework for delegating authority across ProxyComm\'s global operations, outlining roles, responsibilities, and decision-making limits.',
'documentIcon' => 'link-outlined',
'documentOwnerId' => '550e8400-e29b-41d4-a716-446655440003',
'documentOwnerUsername' => 'John Doe',
'documentMetadata' => '{ "code": "GOV-DFA-2", "version": "2024.2" }',
'fileId' => '550e8400-e29b-41d4-a716-446655440001',
'documentTypeId' => '550e8400-e29b-41d4-a716-446655440002',
'documentTypeName' => 'Policy',
'documentStatus' => 'DRAFT',
'documentSharingType' => 'RESTRICTED',
'documentUploadType' => 'LINKED',
'documentUrl' => 'intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy',
'documentSharingGroups' => [
[
'groupId' => '550e8400-e29b-41d4-a716-446655440013',
'tenantGroupTypeId' => '550e8400-e29b-41d4-a716-446655440023'
]
],
'documentSharingUsers' => [
[
'userId' => '550e8400-e29b-41d4-a716-446655440033'
]
],
'responsibleUserId' => '550e8400-e29b-41d4-a716-446655440033',
'reviewerUserId' => '550e8400-e29b-41d4-a716-446655440033',
'approverUserId' => '550e8400-e29b-41d4-a716-446655440033',
'responsibleUsername' => 'Responsible user name ',
'reviewerUsername' => 'Reviewer user name ',
'approverUsername' => 'Approver user name',
'approverPositionId' => '550e8400-e29b-41d4-a716-446655440023',
'responsiblePositionId' => '550e8400-e29b-41d4-a716-446655440023',
'reviewerPositionId' => '550e8400-e29b-41d4-a716-446655440023',
'approverPositionName' => 'Approver position name',
'reviewerPositionName' => 'Reviewer position name',
'responsiblePositionName' => 'Responsible position name',
'isExternal' => 'true'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.api.us.aptlydone.com/document/v1/documents"
payload := strings.NewReader("{\n \"tenantId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"documentName\": \"Global Delegation of Authority Policy - ProxyComm Inc.\",\n \"documentDescription\": \"Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.\",\n \"documentIcon\": \"link-outlined\",\n \"documentOwnerId\": \"550e8400-e29b-41d4-a716-446655440003\",\n \"documentOwnerUsername\": \"John Doe\",\n \"documentMetadata\": \"{ \\\"code\\\": \\\"GOV-DFA-2\\\", \\\"version\\\": \\\"2024.2\\\" }\",\n \"fileId\": \"550e8400-e29b-41d4-a716-446655440001\",\n \"documentTypeId\": \"550e8400-e29b-41d4-a716-446655440002\",\n \"documentTypeName\": \"Policy\",\n \"documentStatus\": \"DRAFT\",\n \"documentSharingType\": \"RESTRICTED\",\n \"documentUploadType\": \"LINKED\",\n \"documentUrl\": \"intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy\",\n \"documentSharingGroups\": [\n {\n \"groupId\": \"550e8400-e29b-41d4-a716-446655440013\",\n \"tenantGroupTypeId\": \"550e8400-e29b-41d4-a716-446655440023\"\n }\n ],\n \"documentSharingUsers\": [\n {\n \"userId\": \"550e8400-e29b-41d4-a716-446655440033\"\n }\n ],\n \"responsibleUserId\": \"550e8400-e29b-41d4-a716-446655440033\",\n \"reviewerUserId\": \"550e8400-e29b-41d4-a716-446655440033\",\n \"approverUserId\": \"550e8400-e29b-41d4-a716-446655440033\",\n \"responsibleUsername\": \"Responsible user name \",\n \"reviewerUsername\": \"Reviewer user name \",\n \"approverUsername\": \"Approver user name\",\n \"approverPositionId\": \"550e8400-e29b-41d4-a716-446655440023\",\n \"responsiblePositionId\": \"550e8400-e29b-41d4-a716-446655440023\",\n \"reviewerPositionId\": \"550e8400-e29b-41d4-a716-446655440023\",\n \"approverPositionName\": \"Approver position name\",\n \"reviewerPositionName\": \"Reviewer position name\",\n \"responsiblePositionName\": \"Responsible position name\",\n \"isExternal\": \"true\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.api.us.aptlydone.com/document/v1/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tenantId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"documentName\": \"Global Delegation of Authority Policy - ProxyComm Inc.\",\n \"documentDescription\": \"Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.\",\n \"documentIcon\": \"link-outlined\",\n \"documentOwnerId\": \"550e8400-e29b-41d4-a716-446655440003\",\n \"documentOwnerUsername\": \"John Doe\",\n \"documentMetadata\": \"{ \\\"code\\\": \\\"GOV-DFA-2\\\", \\\"version\\\": \\\"2024.2\\\" }\",\n \"fileId\": \"550e8400-e29b-41d4-a716-446655440001\",\n \"documentTypeId\": \"550e8400-e29b-41d4-a716-446655440002\",\n \"documentTypeName\": \"Policy\",\n \"documentStatus\": \"DRAFT\",\n \"documentSharingType\": \"RESTRICTED\",\n \"documentUploadType\": \"LINKED\",\n \"documentUrl\": \"intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy\",\n \"documentSharingGroups\": [\n {\n \"groupId\": \"550e8400-e29b-41d4-a716-446655440013\",\n \"tenantGroupTypeId\": \"550e8400-e29b-41d4-a716-446655440023\"\n }\n ],\n \"documentSharingUsers\": [\n {\n \"userId\": \"550e8400-e29b-41d4-a716-446655440033\"\n }\n ],\n \"responsibleUserId\": \"550e8400-e29b-41d4-a716-446655440033\",\n \"reviewerUserId\": \"550e8400-e29b-41d4-a716-446655440033\",\n \"approverUserId\": \"550e8400-e29b-41d4-a716-446655440033\",\n \"responsibleUsername\": \"Responsible user name \",\n \"reviewerUsername\": \"Reviewer user name \",\n \"approverUsername\": \"Approver user name\",\n \"approverPositionId\": \"550e8400-e29b-41d4-a716-446655440023\",\n \"responsiblePositionId\": \"550e8400-e29b-41d4-a716-446655440023\",\n \"reviewerPositionId\": \"550e8400-e29b-41d4-a716-446655440023\",\n \"approverPositionName\": \"Approver position name\",\n \"reviewerPositionName\": \"Reviewer position name\",\n \"responsiblePositionName\": \"Responsible position name\",\n \"isExternal\": \"true\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.us.aptlydone.com/document/v1/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tenantId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"documentName\": \"Global Delegation of Authority Policy - ProxyComm Inc.\",\n \"documentDescription\": \"Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.\",\n \"documentIcon\": \"link-outlined\",\n \"documentOwnerId\": \"550e8400-e29b-41d4-a716-446655440003\",\n \"documentOwnerUsername\": \"John Doe\",\n \"documentMetadata\": \"{ \\\"code\\\": \\\"GOV-DFA-2\\\", \\\"version\\\": \\\"2024.2\\\" }\",\n \"fileId\": \"550e8400-e29b-41d4-a716-446655440001\",\n \"documentTypeId\": \"550e8400-e29b-41d4-a716-446655440002\",\n \"documentTypeName\": \"Policy\",\n \"documentStatus\": \"DRAFT\",\n \"documentSharingType\": \"RESTRICTED\",\n \"documentUploadType\": \"LINKED\",\n \"documentUrl\": \"intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy\",\n \"documentSharingGroups\": [\n {\n \"groupId\": \"550e8400-e29b-41d4-a716-446655440013\",\n \"tenantGroupTypeId\": \"550e8400-e29b-41d4-a716-446655440023\"\n }\n ],\n \"documentSharingUsers\": [\n {\n \"userId\": \"550e8400-e29b-41d4-a716-446655440033\"\n }\n ],\n \"responsibleUserId\": \"550e8400-e29b-41d4-a716-446655440033\",\n \"reviewerUserId\": \"550e8400-e29b-41d4-a716-446655440033\",\n \"approverUserId\": \"550e8400-e29b-41d4-a716-446655440033\",\n \"responsibleUsername\": \"Responsible user name \",\n \"reviewerUsername\": \"Reviewer user name \",\n \"approverUsername\": \"Approver user name\",\n \"approverPositionId\": \"550e8400-e29b-41d4-a716-446655440023\",\n \"responsiblePositionId\": \"550e8400-e29b-41d4-a716-446655440023\",\n \"reviewerPositionId\": \"550e8400-e29b-41d4-a716-446655440023\",\n \"approverPositionName\": \"Approver position name\",\n \"reviewerPositionName\": \"Reviewer position name\",\n \"responsiblePositionName\": \"Responsible position name\",\n \"isExternal\": \"true\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"timestamp": "2026-01-12T09:12:23.874Z",
"message": "Success",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440100",
"tenantId": "550e8400-e29b-41d4-a716-446655440000",
"documentName": "Global Delegation of Authority Policy - ProxyComm Inc.",
"documentDescription": "Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits to ensure compliance, accountability, and operational consistency.",
"documentMetadata": "{ \"code\": \"GOV-DFA-2\", \"version\": \"2024.2\" }",
"fileId": "550e8400-e29b-41d4-a716-446655440001",
"documentTypeId": "550e8400-e29b-41d4-a716-446655440002",
"documentStatus": "DRAFT",
"documentSharingType": "RESTRICTED",
"documentIcon": "link-outlined",
"documentOwnerId": "550e8400-e29b-41d4-a716-446655440003",
"documentUploadType": "LINKED",
"documentUrl": "intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy",
"uploadedOn": "2025-02-13T12:00:00Z",
"lastUpdatedBy": "550e8400-e29b-41d4-a716-446655440004",
"lastUpdatedOn": "2025-02-14T15:30:00Z",
"archivedOn": "2025-03-01T10:00:00Z",
"deletedOn": "2025-04-01T12:00:00Z",
"documentDisplayId": "10000",
"link": "/documents/view/eyJ0ZW5hbnRJZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMCIsImRvY3VtZW50SWQiOiJjMDBjMGNkNy03ZmJjLTRmZTEtOWYxMy1lYzc5OTlmMjhjNDgifQ=="
}
}Authorizations
Body
application/json
Was this page helpful?