SpartivoDocs
Open app
Get started
OverviewQuickstartAuthenticationRequests and errors
API reference
RecordsModules and fieldsFilesMessagingDocuments and e-signatureFunctionsWebhooks
Spartivo Script
IntroductionLanguage guideCRM and actionsBuilt-in functionsExamples
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/files

Send the file as multipart/form-data in a part named file.

Body
filefilerequired
The 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-url

Fetches a PDF from a public https address and stores it.

Body
urlstringrequired
Link 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
iduuidrequired
The 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)
Previous← Modules and fieldsNextMessaging →
On this page
POSTUpload a filePOSTUpload a PDF from a linkGETDownload a file