Welcome to Your Digital Filing Cabinet
Welcome to the `/files` endpoint, your go-to resource for uploading PDFs, PNGs, and JPEGs for agreements and themes.
The Heart of File Management
The /files
endpoint is your central hub for organizing and handling documents. Whether it’s a PDF for an agreement or a vibrant image of your logo, here’s how this endpoint simplifies your workflow:
Upload to Your Personal File Repository
Before you can add a file to an agreement or theme, it needs to be uploaded to your archive. This step is key because:
- Centralized Management: It stores all your files in one place, making management and retrieval straightforward.
- File Reference: Once a file is in your repository, you receive a unique file ID. You'll use this ID to reference the file in subsequent requests when creating/updating agreements or themes.
Smart Organization with Lookup Keys
Keeping track of numerous files? Lookup keys are here to save the day:
- Quick Searches: Attach a lookup key to each file for effortless identification later.
- Order and Clarity: Ideal for maintaining a well-organized file repository, especially when juggling multiple documents.
Supported File Types:
- PDFs: Required for agreements, either as the main document to be signed, or an attachment.
- PNGs & JPEGs: For logos and icons in themes.
Mind the Size: 15 MB Maximum
Keep an eye on file sizes! There's a 15 MB cap on uploads to ensure smooth operations and optimal performance.
File Immutability: Set in Digital Stone
Once uploaded, files enter a state of immutability, ensuring their content remains unchanged and secure. You will still be able to delete the file though, although it is preserved wherever it is used.
Files are Immutable
- Permanent Once Uploaded: Files, once uploaded, cannot be altered or modified. This guarantees that the content of the file remains constant and secure.
- Immutability Benefits: This approach safeguards the integrity of your files. Immutability ensures that any usage of the file in agreements or themes maintains the original content, preserving accuracy and consistency.
Cloning on Usage
- Automatic Cloning: Used a file in an agreement or theme? We create a clone, keeping the original untouched in your archive.
- Safe Deletions: Deleting a file from your archive doesn't affect its clones, ensuring seamless functionality in your agreements or themes.
Handling Multipart/Form-Data Uploads
Uploading to the /files
endpoint requires binary data in a multipart/form-data format, common in HTTP file transfers, but can be a bit tricky when doing server-to-server communication. Multipart/form-data is adept at transmitting files along with standard data in HTTP requests. It's widely used in client-server interactions and can be adapted for server-to-server scenarios.
Smooth Server-to-Server Transfers
When uploading from server to server, consider the following:
- Proper Headers: Set
Content-Type
tomultipart/form-data
. - Boundary Management: Typically handled by HTTP libraries, but crucial if you're crafting requests manually.
- Binary Data: Ensure the file is correctly read and transmitted in its binary form.
Pro Tips for Successful File Transfers
- Leverage Libraries: Use established libraries like
axios
ornode-fetch
for handling multipart data. - Test Before Deployment: Conduct thorough tests in a controlled environment to refine the upload process.
- Monitor File Specifications: Adhere to the file format and size requirements to avoid common pitfalls.
With these guidelines, you're all set to use the /files
endpoint effectively. If you encounter challenges, our support team is here to assist you.