RidgeCRM Developer Docs

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 + org

Execute 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 + org

Export 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,42000

Files endpoints

POST /api/v1/attachments Bearer JWT + org

Upload 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_123

Response

{
  "attachment": {
    "id": "att_123",
    "fileName": "proposal.pdf",
    "recordType": "Opportunity",
    "recordId": "opp_123"
  }
}