Add documents to a package
curl --request POST \
--url https://my.flowsign.app/api/v1/packages/{packageId}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"documents": [
{
"fileName": "Employment agreement.pdf",
"pageCount": 4,
"nonce": "doc-1"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
documents: [{fileName: 'Employment agreement.pdf', pageCount: 4, nonce: 'doc-1'}]
})
};
fetch('https://my.flowsign.app/api/v1/packages/{packageId}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
documents: [{fileName: 'Employment agreement.pdf', pageCount: 4, nonce: 'doc-1'}]
})
};
fetch('https://my.flowsign.app/api/v1/packages/{packageId}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://my.flowsign.app/api/v1/packages/{packageId}/documents';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
documents: [{fileName: 'Employment agreement.pdf', pageCount: 4, nonce: 'doc-1'}]
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://my.flowsign.app/api/v1/packages/{packageId}/documents"
payload = { "documents": [
{
"fileName": "Employment agreement.pdf",
"pageCount": 4,
"nonce": "doc-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/packages/{packageId}/documents");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"documents\": [\n {\n \"fileName\": \"Employment agreement.pdf\",\n \"pageCount\": 4,\n \"nonce\": \"doc-1\"\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://my.flowsign.app/api/v1/packages/{packageId}/documents");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"documents\": [\n {\n \"fileName\": \"Employment agreement.pdf\",\n \"pageCount\": 4,\n \"nonce\": \"doc-1\"\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
$headers=@{}
$headers.Add("Authorization", "Bearer <token>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://my.flowsign.app/api/v1/packages/{packageId}/documents' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"documents": [
{
"fileName": "Employment agreement.pdf",
"pageCount": 4,
"nonce": "doc-1"
}
]
}'{
"data": {
"packageId": "cmg1p4k2a0003v9x0hq7d2e1s",
"documents": [
{
"id": "cmg4v8q2k0003s7xhq1w8n5r7",
"nonce": "doc-1",
"filePath": "cmf9x1a2b0000abcd1e2f3g4h/cmf9x1a2b0001abcd5i6j7k8l/packages/cmg4v8q2k0001s7xh3b9d2f6a/cmg4v8q2k0003s7xhq1w8n5r7-Employment agreement.pdf",
"uploadUrl": "https://xyzcompany.supabase.co/storage/v1/object/upload/sign/pdf/cmf9x1a2b0000abcd1e2f3g4h/cmf9x1a2b0001abcd5i6j7k8l/packages/cmg4v8q2k0001s7xh3b9d2f6a/cmg4v8q2k0003s7xhq1w8n5r7-Employment%20agreement.pdf?token=eyJhbGciOiJIUzI1NiJ9.example"
}
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}Packages
Add documents to a package
Adds documents to a DRAFT package and returns an upload URL for each. Requires canSendPackages.
POST
https://my.flowsign.app
/
api
/
v1
/
packages
/
{packageId}
/
documents
Add documents to a package
curl --request POST \
--url https://my.flowsign.app/api/v1/packages/{packageId}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"documents": [
{
"fileName": "Employment agreement.pdf",
"pageCount": 4,
"nonce": "doc-1"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
documents: [{fileName: 'Employment agreement.pdf', pageCount: 4, nonce: 'doc-1'}]
})
};
fetch('https://my.flowsign.app/api/v1/packages/{packageId}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
documents: [{fileName: 'Employment agreement.pdf', pageCount: 4, nonce: 'doc-1'}]
})
};
fetch('https://my.flowsign.app/api/v1/packages/{packageId}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://my.flowsign.app/api/v1/packages/{packageId}/documents';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
documents: [{fileName: 'Employment agreement.pdf', pageCount: 4, nonce: 'doc-1'}]
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://my.flowsign.app/api/v1/packages/{packageId}/documents"
payload = { "documents": [
{
"fileName": "Employment agreement.pdf",
"pageCount": 4,
"nonce": "doc-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/packages/{packageId}/documents");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"documents\": [\n {\n \"fileName\": \"Employment agreement.pdf\",\n \"pageCount\": 4,\n \"nonce\": \"doc-1\"\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://my.flowsign.app/api/v1/packages/{packageId}/documents");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"documents\": [\n {\n \"fileName\": \"Employment agreement.pdf\",\n \"pageCount\": 4,\n \"nonce\": \"doc-1\"\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
$headers=@{}
$headers.Add("Authorization", "Bearer <token>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://my.flowsign.app/api/v1/packages/{packageId}/documents' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"documents": [
{
"fileName": "Employment agreement.pdf",
"pageCount": 4,
"nonce": "doc-1"
}
]
}'{
"data": {
"packageId": "cmg1p4k2a0003v9x0hq7d2e1s",
"documents": [
{
"id": "cmg4v8q2k0003s7xhq1w8n5r7",
"nonce": "doc-1",
"filePath": "cmf9x1a2b0000abcd1e2f3g4h/cmf9x1a2b0001abcd5i6j7k8l/packages/cmg4v8q2k0001s7xh3b9d2f6a/cmg4v8q2k0003s7xhq1w8n5r7-Employment agreement.pdf",
"uploadUrl": "https://xyzcompany.supabase.co/storage/v1/object/upload/sign/pdf/cmf9x1a2b0000abcd1e2f3g4h/cmf9x1a2b0001abcd5i6j7k8l/packages/cmg4v8q2k0001s7xh3b9d2f6a/cmg4v8q2k0003s7xhq1w8n5r7-Employment%20agreement.pdf?token=eyJhbGciOiJIUzI1NiJ9.example"
}
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}{
"error": "Missing permission: canSendPackages",
"details": {
"recipients.0.email": [
"Invalid email"
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The workspace the key was issued for, as returned by GET /api/v1/workspaces. Optional: omitting it acts in the key's workspace, and any other id is rejected with 401.
Path Parameters
Body
application/json
The documents to add, in the order they should follow the package's existing documents. At least one.
Minimum array length:
1Show child attributes
Show child attributes
Response
Success
Show child attributes
Show child attributes
Was this page helpful?

