For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomepageProduct HelpLog inTry for Free
Developers HomeAPI ReferenceMCP
Developers HomeAPI ReferenceMCP
  • Getting Started
    • Introduction
    • Authentication with API Keys
    • Authentication with OAuth
    • API Clients
    • Pagination
    • Specifying Fields
    • Filter Parameters
    • HTTP Response Codes
    • Rate Limits
    • Timezone Offsets
    • Rich Text Fields
    • Changelog
  • CRM Core
    • Leads
    • Contacts
    • Opportunities
    • Tasks
    • Files
    • Custom Objects
    • Comments
  • Activities
    • Activities
    • Notes
    • Calls
    • Emails
    • Email Threads
    • WhatsApp Messages
    • Meetings
    • Custom Activities
    • Creations
    • Form Submissions
    • Lead Status Changes
    • Opportunity Status Changes
    • Lead Merges
    • Task Completions
  • Events & Webhooks
    • Webhooks
    • Events
  • Search & Reporting
    • Advanced Filtering
    • Smart Views
    • Reporting
      • POSTGet an activity report
      • GETList the predefined metrics used in activity reports
      • GETGet custom report (Explorer)
      • POSTGet a funnel report (stages)
      • POSTGet a funnel report (totals)
      • GETGet sent emails report
      • GETGet lead status change report
      • GETGet opportunity status change report
  • Automation & Bulk Actions
    • Sequences (Workflows)
    • Bulk Actions
    • Exports
    • AI Field Enrichment
  • CRM Configuration
    • Custom Fields
    • Custom Activity Types
    • Custom Object Types
    • Pipelines
    • Opportunity Statuses
    • Lead Statuses
    • Integration Links
    • Forms
  • Communication Configuration
    • Email Templates
    • SMS Templates
    • Outcomes
    • Playbooks
    • Scheduling Links Guide
    • Scheduling Links
    • Connected Accounts
    • Send As
    • Unsubscribed Emails
    • Phone Numbers
    • Blocked Phone Numbers
    • Dialers
  • Users & Organizations
    • Users
    • Organizations
    • Memberships
    • Roles
    • Groups
Close

Product

OverviewCommunicationAutomationIntegrationsReportingSMSCallingSecurityForms

Pricing & Use Cases

PricingClose vs Other CRMsCustomer Stories

Resources

Sales BlogSales ResourcesSales GuidesWebinarsOn-Demand DemoSales Tools

Company

AboutCareersPartner with CloseBrand GuidelinesTermsPrivacyGDPRCCPA

Get Help

+1-833-GO-CLOSEHelp CenterDownload the Close AppProduct UpdatesSystem Status
LogoLogo
HomepageProduct HelpLog inTry for Free
Search & ReportingReporting

Get an activity report

||View as Markdown|
POST
https://api.close.com/api/v1/report/activity/
POST
/api/v1/report/activity/
$curl -X POST https://api.close.com/api/v1/report/activity/ \
> -H "Content-Type: application/json" \
> -u "<CLOSE_API_KEY>:" \
> -d '{
> "datetime_range": {
> "end": "2019-01-08T00:00:00Z",
> "start": "2019-01-01T00:00:00Z"
> },
> "metrics": [
> "calls.outbound.all.count",
> "emails.sent.all.count"
> ],
> "query": {
> "saved_search_id": "save_ZVc26G33JTNiDNEFdZhBQAONg9cJHleAAHqBJakf239",
> "type": "saved_search"
> },
> "type": "overview",
> "users": [
> "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
> "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk"
> ]
>}'
1{
2 "aggregations": {
3 "totals": {
4 "calls.outbound.all.count": 0,
5 "emails.sent.all.count": 0
6 }
7 },
8 "data": [
9 {
10 "calls.outbound.all.count": 0,
11 "datetime": "2019-01-01T00:00:00+00:00",
12 "emails.sent.all.count": 0
13 },
14 {
15 "calls.outbound.all.count": 0,
16 "datetime": "2019-01-02T00:00:00+00:00",
17 "emails.sent.all.count": 0
18 },
19 {
20 "calls.outbound.all.count": 0,
21 "datetime": "2019-01-03T00:00:00+00:00",
22 "emails.sent.all.count": 0
23 },
24 {
25 "calls.outbound.all.count": 0,
26 "datetime": "2019-01-04T00:00:00+00:00",
27 "emails.sent.all.count": 0
28 },
29 {
30 "calls.outbound.all.count": 0,
31 "datetime": "2019-01-05T00:00:00+00:00",
32 "emails.sent.all.count": 0
33 },
34 {
35 "calls.outbound.all.count": 0,
36 "datetime": "2019-01-06T00:00:00+00:00",
37 "emails.sent.all.count": 0
38 },
39 {
40 "calls.outbound.all.count": 0,
41 "datetime": "2019-01-07T00:00:00+00:00",
42 "emails.sent.all.count": 0
43 }
44 ],
45 "queries": {
46 "leads": {
47 "calls.outbound.all.count": [
48 "call(direction: \"outbound\" and outgoing_call_date >= \"2019-01-01T00:00:00.000+0000\" and outgoing_call_date < \"2019-01-08T00:00:00.000+0000\" and user in (\"user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA\", \"user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk\")) and in:\"save_ZVc26G33JTNiDNEFdZhBQAONg9cJHleAAHqBJakf239\""
49 ],
50 "emails.sent.all.count": [
51 "email(direction: \"outgoing\" and sent >= \"2019-01-01T00:00:00.000+0000\" and sent < \"2019-01-08T00:00:00.000+0000\" and status: \"sent\" and user in (\"user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA\", \"user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk\")) and in:\"save_ZVc26G33JTNiDNEFdZhBQAONg9cJHleAAHqBJakf239\""
52 ]
53 }
54 }
55}
The activity report returns the organization's metrics per time period (**overview** report) or user (**comparison** report). Every report accepts the following parameters: * `datetime_range`: a time range to fetch data for. Either this field or `relative_range` needs to be specified. * `relative_range`: a relative time range to fetch data for. The allowed values are: `today`, `this-week`, `this-month`, `this-quarter`, `this-year`, `yesterday`, `last-week`, `last-month`, `last-quarter`, `last-year`, and `all-time`. Either this field or `datetime_range` needs to be specified. * `query`: a query to apply to the report to filter out data. The value of the field is a dictionary with the key `type` and any type-specific keys. For now only the type `saved_search` is allowed which takes the extra key `saved_search_id` to specify the ID of a saved search. This parameter is *optional*. * `users`: a list of user IDs to limit the report results to. This parameter is *optional*. * `type`: the type of the report. The available values are `overview` and `comparison`. This parameter is *mandatory*. * `metrics`: a list of metrics (see [List Activity Metrics](/api/resources/reporting/list-activity-metrics)) to fetch for the report. This parameter is *mandatory*. The report can be requested either in a JSON format or in a CSV file. The format can be specified with the `accept` header.
Was this page helpful?
Previous

Reporting

Next

List the predefined metrics used in activity reports

Built with

The activity report returns the organization’s metrics per time period (overview report) or user (comparison report).

Every report accepts the following parameters:

  • datetime_range: a time range to fetch data for. Either this field or relative_range needs to be specified.
  • relative_range: a relative time range to fetch data for. The allowed values are: today, this-week, this-month, this-quarter, this-year, yesterday, last-week, last-month, last-quarter, last-year, and all-time. Either this field or datetime_range needs to be specified.
  • query: a query to apply to the report to filter out data. The value of the field is a dictionary with the key type and any type-specific keys. For now only the type saved_search is allowed which takes the extra key saved_search_id to specify the ID of a saved search. This parameter is optional.
  • users: a list of user IDs to limit the report results to. This parameter is optional.
  • type: the type of the report. The available values are overview and comparison. This parameter is mandatory.
  • metrics: a list of metrics (see List Activity Metrics) to fetch for the report. This parameter is mandatory.

The report can be requested either in a JSON format or in a CSV file. The format can be specified with the accept header.

Authentication

AuthorizationBasic
Use your API key as the username and leave the password empty.
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects any.

Response

Successful response

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error