API reference
Files
Upload a file once, then use its id when you send a document for signature or attach it to a message.
Upload a file
POST
/filesSend the file as multipart/form-data in a part named file.
Body
filefilerequiredThe file to store.
Request
curl -X POST "https://api.spartivo.com/api/v1/files" \
-H "Authorization: Bearer wk_your_key" \
-F "file=@contract.pdf"Response
{
"id": "dacced18-8a22-4702-819f-abf6390f57ff",
"name": "contract.pdf",
"mimeType": "application/pdf",
"size": 48213,
"sha256": "c3a909f6d61c30bdc7e37975713c3a112e8d3a6efe2715b088e03af3c621f656"
}Upload a PDF from a link
POST
/files/from-urlFetches a PDF from a public https address and stores it.
Body
urlstringrequiredLink to a PDF.
Request
curl -X POST "https://api.spartivo.com/api/v1/files/from-url" \
-H "Authorization: Bearer wk_your_key" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/contract.pdf"}'Response
{
"id": "16c08271-6666-451a-8276-ec291126be6f",
"name": "contract.pdf",
"mimeType": "application/pdf",
"size": 48213,
"sha256": "9f2c…"
}Download a file
GET
/files/{id}Returns the file's bytes with its content type.
Path parameters
iduuidrequiredThe file id.
Request
curl "https://api.spartivo.com/api/v1/files/dacced18-8a22-4702-819f-abf6390f57ff" \
-H "Authorization: Bearer wk_your_key"Response
(binary file content)