Upload a file as an ISMS document's content
curl --request POST \
--url https://api.trycomp.ai/v1/isms/documents/{id}/upload \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"fileName": "ISMS Scope Statement.docx",
"fileType": "application/pdf"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({fileName: 'ISMS Scope Statement.docx', fileType: 'application/pdf'})
};
fetch('https://api.trycomp.ai/v1/isms/documents/{id}/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/isms/documents/{id}/upload"
payload = {
"fileName": "ISMS Scope Statement.docx",
"fileType": "application/pdf"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)ISMS
Upload a file as an ISMS document's content | Comp AI API
Attaches a customer-supplied PDF or DOCX as the document’s content. Does not switch the document to it — call PATCH content-source with ‘uploaded’ for that.
POST
/
v1
/
isms
/
documents
/
{id}
/
upload
Upload a file as an ISMS document's content
curl --request POST \
--url https://api.trycomp.ai/v1/isms/documents/{id}/upload \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"fileName": "ISMS Scope Statement.docx",
"fileType": "application/pdf"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({fileName: 'ISMS Scope Statement.docx', fileType: 'application/pdf'})
};
fetch('https://api.trycomp.ai/v1/isms/documents/{id}/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/isms/documents/{id}/upload"
payload = {
"fileName": "ISMS Scope Statement.docx",
"fileType": "application/pdf"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Body
application/json
Response
200
File attached; refreshed ISMS document
Was this page helpful?

