curl --request POST \
--url https://my.flowsign.app/api/v1/templates/{templateId}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"docs": [
{
"nonce": "<string>",
"fileName": "<string>",
"fileSize": 1,
"pageCount": 2,
"order": 1
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
docs: [{nonce: '<string>', fileName: '<string>', fileSize: 1, pageCount: 2, order: 1}]
})
};
fetch('https://my.flowsign.app/api/v1/templates/{templateId}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.flowsign.app/api/v1/templates/{templateId}/documents"
payload = { "docs": [
{
"nonce": "<string>",
"fileName": "<string>",
"fileSize": 1,
"pageCount": 2,
"order": 1
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://my.flowsign.app/api/v1/templates/{templateId}/documents");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"docs\": [\n {\n \"nonce\": \"<string>\",\n \"fileName\": \"<string>\",\n \"fileSize\": 1,\n \"pageCount\": 2,\n \"order\": 1\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"data": [
{
"nonce": "<string>",
"documentId": "<string>",
"filePath": "<string>",
"uploadUrl": "<string>"
}
]
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}Add documents to a template
Adds documents to a template. nonce MUST be unique within the template, since it names the file’s storage folder. fileSize is in bytes; a document over the size limit is a 413. order places the document among the template’s others. Each document comes back with its nonce and an uploadUrl: PUT the file’s bytes to it to attach them. Place fields with PUT /api/v1/templates/:templateId/fields. Requires CREATE template access.
curl --request POST \
--url https://my.flowsign.app/api/v1/templates/{templateId}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"docs": [
{
"nonce": "<string>",
"fileName": "<string>",
"fileSize": 1,
"pageCount": 2,
"order": 1
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
docs: [{nonce: '<string>', fileName: '<string>', fileSize: 1, pageCount: 2, order: 1}]
})
};
fetch('https://my.flowsign.app/api/v1/templates/{templateId}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.flowsign.app/api/v1/templates/{templateId}/documents"
payload = { "docs": [
{
"nonce": "<string>",
"fileName": "<string>",
"fileSize": 1,
"pageCount": 2,
"order": 1
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://my.flowsign.app/api/v1/templates/{templateId}/documents");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"docs\": [\n {\n \"nonce\": \"<string>\",\n \"fileName\": \"<string>\",\n \"fileSize\": 1,\n \"pageCount\": 2,\n \"order\": 1\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"data": [
{
"nonce": "<string>",
"documentId": "<string>",
"filePath": "<string>",
"uploadUrl": "<string>"
}
]
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The workspace to act in, from GET /api/v1/workspaces. Omit to act in the organisation's default workspace. A workspace the key's user cannot act in is treated as omitted.
Path Parameters
Body
1Show child attributes
Show child attributes
Response
Success
Show child attributes
Show child attributes
Was this page helpful?

