> For the complete documentation index, see [llms.txt](https://help.recart.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.recart.com/developers/public-api/optin-tool/statistics-view-of-all-opt-in-tools-of-the-site.md).

# Statistics view of all opt-in tools of the site

The account-level opt-in tool statistics view — every opt-in tool of the site in a single response, the collection counterpart of `/optin-tools/{id}/views/{name}`. `name` picks the view. When the date range is omitted it defaults to the last 7 days.

`optin-tools-summary` returns one entry per opt-in tool that recorded any metric event or collected any SMS subscription in the range: the tool's `optinToolName` and `optinToolType`, then its raw metric-event unique-session counts merged with its new SMS subscription count. Event keys are sparse — a missing key means 0; `smsSubscriptions` is always present, 0 when none. Because every entry names and types its own tool, a per-type total can be computed from this response alone, without a separate `/optin-tools` call. Values are counts, not amounts: this view carries no USD figures; for attributed revenue use the per-tool revenue views. Subscriptions from non-tool sources (imports, customer chat, …) are not part of this view.

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"tags":[{"name":"OptinTool","description":"Opt-in tools"}],"servers":[{"url":"https://api.recart.com/app-integrations/2023-12","description":"Production"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-Recart-API-Key","description":"It can be obtained in Recart account after contacting Support"}},"schemas":{"OptinToolListViews":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["optin-tool-list-views"]},"attributes":{"type":"object","description":"The requested view's data under its name — exactly one key per\nrequest.\n","minProperties":1,"properties":{"optin-tools-summary":{"type":"array","description":"One entry per opt-in tool that recorded any metric event or\ncollected any SMS subscription in the range.\n","items":{"$ref":"#/components/schemas/OptinToolsSummaryItem"}}}}}},"OptinToolsSummaryItem":{"type":"object","description":"One opt-in tool's totals for the range — the tool's identity, then its\nraw metric-event unique-session counts merged with the new SMS\nsubscriptions it collected. Besides optinToolId, optinToolName,\noptinToolType and smsSubscriptions, every key is a MetricEvent value\n(see the MetricEvent schema) with its count; only events that occurred\nappear, a missing key means 0.\n","required":["optinToolId","optinToolName","optinToolType","smsSubscriptions"],"properties":{"optinToolId":{"type":"string"},"optinToolName":{"type":"string","description":"Name of the opt-in tool"},"optinToolType":{"type":"string","description":"Type of the opt-in tool","enum":["popup","landing-page","embedded-form","keyword"]},"smsSubscriptions":{"type":"integer","description":"New SMS subscriptions collected by the tool in the range"}},"additionalProperties":{"type":"integer","description":"MetricEvent → number of unique sessions the event occurred in"}},"HttpErrorBody":{"type":"object","required":["errors"],"properties":{"errors":{"type":"array","items":{"type":"object","required":["id","code","title","detail"],"properties":{"id":{"type":"string"},"code":{"type":"string"},"title":{"type":"string"},"detail":{"type":"string"}}}}}}},"responses":{"HttpError":{"description":"HTTP Error response","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/HttpErrorBody"}}}}}},"paths":{"/optin-tools/views/{name}":{"get":{"summary":"Statistics view of all opt-in tools of the site","tags":["OptinTool"],"operationId":"getOptinToolListView","description":"The account-level opt-in tool statistics view — every opt-in tool of\nthe site in a single response, the collection counterpart of\n`/optin-tools/{id}/views/{name}`. `name` picks the view. When the\ndate range is omitted it defaults to the last 7 days.\n\n`optin-tools-summary` returns one entry per opt-in tool that\nrecorded any metric event or collected any SMS subscription in the\nrange: the tool's `optinToolName` and `optinToolType`, then its raw\nmetric-event unique-session counts merged with its new SMS\nsubscription count. Event keys are sparse — a missing key means 0;\n`smsSubscriptions` is always present, 0 when none. Because every\nentry names and types its own tool, a per-type total can be computed\nfrom this response alone, without a separate `/optin-tools` call.\nValues are counts, not amounts: this view carries no USD figures; for\nattributed revenue use the per-tool revenue views. Subscriptions from\nnon-tool sources (imports, customer chat, …) are not part of this\nview.\n","parameters":[{"name":"name","in":"path","required":true,"description":"The view to return","schema":{"type":"string","enum":["optin-tools-summary"]}},{"name":"dateFrom","in":"query","description":"First day of the range, inclusive (YYYY-MM-DD, UTC).\nDefaults to 7 days before `dateTo`. Must not be older than\n18 months — the API does not serve older data, and an older\n`dateFrom` returns 400.\n","schema":{"type":"string","format":"date"}},{"name":"dateTo","in":"query","description":"Last day of the range, inclusive — `dateTo=2026-08-24` includes\nthe whole of 2026-08-24 (UTC). Defaults to today.\n","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Ok","content":{"application/vnd.api+json":{"schema":{"type":"object","properties":{"data":{"description":"Always one resource of type optin-tool-list-views.\nattributes holds the requested view under its name,\nkeyed by source (opt-in tool ID or slug) inside.\n","$ref":"#/components/schemas/OptinToolListViews"}}}}}},"4XX":{"$ref":"#/components/responses/HttpError"},"5XX":{"$ref":"#/components/responses/HttpError"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.recart.com/developers/public-api/optin-tool/statistics-view-of-all-opt-in-tools-of-the-site.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
