API Reference
Analytics & files API
Run reports, export saved analytics, and attach files to CRM records.
Analytics endpoints
POST
/api/v1/reports/run Bearer JWT + orgExecute a report definition and return tabular or chart-ready results.
Request
POST /api/v1/reports/run
Authorization: Bearer <jwt>
X-Organization-ID: <organization-id>
Content-Type: application/json
{
"objectType": "Opportunity",
"columns": ["name", "stage", "amount", "closeDate"],
"filters": [{ "field": "stage", "operator": "not_equals", "value": "Closed Lost" }]
}Response
{
"rows": [
{
"name": "Northstar renewal",
"stage": "Proposal",
"amount": 42000
}
],
"totalRows": 1
}GET
/api/v1/reports/{id}/export Bearer JWT + orgExport a saved report for offline analysis.
Request
GET /api/v1/reports/report_123/export
Authorization: Bearer <jwt>
X-Organization-ID: <organization-id>Response
name,stage,amount
Northstar renewal,Proposal,42000Files endpoints
POST
/api/v1/attachments Bearer JWT + orgUpload a file and attach it to a record such as an account, case, opportunity, or task.
Request
POST /api/v1/attachments
Authorization: Bearer <jwt>
X-Organization-ID: <organization-id>
Content-Type: multipart/form-data
file=@proposal.pdf
recordType=Opportunity
recordId=opp_123Response
{
"attachment": {
"id": "att_123",
"fileName": "proposal.pdf",
"recordType": "Opportunity",
"recordId": "opp_123"
}
}