Create a document from a template
curl --request POST \
--url https://manuscript.example.com/api/v1/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ownerEmail": "<string>",
"coAuthorEmail": "<string>",
"documentName": "<string>",
"externalId": "<string>",
"templateId": "<string>",
"templateFields": {
"TextLong": "<string>",
"TextShort": "<string>",
"Number": 123,
"CustomLookup": "<string>",
"Address": {
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"stateProvinceRegion": "<string>",
"zipPostalCode": "<string>",
"country": "<string>"
}
},
"eventNotification": {
"webhookUrl": "<string>",
"events": []
}
}
'import requests
url = "https://manuscript.example.com/api/v1/documents"
payload = {
"ownerEmail": "<string>",
"coAuthorEmail": "<string>",
"documentName": "<string>",
"externalId": "<string>",
"templateId": "<string>",
"templateFields": {
"TextLong": "<string>",
"TextShort": "<string>",
"Number": 123,
"CustomLookup": "<string>",
"Address": {
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"stateProvinceRegion": "<string>",
"zipPostalCode": "<string>",
"country": "<string>"
}
},
"eventNotification": {
"webhookUrl": "<string>",
"events": []
}
}
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({
ownerEmail: '<string>',
coAuthorEmail: '<string>',
documentName: '<string>',
externalId: '<string>',
templateId: '<string>',
templateFields: {
TextLong: '<string>',
TextShort: '<string>',
Number: 123,
CustomLookup: '<string>',
Address: {
name: '<string>',
line1: '<string>',
line2: '<string>',
city: '<string>',
stateProvinceRegion: '<string>',
zipPostalCode: '<string>',
country: '<string>'
}
},
eventNotification: {webhookUrl: '<string>', events: []}
})
};
fetch('https://manuscript.example.com/api/v1/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"url": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"errors": [
{
"code": "<string>",
"description": "<string>",
"type": 123
}
],
"traceId": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"errors": [
{
"code": "<string>",
"description": "<string>",
"type": 123
}
],
"traceId": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"errors": [
{
"code": "<string>",
"description": "<string>",
"type": 123
}
],
"traceId": "<string>"
}Create a document from a template
Create a document from templateId and templateFields, with owner, co-author, name, externalId and an optional per-document eventNotification. Returns 201 with id and url.
POST
/
api
/
v1
/
documents
Create a document from a template
curl --request POST \
--url https://manuscript.example.com/api/v1/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ownerEmail": "<string>",
"coAuthorEmail": "<string>",
"documentName": "<string>",
"externalId": "<string>",
"templateId": "<string>",
"templateFields": {
"TextLong": "<string>",
"TextShort": "<string>",
"Number": 123,
"CustomLookup": "<string>",
"Address": {
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"stateProvinceRegion": "<string>",
"zipPostalCode": "<string>",
"country": "<string>"
}
},
"eventNotification": {
"webhookUrl": "<string>",
"events": []
}
}
'import requests
url = "https://manuscript.example.com/api/v1/documents"
payload = {
"ownerEmail": "<string>",
"coAuthorEmail": "<string>",
"documentName": "<string>",
"externalId": "<string>",
"templateId": "<string>",
"templateFields": {
"TextLong": "<string>",
"TextShort": "<string>",
"Number": 123,
"CustomLookup": "<string>",
"Address": {
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"stateProvinceRegion": "<string>",
"zipPostalCode": "<string>",
"country": "<string>"
}
},
"eventNotification": {
"webhookUrl": "<string>",
"events": []
}
}
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({
ownerEmail: '<string>',
coAuthorEmail: '<string>',
documentName: '<string>',
externalId: '<string>',
templateId: '<string>',
templateFields: {
TextLong: '<string>',
TextShort: '<string>',
Number: 123,
CustomLookup: '<string>',
Address: {
name: '<string>',
line1: '<string>',
line2: '<string>',
city: '<string>',
stateProvinceRegion: '<string>',
zipPostalCode: '<string>',
country: '<string>'
}
},
eventNotification: {webhookUrl: '<string>', events: []}
})
};
fetch('https://manuscript.example.com/api/v1/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"url": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"errors": [
{
"code": "<string>",
"description": "<string>",
"type": 123
}
],
"traceId": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"errors": [
{
"code": "<string>",
"description": "<string>",
"type": 123
}
],
"traceId": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"errors": [
{
"code": "<string>",
"description": "<string>",
"type": 123
}
],
"traceId": "<string>"
}Authorizations
Body
application/json