API Reference
Upload Evidence API
Upload evidence files programmatically to Sprinto monitors using the Upload Evidence API with multipart requests.
The Upload Evidence API allows you to programmatically upload evidence files to Sprinto monitors (controls and workflow checks) using a REST endpoint.
Use this API to automate evidence collection from CI/CD pipelines, internal tools, or third-party systems.
How it works
The API accepts a multipart/form-data request with:
monitor_pkto identify the target monitor- One or more files as evidence
Sprinto validates the request, uploads the files, and attaches them to the specified monitor.
Endpoint
| Property | Value |
|---|---|
| URL | https://app.sprinto.com/api/v1/uploadEvidence |
| Method | POST |
| Content-Type | multipart/form-data |
| Authentication | API Token (header) |
Authentication
Generate API tokens from Settings > Developer API.
Header
api-token: <your-api-token>Guidelines
- Keep tokens secure
- Use HTTPS only
- Ensure Admin-level permissions
Request
Headers
| Header | Required | Description |
|---|---|---|
| api-token | Yes | API token |
| Content-Type | Yes | multipart/form-data |
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| monitor_pk | string | Yes | The unique identifier (PK) of the monitor (control or workflow check) to which you want to upload evidence. |
| files | file | Yes | The evidence file(s) to upload. You can upload up to 10 files in a single request by repeating this field. |
Note
- To upload multiple files, include the
filesfield multiple times in the same request. Each occurrence should contain one file. - The
check_pkparameter is deprecated. Usemonitor_pk.
Examples
curl --request POST 'https://app.sprinto.com/api/v1/uploadEvidence' \
--header 'api-token: your-api-token' \
--form 'files=@/path/to/file.pdf;type=application/pdf' \
--form 'files=@file1.pdf' \
--form 'files=@file2.pdf' \
--form 'monitor_pk=your-monitor-pk'
--form 'monitor_pk=your-monitor-pk'Response
Success (201 Created)
{
"success": true,
"error": ""
}Response fields
| Field | Type | Description |
|---|---|---|
| success | boolean | Indicates if the request succeeded |
| error | string / object | Error message (empty if successful) |
Error handling
400 Bad Request
- Invalid file type
- Invalid parameters
- Monitor not found
{
"success": false,
"error": "Monitor with pk <monitor_pk> not found."
}401 Unauthorized
{
"success": false,
"error": {
"message": "api-token not found"
}
}Causes
- Missing or invalid token
- Insufficient permissions
429 Too Many Requests
Returned when rate limits are exceeded. Implement retry with backoff.
Supported file types
| Category | Extensions |
|---|---|
| Images | .jpg, .jpeg, .png, .gif, .tiff, .bmp, .svg |
| Documents | .pdf, .doc, .docx, .odt |
| Spreadsheets | .xls, .xlsx, .ods |
| Archives | .zip, .tar |
| Videos | .mp4, .mov, .wmv |
| Data | .json, .csv, .txt |
| .msg |
Limits
- Maximum file size: 10 MB per file
- Maximum files per request: 10
Finding the monitor PK
From dashboard
Navigate to the monitor and locate the PK in the URL or details section.
Using GraphQL
query {
monitors {
nodes {
pk
name
monitorType
}
}
}Workflow check restrictions
- Must be active
- Must not have a reviewer assigned
Troubleshooting
| Issue | Cause | Resolution |
|---|---|---|
| 401 Unauthorized | Invalid token | Verify API token |
| File type not allowed | Unsupported format | Use supported file types |
| Monitor not found | Invalid monitor_pk | Validate monitor PK |
| File too large | Exceeds 10 MB | Reduce file size |
| Evidence not visible | Processing delay | Refresh after a few seconds |
Need help?
If you have questions or run into issues while using the Upload Evidence API, contact Sprinto support.