curl --request POST \
--url https://my.flowsign.app/api/v1/packages/from-template \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"templateId": "<string>",
"recipients": [
{
"role": "<string>",
"name": "<string>",
"email": "[email protected]"
}
],
"externalId": "<string>",
"status": "draft",
"scheduledAt": "2023-11-07T05:31:56Z",
"fields": {},
"workflowAnswers": {},
"documentAnswers": {},
"metadata": {}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
templateId: '<string>',
recipients: [{role: '<string>', name: '<string>', email: '[email protected]'}],
externalId: '<string>',
status: 'draft',
scheduledAt: '2023-11-07T05:31:56Z',
fields: {},
workflowAnswers: {},
documentAnswers: {},
metadata: {}
})
};
fetch('https://my.flowsign.app/api/v1/packages/from-template', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.flowsign.app/api/v1/packages/from-template"
payload = {
"templateId": "<string>",
"recipients": [
{
"role": "<string>",
"name": "<string>",
"email": "[email protected]"
}
],
"externalId": "<string>",
"status": "draft",
"scheduledAt": "2023-11-07T05:31:56Z",
"fields": {},
"workflowAnswers": {},
"documentAnswers": {},
"metadata": {}
}
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/packages/from-template");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"templateId\": \"<string>\",\n \"recipients\": [\n {\n \"role\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"[email protected]\"\n }\n ],\n \"externalId\": \"<string>\",\n \"status\": \"draft\",\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"fields\": {},\n \"workflowAnswers\": {},\n \"documentAnswers\": {},\n \"metadata\": {}\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"data": {
"packageId": "<string>",
"externalId": "<string>",
"status": "DRAFT"
}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}Launch a package from a template
Creates a package from the template, mapping each recipient onto the role of that name. Merge values go in fields; workflowAnswers and documentAnswers answer the questions the template’s documents ask. metadata sets custom field values over the template’s defaults; unknown keys are rejected with 422, and so are missing required values when the package is sent or scheduled. status: "sent" dispatches immediately; scheduledAt leaves it SCHEDULED instead. Repeating an externalId returns the existing package rather than creating a second one. Requires canSendPackages.
curl --request POST \
--url https://my.flowsign.app/api/v1/packages/from-template \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"templateId": "<string>",
"recipients": [
{
"role": "<string>",
"name": "<string>",
"email": "[email protected]"
}
],
"externalId": "<string>",
"status": "draft",
"scheduledAt": "2023-11-07T05:31:56Z",
"fields": {},
"workflowAnswers": {},
"documentAnswers": {},
"metadata": {}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
templateId: '<string>',
recipients: [{role: '<string>', name: '<string>', email: '[email protected]'}],
externalId: '<string>',
status: 'draft',
scheduledAt: '2023-11-07T05:31:56Z',
fields: {},
workflowAnswers: {},
documentAnswers: {},
metadata: {}
})
};
fetch('https://my.flowsign.app/api/v1/packages/from-template', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.flowsign.app/api/v1/packages/from-template"
payload = {
"templateId": "<string>",
"recipients": [
{
"role": "<string>",
"name": "<string>",
"email": "[email protected]"
}
],
"externalId": "<string>",
"status": "draft",
"scheduledAt": "2023-11-07T05:31:56Z",
"fields": {},
"workflowAnswers": {},
"documentAnswers": {},
"metadata": {}
}
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/packages/from-template");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"templateId\": \"<string>\",\n \"recipients\": [\n {\n \"role\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"[email protected]\"\n }\n ],\n \"externalId\": \"<string>\",\n \"status\": \"draft\",\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"fields\": {},\n \"workflowAnswers\": {},\n \"documentAnswers\": {},\n \"metadata\": {}\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"data": {
"packageId": "<string>",
"externalId": "<string>",
"status": "DRAFT"
}
}{
"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.
Body
11Show child attributes
Show child attributes
1 - 255draft, sent Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Custom field values keyed by custom field key. Every key must be a live custom field that applies to this package. An empty string clears a value.
Show child attributes
Show child attributes
Response
Success
Show child attributes
Show child attributes
Was this page helpful?

