Bundles

A Bundle is the API/SDK term for the feature called Share Links in the web interface. The API provides the full set of actions related to Share Links, including sending them via E-Mail.

Please note that we very closely monitor the E-Mailing feature and any abuse will result in disabling of your site.

Resource Schema

Required

PropertyDescription
paths
List
A list of paths in this bundle. For performance reasons, this is not provided when listing bundles.

Optional

PropertyDescription
code
String
Bundle code. This code forms the end part of the Public URL.
description
String
Public description
expires_at
String
Bundle expiration date/time
permissions
String
Permissions that apply to Folders in this Share Link.
Possible values: read, write, read_write, full, none, preview_only
require_registration
Bool
Show a registration page that captures the downloader's name and email address?
require_share_recipient
Bool
Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
skip_name
Bool
BundleRegistrations can be saved without providing name?
skip_email
Bool
BundleRegistrations can be saved without providing email?
start_access_on_date
String
Date when share will start to be accessible. If nil access granted right after create.
skip_company
Bool
BundleRegistrations can be saved without providing company?
bypasses_site_expiration_rules
Bool
If true, this Share Link bypasses site-wide expiration rules. Only site admins may set this.
dont_separate_submissions_by_folder
Bool
Do not create subfolders for files uploaded to this share. Note: there are subtle security pitfalls with allowing anonymous uploads from multiple users to live in the same folder. We strongly discourage use of this option unless absolutely required.
max_uses
Int64
Maximum number of times bundle can be accessed
internal_name
String
Internal name for identifying this Share Link.
note
String
Bundle internal note
path_template
String
Template for creating submission subfolders. Can use the uploader's name, email address, ip, company, strftime directives, and any custom form data.
path_template_time_zone
String
Timezone to use when rendering timestamps in path templates.
send_email_receipt_to_uploader
Bool
Send delivery receipt to the uploader. Note: For writable share only
snapshot_id
Int64
ID of the snapshot containing this bundle's contents.
user_id
Int64
Bundle creator user ID
group_id
Int64
Owning group ID. If set, members of this group can view, edit, and share this Share Link.
clickwrap_id
Int64
ID of the clickwrap to use with this bundle.
inbox_id
Int64
ID of the associated inbox, if available.
send_one_time_password_to_recipient_at_registration
Bool
If true, require_share_recipient bundles will send a one-time password to the recipient when they register. Cannot be enabled if the bundle has a password set.
workspace_id
Int64
Workspace ID. 0 means the default workspace.
password
String
Password for this bundle.
form_field_set_id
Int64
Id of Form Field Set to use with this bundle
create_snapshot
Bool
If true, create a snapshot of this bundle's contents.
finalize_snapshot
Bool
If true, finalize the snapshot of this bundle's contents. Note that create_snapshot must also be true.

Read Only

PropertyDescription
color_left
String
Page link and button color
color_link
String
Top bar link color
color_text
String
Page link and button color
color_top
String
Top bar background color
color_top_text
String
Top bar text color
url
String
Public URL of Share Link
password_protected
Bool
Is this bundle password protected?
preview_only
Bool
require_logout
Bool
If true, we will hide the 'Remember Me' box on the Bundle registration page, requiring that the user logout and log back in every time they visit the page.
clickwrap_body
String
Legal text that must be agreed to prior to accessing Bundle.
form_field_set
String
Custom Form to use
id
Int64
Bundle ID
created_at
String
Bundle created at date/time
deleted
Bool
Indicates if the bundle has been deleted.
deleted_at
String
Bundle deleted at date/time
username
String
Bundle creator username
watermark_attachment
String
Preview watermark image applied to all bundle items.
watermark_value
Dynamic
Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
has_inbox
Bool
Does this bundle have an associated inbox?
dont_allow_folders_in_uploads
Bool
Should folder uploads be prevented?
requested_upload_slots
Dynamic
Upload slots requested by the associated Inbox. Each slot contains a name used as its label and destination subfolder name.
bundlepaths
Dynamic
A list of bundlepaths in this bundle. For performance reasons, this is not provided when listing bundles.

Example Resource

resource "files_bundle" "example_bundle" {
  user_id                                             = 1
  paths                                               = ["file.txt"]
  password                                            = "Password"
  bypasses_site_expiration_rules                      = true
  form_field_set_id                                   = 1
  create_snapshot                                     = false
  dont_separate_submissions_by_folder                 = true
  expires_at                                          = "2000-01-01T01:00:00Z"
  finalize_snapshot                                   = false
  max_uses                                            = 1
  group_id                                            = 1
  internal_name                                       = "Quarterly reports"
  description                                         = "The public description of the bundle."
  note                                                = "The internal note on the bundle."
  code                                                = "abc123"
  path_template                                       = "{{name}}_{{ip}}"
  path_template_time_zone                             = "Eastern Time (US & Canada)"
  permissions                                         = "read"
  require_registration                                = false
  clickwrap_id                                        = 1
  inbox_id                                            = 1
  require_share_recipient                             = false
  send_one_time_password_to_recipient_at_registration = true
  send_email_receipt_to_uploader                      = true
  skip_email                                          = true
  skip_name                                           = true
  skip_company                                        = true
  start_access_on_date                                = "2000-01-01T01:00:00Z"
  snapshot_id                                         = 1
  workspace_id                                        = 1
}

Resource Import

This Resource supports importing using the following syntax:

Example Import Command

# Bundles can be imported by specifying the id.
terraform import files_bundle.example_bundle 1

Data Source Schema

Required

PropertyDescription
id
Int64
Bundle ID

Read Only

PropertyDescription
code
String
Bundle code. This code forms the end part of the Public URL.
color_left
String
Page link and button color
color_link
String
Top bar link color
color_text
String
Page link and button color
color_top
String
Top bar background color
color_top_text
String
Top bar text color
url
String
Public URL of Share Link
description
String
Public description
expires_at
String
Bundle expiration date/time
password_protected
Bool
Is this bundle password protected?
permissions
String
Permissions that apply to Folders in this Share Link.
Possible values: read, write, read_write, full, none, preview_only
preview_only
Bool
require_registration
Bool
Show a registration page that captures the downloader's name and email address?
require_share_recipient
Bool
Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
require_logout
Bool
If true, we will hide the 'Remember Me' box on the Bundle registration page, requiring that the user logout and log back in every time they visit the page.
clickwrap_body
String
Legal text that must be agreed to prior to accessing Bundle.
form_field_set
String
Custom Form to use
skip_name
Bool
BundleRegistrations can be saved without providing name?
skip_email
Bool
BundleRegistrations can be saved without providing email?
start_access_on_date
String
Date when share will start to be accessible. If nil access granted right after create.
skip_company
Bool
BundleRegistrations can be saved without providing company?
bypasses_site_expiration_rules
Bool
If true, this Share Link bypasses site-wide expiration rules. Only site admins may set this.
created_at
String
Bundle created at date/time
deleted
Bool
Indicates if the bundle has been deleted.
deleted_at
String
Bundle deleted at date/time
dont_separate_submissions_by_folder
Bool
Do not create subfolders for files uploaded to this share. Note: there are subtle security pitfalls with allowing anonymous uploads from multiple users to live in the same folder. We strongly discourage use of this option unless absolutely required.
max_uses
Int64
Maximum number of times bundle can be accessed
internal_name
String
Internal name for identifying this Share Link.
note
String
Bundle internal note
path_template
String
Template for creating submission subfolders. Can use the uploader's name, email address, ip, company, strftime directives, and any custom form data.
path_template_time_zone
String
Timezone to use when rendering timestamps in path templates.
send_email_receipt_to_uploader
Bool
Send delivery receipt to the uploader. Note: For writable share only
snapshot_id
Int64
ID of the snapshot containing this bundle's contents.
user_id
Int64
Bundle creator user ID
username
String
Bundle creator username
group_id
Int64
Owning group ID. If set, members of this group can view, edit, and share this Share Link.
clickwrap_id
Int64
ID of the clickwrap to use with this bundle.
inbox_id
Int64
ID of the associated inbox, if available.
watermark_attachment
String
Preview watermark image applied to all bundle items.
watermark_value
Dynamic
Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
send_one_time_password_to_recipient_at_registration
Bool
If true, require_share_recipient bundles will send a one-time password to the recipient when they register. Cannot be enabled if the bundle has a password set.
workspace_id
Int64
Workspace ID. 0 means the default workspace.
has_inbox
Bool
Does this bundle have an associated inbox?
dont_allow_folders_in_uploads
Bool
Should folder uploads be prevented?
requested_upload_slots
Dynamic
Upload slots requested by the associated Inbox. Each slot contains a name used as its label and destination subfolder name.
paths
List
A list of paths in this bundle. For performance reasons, this is not provided when listing bundles.
bundlepaths
Dynamic
A list of bundlepaths in this bundle. For performance reasons, this is not provided when listing bundles.

Example Data Source

data "files_bundle" "example_bundle" {
  id = 1
}