API Reference
The reference below covers every endpoint in the Reports API. Code examples are generated automatically; the live playground is disabled to prevent accidental writes to production from the docs site.
/api/v1/reportsAuthorization
BearerAuth Pass an API key issued from the agentlyleads workspace settings.
Example: Authorization: Bearer alk_live_xxxxxxxxxxxx
In: header
Query Parameters
"this-month"Value in
- "this-month"
- "last-month"
- "quarter"
- "custom"
With range=custom (implied when from/to are sent). YYYY-MM-DD.
dateInclusive. At most 366 days after from.
dateNarrow every section to one user of this workspace.
Comma-separated subset of forecast, outreach, activity, winLoss. Default all.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/reports"{ "report": { "range": { "preset": "string", "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z" }, "ownerId": "string", "forecast": { "stageProbability": { "property1": 0, "property2": 0 }, "months": [ { "month": "2026-09", "byStage": { "property1": { "count": 0, "value": 0, "weighted": 0 }, "property2": { "count": 0, "value": 0, "weighted": 0 } }, "totalValue": 0, "totalWeighted": 0 } ], "noCloseDate": { "count": 0, "value": 0 }, "totalValue": 0, "totalWeighted": 0 }, "outreach": { "campaigns": [ { "campaignId": "string", "name": "string", "status": "string", "sent": 0, "delivered": 0, "replies": 0, "positiveReplies": 0, "unsubscribes": 0, "replyRate": 0, "positiveReplyRate": 0, "unsubscribeRate": 0 } ], "repliesByWeek": [ 0 ] }, "activity": [ { "userId": "string", "name": "string", "emailsSent": 0, "repliesReceived": 0, "callsAndNotes": 0, "tasksCompleted": 0, "dealsMovedStage": 0, "total": 0 } ], "winLoss": { "rows": [ { "source": "string", "wonCount": 0, "wonValue": 0, "lostCount": 0, "lostValue": 0, "avgDaysToClose": 0 } ], "totals": { "wonCount": 0, "wonValue": 0, "lostCount": 0, "lostValue": 0, "winRate": 0 } } }}{ "error": "products must not be empty."}{ "error": "Invalid or missing API key."}{ "error": "API key missing required scope: write:workflows."}/api/v1/saved-viewsAuthorization
BearerAuth Pass an API key issued from the agentlyleads workspace settings.
Example: Authorization: Bearer alk_live_xxxxxxxxxxxx
In: header
Query Parameters
Value in
- "CONTACT"
- "LEAD"
- "DEAL"
- "COMPANY"
- "EMAIL"
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/saved-views"{ "savedViews": [ { "id": "string", "entity": "CONTACT", "name": "string", "config": {}, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ]}{ "error": "products must not be empty."}{ "error": "Invalid or missing API key."}{ "error": "API key missing required scope: write:workflows."}