curl --request POST \
--url https://my.flowsign.app/api/v1/packages/{packageId}/library-documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"documentIds": [
"cmg1ld8x40001v9x0l4b2r7y3"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({documentIds: ['cmg1ld8x40001v9x0l4b2r7y3']})
};
fetch('https://my.flowsign.app/api/v1/packages/{packageId}/library-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({documentIds: ['cmg1ld8x40001v9x0l4b2r7y3']})
};
fetch('https://my.flowsign.app/api/v1/packages/{packageId}/library-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}/library-documents';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({documentIds: ['cmg1ld8x40001v9x0l4b2r7y3']})
};
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}/library-documents"
payload = { "documentIds": ["cmg1ld8x40001v9x0l4b2r7y3"] }
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}/library-documents");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"documentIds\": [\n \"cmg1ld8x40001v9x0l4b2r7y3\"\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}/library-documents");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"documentIds\": [\n \"cmg1ld8x40001v9x0l4b2r7y3\"\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}/library-documents' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"documentIds": [
"cmg1ld8x40001v9x0l4b2r7y3"
]
}'{
"data": {
"attached": 1
}
}{
"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"
]
}
}Attach library documents to a package
Links library documents into a DRAFT package. Each one is copied in when the package is scheduled or sent, so later library edits never reach it. Sending or scheduling is refused with 409 while a library role has no recipient with that role name. Requires canSendPackages.
curl --request POST \
--url https://my.flowsign.app/api/v1/packages/{packageId}/library-documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"documentIds": [
"cmg1ld8x40001v9x0l4b2r7y3"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({documentIds: ['cmg1ld8x40001v9x0l4b2r7y3']})
};
fetch('https://my.flowsign.app/api/v1/packages/{packageId}/library-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({documentIds: ['cmg1ld8x40001v9x0l4b2r7y3']})
};
fetch('https://my.flowsign.app/api/v1/packages/{packageId}/library-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}/library-documents';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({documentIds: ['cmg1ld8x40001v9x0l4b2r7y3']})
};
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}/library-documents"
payload = { "documentIds": ["cmg1ld8x40001v9x0l4b2r7y3"] }
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}/library-documents");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"documentIds\": [\n \"cmg1ld8x40001v9x0l4b2r7y3\"\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}/library-documents");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"documentIds\": [\n \"cmg1ld8x40001v9x0l4b2r7y3\"\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}/library-documents' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"documentIds": [
"cmg1ld8x40001v9x0l4b2r7y3"
]
}'{
"data": {
"attached": 1
}
}{
"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
Headers
Required on a key that acts for members, refused on any other key. Names the member the call runs as, as key=value: email=jane@acme.com, employee_id=E-1001, scim_external_id=… or a custom identifier. Keys are lowercase and matched case-insensitively. The call fails with 403 when no active member of the workspace matches.
Body
The library documents to link, from 1 to 50, appended to the package's documents in this order. Each library role is filled by the recipient with the same role name. A linked document keeps the fields placed on it in the library, and PUT /api/v1/packages/:packageId/fields can't change them.
1 - 50 elementsThe id of a library document, from GET /api/v1/library/documents. A document that has been trashed is a 404.
1Was this page helpful?

