{
  "openapi": "3.0.0",
  "info": {
    "title": "Reporting Metrics API",
    "version": "2.1.0",
    "description": "# Introduction\n\nPull your Tenjin Data Exporter metrics through the API: user acquisition, ad revenue and SKAN reports, and\nthe saved reports that store their settings. The\n[Metric Definitions](https://api-docs.tenjin.com/metric_definitions) page lists the metrics you can report on.\n\n## Access to the API\n\nThe API is served from `https://api.tenjin.com`, and every path starts with the API version, for example `https://api.tenjin.com/v2/reports/spend`.\n\n## Rate limiting\n\nEach access token can make up to 100 report requests (paths under\n`/v2/reports`) per minute. A request over the limit gets status 429, and its `X-Retry-After` header gives\nthe length of the limit period in seconds.\n"
  },
  "servers": [
    {
      "url": "https://api.tenjin.com"
    }
  ],
  "tags": [
    {
      "name": "Reporting Metrics"
    },
    {
      "name": "Saved Reports"
    }
  ],
  "paths": {
    "/v2/reports/skan_ad_network": {
      "get": {
        "operationId": "get_reports_skan_ad_network",
        "summary": "Pull an SKAdNetwork report from AdNetwork postbacks",
        "description": "Columns of a row by group_by, besides `date` (absent with `granularity=totals-daily`) and the requested metrics. A group_by of several values always includes `app`, and has the columns of each value.\n\n| group_by | Columns |\n| --- | --- |\n| `app` | `app_id`, `app_name`, `platform`, `bundle_id`, `store_id` |\n| `channel` | `ad_network_id`, `ad_network_name`, `ad_network_short_id` |\n| `campaign` | `campaign_id`, `campaign_name`, the `app` columns, `ad_network_id`, `ad_network_name` |\n| `conversion_value` | `conversion_value` |\n| `fidelity_type` | `fidelity_type` |\n| `sk_ad_network` | `sk_ad_network_id` |\n| `sk_campaign` | `sk_campaign_id` |\n| `sk_source_app` | `sk_source_app_id` |\n",
        "deprecated": false,
        "tags": [
          "Reporting Metrics"
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "description": "First day to include, YYYY-MM-DD. Defaults to 30 days before today",
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2026-09-01"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "description": "Last day to include, YYYY-MM-DD. Defaults to today",
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2026-09-30"
            }
          },
          {
            "name": "app_ids",
            "in": "query",
            "required": false,
            "description": "Ids of the apps to report on, comma-separated; all accessible apps when blank",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "example": [
                "5ca0d40e-a595-430d-bb99-e188ee10d291"
              ]
            }
          },
          {
            "name": "channel_ids",
            "in": "query",
            "required": false,
            "description": "Ids of the channels to report on, comma-separated; all channels when blank",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "example": [
                3
              ]
            }
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "description": "Period of each row. With `totals-daily`, one row covers the whole date range",
            "schema": {
              "type": "string",
              "enum": [
                "daily",
                "totals-daily"
              ],
              "default": "daily"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "description": "Dimensions to group the rows by, comma-separated: one dimension, or several that include `app`; `sk_campaign` only together with `sk_ad_network`",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "app",
                  "channel",
                  "conversion_value",
                  "fidelity_type",
                  "sk_ad_network",
                  "sk_campaign",
                  "sk_source_app",
                  "campaign"
                ]
              },
              "default": [
                "app"
              ],
              "example": [
                "app",
                "conversion_value"
              ]
            }
          },
          {
            "name": "metrics",
            "in": "query",
            "required": false,
            "description": "Metrics to report, comma-separated; see the [Metric Definitions](https://api-docs.tenjin.com/metric_definitions#sk_ad_network)",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "conversion_value_count",
                  "conversion_value_total",
                  "conversion_value_avg",
                  "redownload_count",
                  "redownload_cv_total",
                  "redownload_cv_avg",
                  "first_download_count",
                  "first_download_cv_total",
                  "first_download_cv_avg",
                  "assists",
                  "redownload_assists",
                  "first_download_assists"
                ]
              },
              "default": [
                "conversion_value_count",
                "conversion_value_avg"
              ],
              "example": [
                "conversion_value_count",
                "conversion_value_avg"
              ]
            }
          },
          {
            "name": "metric_filters",
            "in": "query",
            "required": false,
            "description": "Keep only rows where every filter holds. A filter is metric:op:value; op is gt, gte, lt, lte or eq",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "omit_blank_rows",
            "in": "query",
            "required": false,
            "description": "Drop rows where every requested metric is zero or null",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results to fetch.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 0,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The report",
            "headers": {
              "Link": {
                "schema": {
                  "type": "string"
                },
                "description": "URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page"
              },
              "Total": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items on all pages"
              },
              "Per-Page": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items per page"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkanReportDocument"
                },
                "examples": {
                  "Group by app": {
                    "value": {
                      "data": [
                        {
                          "id": "2026-08-29.d5e94942-6dc2-4e03-8a94-4d6a13ada0f1",
                          "type": "sk_ad_network_report",
                          "attributes": {
                            "date": "2026-08-29",
                            "app_id": "d5e94942-6dc2-4e03-8a94-4d6a13ada0f1",
                            "conversion_value_count": 8,
                            "conversion_value_avg": 13.75,
                            "app_name": "Alpha",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios"
                          }
                        },
                        {
                          "id": "2026-08-29.1edc1a8e-8466-4e16-9927-5ee89d12f71d",
                          "type": "sk_ad_network_report",
                          "attributes": {
                            "date": "2026-08-29",
                            "app_id": "1edc1a8e-8466-4e16-9927-5ee89d12f71d",
                            "conversion_value_count": 2,
                            "conversion_value_avg": null,
                            "app_name": "Bravo",
                            "bundle_id": "com.example.bravo",
                            "store_id": "com.example.bravo",
                            "platform": "android"
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/reports/skan_ad_network?start_date=2026-08-29&end_date=2026-08-31&group_by=app&granularity=daily"
                      },
                      "meta": {
                        "count": 6,
                        "per_page": 100,
                        "start_date": "2026-08-29",
                        "end_date": "2026-08-31",
                        "granularity": "daily",
                        "metrics": [
                          "conversion_value_count",
                          "conversion_value_avg"
                        ],
                        "organization_id": "bba76c3d-1bea-4a4c-9bcc-d7f373981911",
                        "app_ids": [],
                        "ad_network_ids": [],
                        "group_by": "app_id"
                      }
                    }
                  },
                  "Group by app,conversion_value": {
                    "value": {
                      "data": [
                        {
                          "id": "2026-08-29.2195dd46-3658-44f9-8dce-15bfb1a65ffc.10",
                          "type": "sk_ad_network_report",
                          "attributes": {
                            "date": "2026-08-29",
                            "app_id": "2195dd46-3658-44f9-8dce-15bfb1a65ffc",
                            "conversion_value": 10,
                            "conversion_value_count": 5,
                            "conversion_value_total": 50,
                            "conversion_value_avg": 10,
                            "redownload_count": 1,
                            "redownload_cv_total": 10,
                            "redownload_cv_avg": 10,
                            "first_download_count": 4,
                            "first_download_cv_total": 40,
                            "first_download_cv_avg": 10,
                            "assists": 2,
                            "redownload_assists": 0,
                            "first_download_assists": 2,
                            "app_name": "Alpha",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios"
                          }
                        },
                        {
                          "id": "2026-08-29.2195dd46-3658-44f9-8dce-15bfb1a65ffc.20",
                          "type": "sk_ad_network_report",
                          "attributes": {
                            "date": "2026-08-29",
                            "app_id": "2195dd46-3658-44f9-8dce-15bfb1a65ffc",
                            "conversion_value": 20,
                            "conversion_value_count": 3,
                            "conversion_value_total": 60,
                            "conversion_value_avg": 20,
                            "redownload_count": 0,
                            "redownload_cv_total": 0,
                            "redownload_cv_avg": null,
                            "first_download_count": 3,
                            "first_download_cv_total": 60,
                            "first_download_cv_avg": 20,
                            "assists": 1,
                            "redownload_assists": 1,
                            "first_download_assists": 0,
                            "app_name": "Alpha",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios"
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/reports/skan_ad_network?start_date=2026-08-29&end_date=2026-08-31&group_by=app%2Cconversion_value&metrics=conversion_value_count%2Cconversion_value_total%2Cconversion_value_avg%2Credownload_count%2Credownload_cv_total%2Credownload_cv_avg%2Cfirst_download_count%2Cfirst_download_cv_total%2Cfirst_download_cv_avg%2Cassists%2Credownload_assists%2Cfirst_download_assists&per_page=5",
                        "last": "https://api.tenjin.com/v2/reports/skan_ad_network?end_date=2026-08-31&group_by=app%2Cconversion_value&metrics=conversion_value_count%2Cconversion_value_total%2Cconversion_value_avg%2Credownload_count%2Credownload_cv_total%2Credownload_cv_avg%2Cfirst_download_count%2Cfirst_download_cv_total%2Cfirst_download_cv_avg%2Cassists%2Credownload_assists%2Cfirst_download_assists&page=2&per_page=5&start_date=2026-08-29",
                        "next": "https://api.tenjin.com/v2/reports/skan_ad_network?end_date=2026-08-31&group_by=app%2Cconversion_value&metrics=conversion_value_count%2Cconversion_value_total%2Cconversion_value_avg%2Credownload_count%2Credownload_cv_total%2Credownload_cv_avg%2Cfirst_download_count%2Cfirst_download_cv_total%2Cfirst_download_cv_avg%2Cassists%2Credownload_assists%2Cfirst_download_assists&page=2&per_page=5&start_date=2026-08-29"
                      },
                      "meta": {
                        "count": 10,
                        "per_page": 5,
                        "start_date": "2026-08-29",
                        "end_date": "2026-08-31",
                        "granularity": "daily",
                        "metrics": [
                          "conversion_value_count",
                          "conversion_value_total",
                          "conversion_value_avg",
                          "redownload_count",
                          "redownload_cv_total",
                          "redownload_cv_avg",
                          "first_download_count",
                          "first_download_cv_total",
                          "first_download_cv_avg",
                          "assists",
                          "redownload_assists",
                          "first_download_assists"
                        ],
                        "organization_id": "1304a5f4-7fbb-4ff9-ba03-e6d9649f9630",
                        "app_ids": [],
                        "ad_network_ids": [],
                        "group_by": [
                          "app_id",
                          "conversion_value"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 100 report requests in a minute with one access token",
            "headers": {
              "X-Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Length of the rate limit period, in seconds"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/reports/sk_ad_network": {
      "get": {
        "operationId": "get_reports_sk_ad_network",
        "summary": "Pull an SKAdNetwork report from AdNetwork postbacks",
        "description": "Columns of a row by group_by, besides `date` (absent with `granularity=totals-daily`) and the requested metrics. A group_by of several values always includes `app`, and has the columns of each value.\n\n| group_by | Columns |\n| --- | --- |\n| `app` | `app_id`, `app_name`, `platform`, `bundle_id`, `store_id` |\n| `channel` | `ad_network_id`, `ad_network_name`, `ad_network_short_id` |\n| `campaign` | `campaign_id`, `campaign_name`, the `app` columns, `ad_network_id`, `ad_network_name` |\n| `conversion_value` | `conversion_value` |\n| `fidelity_type` | `fidelity_type` |\n| `sk_ad_network` | `sk_ad_network_id` |\n| `sk_campaign` | `sk_campaign_id` |\n| `sk_source_app` | `sk_source_app_id` |\n",
        "deprecated": false,
        "tags": [
          "Reporting Metrics"
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "description": "First day to include, YYYY-MM-DD. Defaults to 30 days before today",
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2026-09-01"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "description": "Last day to include, YYYY-MM-DD. Defaults to today",
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2026-09-30"
            }
          },
          {
            "name": "app_ids",
            "in": "query",
            "required": false,
            "description": "Ids of the apps to report on, comma-separated; all accessible apps when blank",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "example": [
                "5ca0d40e-a595-430d-bb99-e188ee10d291"
              ]
            }
          },
          {
            "name": "channel_ids",
            "in": "query",
            "required": false,
            "description": "Ids of the channels to report on, comma-separated; all channels when blank",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "example": [
                3
              ]
            }
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "description": "Period of each row. With `totals-daily`, one row covers the whole date range",
            "schema": {
              "type": "string",
              "enum": [
                "daily",
                "totals-daily"
              ],
              "default": "daily"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "description": "Dimensions to group the rows by, comma-separated: one dimension, or several that include `app`; `sk_campaign` only together with `sk_ad_network`",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "app",
                  "channel",
                  "conversion_value",
                  "fidelity_type",
                  "sk_ad_network",
                  "sk_campaign",
                  "sk_source_app",
                  "campaign"
                ]
              },
              "default": [
                "app"
              ],
              "example": [
                "app",
                "conversion_value"
              ]
            }
          },
          {
            "name": "metrics",
            "in": "query",
            "required": false,
            "description": "Metrics to report, comma-separated; see the [Metric Definitions](https://api-docs.tenjin.com/metric_definitions#sk_ad_network)",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "conversion_value_count",
                  "conversion_value_total",
                  "conversion_value_avg",
                  "redownload_count",
                  "redownload_cv_total",
                  "redownload_cv_avg",
                  "first_download_count",
                  "first_download_cv_total",
                  "first_download_cv_avg",
                  "assists",
                  "redownload_assists",
                  "first_download_assists"
                ]
              },
              "default": [
                "conversion_value_count",
                "conversion_value_avg"
              ],
              "example": [
                "conversion_value_count",
                "conversion_value_avg"
              ]
            }
          },
          {
            "name": "metric_filters",
            "in": "query",
            "required": false,
            "description": "Keep only rows where every filter holds. A filter is metric:op:value; op is gt, gte, lt, lte or eq",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "omit_blank_rows",
            "in": "query",
            "required": false,
            "description": "Drop rows where every requested metric is zero or null",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results to fetch.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 0,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The report",
            "headers": {
              "Link": {
                "schema": {
                  "type": "string"
                },
                "description": "URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page"
              },
              "Total": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items on all pages"
              },
              "Per-Page": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items per page"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkanReportDocument"
                },
                "examples": {
                  "Group by app": {
                    "value": {
                      "data": [
                        {
                          "id": "2026-08-29.d5e94942-6dc2-4e03-8a94-4d6a13ada0f1",
                          "type": "sk_ad_network_report",
                          "attributes": {
                            "date": "2026-08-29",
                            "app_id": "d5e94942-6dc2-4e03-8a94-4d6a13ada0f1",
                            "conversion_value_count": 8,
                            "conversion_value_avg": 13.75,
                            "app_name": "Alpha",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios"
                          }
                        },
                        {
                          "id": "2026-08-29.1edc1a8e-8466-4e16-9927-5ee89d12f71d",
                          "type": "sk_ad_network_report",
                          "attributes": {
                            "date": "2026-08-29",
                            "app_id": "1edc1a8e-8466-4e16-9927-5ee89d12f71d",
                            "conversion_value_count": 2,
                            "conversion_value_avg": null,
                            "app_name": "Bravo",
                            "bundle_id": "com.example.bravo",
                            "store_id": "com.example.bravo",
                            "platform": "android"
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/reports/sk_ad_network?start_date=2026-08-29&end_date=2026-08-31&group_by=app&granularity=daily"
                      },
                      "meta": {
                        "count": 6,
                        "per_page": 100,
                        "start_date": "2026-08-29",
                        "end_date": "2026-08-31",
                        "granularity": "daily",
                        "metrics": [
                          "conversion_value_count",
                          "conversion_value_avg"
                        ],
                        "organization_id": "bba76c3d-1bea-4a4c-9bcc-d7f373981911",
                        "app_ids": [],
                        "ad_network_ids": [],
                        "group_by": "app_id"
                      }
                    }
                  },
                  "Group by app,conversion_value": {
                    "value": {
                      "data": [
                        {
                          "id": "2026-08-29.2195dd46-3658-44f9-8dce-15bfb1a65ffc.10",
                          "type": "sk_ad_network_report",
                          "attributes": {
                            "date": "2026-08-29",
                            "app_id": "2195dd46-3658-44f9-8dce-15bfb1a65ffc",
                            "conversion_value": 10,
                            "conversion_value_count": 5,
                            "conversion_value_total": 50,
                            "conversion_value_avg": 10,
                            "redownload_count": 1,
                            "redownload_cv_total": 10,
                            "redownload_cv_avg": 10,
                            "first_download_count": 4,
                            "first_download_cv_total": 40,
                            "first_download_cv_avg": 10,
                            "assists": 2,
                            "redownload_assists": 0,
                            "first_download_assists": 2,
                            "app_name": "Alpha",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios"
                          }
                        },
                        {
                          "id": "2026-08-29.2195dd46-3658-44f9-8dce-15bfb1a65ffc.20",
                          "type": "sk_ad_network_report",
                          "attributes": {
                            "date": "2026-08-29",
                            "app_id": "2195dd46-3658-44f9-8dce-15bfb1a65ffc",
                            "conversion_value": 20,
                            "conversion_value_count": 3,
                            "conversion_value_total": 60,
                            "conversion_value_avg": 20,
                            "redownload_count": 0,
                            "redownload_cv_total": 0,
                            "redownload_cv_avg": null,
                            "first_download_count": 3,
                            "first_download_cv_total": 60,
                            "first_download_cv_avg": 20,
                            "assists": 1,
                            "redownload_assists": 1,
                            "first_download_assists": 0,
                            "app_name": "Alpha",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios"
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/reports/sk_ad_network?start_date=2026-08-29&end_date=2026-08-31&group_by=app%2Cconversion_value&metrics=conversion_value_count%2Cconversion_value_total%2Cconversion_value_avg%2Credownload_count%2Credownload_cv_total%2Credownload_cv_avg%2Cfirst_download_count%2Cfirst_download_cv_total%2Cfirst_download_cv_avg%2Cassists%2Credownload_assists%2Cfirst_download_assists&per_page=5",
                        "last": "https://api.tenjin.com/v2/reports/sk_ad_network?end_date=2026-08-31&group_by=app%2Cconversion_value&metrics=conversion_value_count%2Cconversion_value_total%2Cconversion_value_avg%2Credownload_count%2Credownload_cv_total%2Credownload_cv_avg%2Cfirst_download_count%2Cfirst_download_cv_total%2Cfirst_download_cv_avg%2Cassists%2Credownload_assists%2Cfirst_download_assists&page=2&per_page=5&start_date=2026-08-29",
                        "next": "https://api.tenjin.com/v2/reports/sk_ad_network?end_date=2026-08-31&group_by=app%2Cconversion_value&metrics=conversion_value_count%2Cconversion_value_total%2Cconversion_value_avg%2Credownload_count%2Credownload_cv_total%2Credownload_cv_avg%2Cfirst_download_count%2Cfirst_download_cv_total%2Cfirst_download_cv_avg%2Cassists%2Credownload_assists%2Cfirst_download_assists&page=2&per_page=5&start_date=2026-08-29"
                      },
                      "meta": {
                        "count": 10,
                        "per_page": 5,
                        "start_date": "2026-08-29",
                        "end_date": "2026-08-31",
                        "granularity": "daily",
                        "metrics": [
                          "conversion_value_count",
                          "conversion_value_total",
                          "conversion_value_avg",
                          "redownload_count",
                          "redownload_cv_total",
                          "redownload_cv_avg",
                          "first_download_count",
                          "first_download_cv_total",
                          "first_download_cv_avg",
                          "assists",
                          "redownload_assists",
                          "first_download_assists"
                        ],
                        "organization_id": "1304a5f4-7fbb-4ff9-ba03-e6d9649f9630",
                        "app_ids": [],
                        "ad_network_ids": [],
                        "group_by": [
                          "app_id",
                          "conversion_value"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 100 report requests in a minute with one access token",
            "headers": {
              "X-Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Length of the rate limit period, in seconds"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/reports/skan_apple": {
      "get": {
        "operationId": "get_reports_skan_apple",
        "summary": "Pull an SKAdNetwork report from Apple postbacks",
        "description": "Columns of a row by group_by, besides `date` (absent with `granularity=totals-daily`) and the requested metrics. A group_by of several values always includes `app`, and has the columns of each value.\n\n| group_by | Columns |\n| --- | --- |\n| `app` | `app_id`, `app_name`, `platform`, `bundle_id`, `store_id` |\n| `channel` | `ad_network_id`, `ad_network_name`, `ad_network_short_id` |\n| `campaign` | `campaign_id`, `campaign_name`, the `app` columns, `ad_network_id`, `ad_network_name` |\n| `conversion_value` | `conversion_value` |\n| `fidelity_type` | `fidelity_type` |\n| `sk_ad_network` | `sk_ad_network_id` |\n| `sk_campaign` | `sk_campaign_id` |\n| `sk_source_app` | `sk_source_app_id` |\n",
        "deprecated": false,
        "tags": [
          "Reporting Metrics"
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "description": "First day to include, YYYY-MM-DD. Defaults to 30 days before today",
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2026-09-01"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "description": "Last day to include, YYYY-MM-DD. Defaults to today",
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2026-09-30"
            }
          },
          {
            "name": "app_ids",
            "in": "query",
            "required": false,
            "description": "Ids of the apps to report on, comma-separated; all accessible apps when blank",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "example": [
                "5ca0d40e-a595-430d-bb99-e188ee10d291"
              ]
            }
          },
          {
            "name": "channel_ids",
            "in": "query",
            "required": false,
            "description": "Ids of the channels to report on, comma-separated; all channels when blank",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "example": [
                3
              ]
            }
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "description": "Period of each row. With `totals-daily`, one row covers the whole date range",
            "schema": {
              "type": "string",
              "enum": [
                "daily",
                "totals-daily"
              ],
              "default": "daily"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "description": "Dimensions to group the rows by, comma-separated: one dimension, or several that include `app`; `sk_campaign` only together with `sk_ad_network`",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "app",
                  "channel",
                  "conversion_value",
                  "fidelity_type",
                  "sk_ad_network",
                  "sk_campaign",
                  "sk_source_app",
                  "campaign"
                ]
              },
              "default": [
                "app"
              ],
              "example": [
                "app",
                "conversion_value"
              ]
            }
          },
          {
            "name": "metrics",
            "in": "query",
            "required": false,
            "description": "Metrics to report, comma-separated; see the [Metric Definitions](https://api-docs.tenjin.com/metric_definitions#sk_ad_network)",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "conversion_value_count",
                  "conversion_value_total",
                  "conversion_value_avg",
                  "redownload_count",
                  "redownload_cv_total",
                  "redownload_cv_avg",
                  "first_download_count",
                  "first_download_cv_total",
                  "first_download_cv_avg",
                  "assists",
                  "redownload_assists",
                  "first_download_assists"
                ]
              },
              "default": [
                "conversion_value_count",
                "conversion_value_avg"
              ],
              "example": [
                "conversion_value_count",
                "conversion_value_avg"
              ]
            }
          },
          {
            "name": "metric_filters",
            "in": "query",
            "required": false,
            "description": "Keep only rows where every filter holds. A filter is metric:op:value; op is gt, gte, lt, lte or eq",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "omit_blank_rows",
            "in": "query",
            "required": false,
            "description": "Drop rows where every requested metric is zero or null",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results to fetch.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 0,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The report",
            "headers": {
              "Link": {
                "schema": {
                  "type": "string"
                },
                "description": "URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page"
              },
              "Total": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items on all pages"
              },
              "Per-Page": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items per page"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkanReportDocument"
                },
                "examples": {
                  "Group by app": {
                    "value": {
                      "data": [
                        {
                          "id": "2026-08-29.d5e94942-6dc2-4e03-8a94-4d6a13ada0f1",
                          "type": "sk_ad_network_report",
                          "attributes": {
                            "date": "2026-08-29",
                            "app_id": "d5e94942-6dc2-4e03-8a94-4d6a13ada0f1",
                            "conversion_value_count": 8,
                            "conversion_value_avg": 13.75,
                            "app_name": "Alpha",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios"
                          }
                        },
                        {
                          "id": "2026-08-29.1edc1a8e-8466-4e16-9927-5ee89d12f71d",
                          "type": "sk_ad_network_report",
                          "attributes": {
                            "date": "2026-08-29",
                            "app_id": "1edc1a8e-8466-4e16-9927-5ee89d12f71d",
                            "conversion_value_count": 2,
                            "conversion_value_avg": null,
                            "app_name": "Bravo",
                            "bundle_id": "com.example.bravo",
                            "store_id": "com.example.bravo",
                            "platform": "android"
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/reports/skan_apple?start_date=2026-08-29&end_date=2026-08-31&group_by=app&granularity=daily"
                      },
                      "meta": {
                        "count": 6,
                        "per_page": 100,
                        "start_date": "2026-08-29",
                        "end_date": "2026-08-31",
                        "granularity": "daily",
                        "metrics": [
                          "conversion_value_count",
                          "conversion_value_avg"
                        ],
                        "organization_id": "bba76c3d-1bea-4a4c-9bcc-d7f373981911",
                        "app_ids": [],
                        "ad_network_ids": [],
                        "group_by": "app_id"
                      }
                    }
                  },
                  "Group by app,conversion_value": {
                    "value": {
                      "data": [
                        {
                          "id": "2026-08-29.2195dd46-3658-44f9-8dce-15bfb1a65ffc.10",
                          "type": "sk_ad_network_report",
                          "attributes": {
                            "date": "2026-08-29",
                            "app_id": "2195dd46-3658-44f9-8dce-15bfb1a65ffc",
                            "conversion_value": 10,
                            "conversion_value_count": 5,
                            "conversion_value_total": 50,
                            "conversion_value_avg": 10,
                            "redownload_count": 1,
                            "redownload_cv_total": 10,
                            "redownload_cv_avg": 10,
                            "first_download_count": 4,
                            "first_download_cv_total": 40,
                            "first_download_cv_avg": 10,
                            "assists": 2,
                            "redownload_assists": 0,
                            "first_download_assists": 2,
                            "app_name": "Alpha",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios"
                          }
                        },
                        {
                          "id": "2026-08-29.2195dd46-3658-44f9-8dce-15bfb1a65ffc.20",
                          "type": "sk_ad_network_report",
                          "attributes": {
                            "date": "2026-08-29",
                            "app_id": "2195dd46-3658-44f9-8dce-15bfb1a65ffc",
                            "conversion_value": 20,
                            "conversion_value_count": 3,
                            "conversion_value_total": 60,
                            "conversion_value_avg": 20,
                            "redownload_count": 0,
                            "redownload_cv_total": 0,
                            "redownload_cv_avg": null,
                            "first_download_count": 3,
                            "first_download_cv_total": 60,
                            "first_download_cv_avg": 20,
                            "assists": 1,
                            "redownload_assists": 1,
                            "first_download_assists": 0,
                            "app_name": "Alpha",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios"
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/reports/skan_apple?start_date=2026-08-29&end_date=2026-08-31&group_by=app%2Cconversion_value&metrics=conversion_value_count%2Cconversion_value_total%2Cconversion_value_avg%2Credownload_count%2Credownload_cv_total%2Credownload_cv_avg%2Cfirst_download_count%2Cfirst_download_cv_total%2Cfirst_download_cv_avg%2Cassists%2Credownload_assists%2Cfirst_download_assists&per_page=5",
                        "last": "https://api.tenjin.com/v2/reports/skan_apple?end_date=2026-08-31&group_by=app%2Cconversion_value&metrics=conversion_value_count%2Cconversion_value_total%2Cconversion_value_avg%2Credownload_count%2Credownload_cv_total%2Credownload_cv_avg%2Cfirst_download_count%2Cfirst_download_cv_total%2Cfirst_download_cv_avg%2Cassists%2Credownload_assists%2Cfirst_download_assists&page=2&per_page=5&start_date=2026-08-29",
                        "next": "https://api.tenjin.com/v2/reports/skan_apple?end_date=2026-08-31&group_by=app%2Cconversion_value&metrics=conversion_value_count%2Cconversion_value_total%2Cconversion_value_avg%2Credownload_count%2Credownload_cv_total%2Credownload_cv_avg%2Cfirst_download_count%2Cfirst_download_cv_total%2Cfirst_download_cv_avg%2Cassists%2Credownload_assists%2Cfirst_download_assists&page=2&per_page=5&start_date=2026-08-29"
                      },
                      "meta": {
                        "count": 10,
                        "per_page": 5,
                        "start_date": "2026-08-29",
                        "end_date": "2026-08-31",
                        "granularity": "daily",
                        "metrics": [
                          "conversion_value_count",
                          "conversion_value_total",
                          "conversion_value_avg",
                          "redownload_count",
                          "redownload_cv_total",
                          "redownload_cv_avg",
                          "first_download_count",
                          "first_download_cv_total",
                          "first_download_cv_avg",
                          "assists",
                          "redownload_assists",
                          "first_download_assists"
                        ],
                        "organization_id": "1304a5f4-7fbb-4ff9-ba03-e6d9649f9630",
                        "app_ids": [],
                        "ad_network_ids": [],
                        "group_by": [
                          "app_id",
                          "conversion_value"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 100 report requests in a minute with one access token",
            "headers": {
              "X-Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Length of the rate limit period, in seconds"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/reports/spend": {
      "get": {
        "operationId": "get_reports_spend",
        "summary": "Pull a spend report",
        "description": "Columns of a row by group_by, besides `date` (absent with `granularity=totals-daily`) and the requested metrics:\n\n| group_by | Columns |\n| --- | --- |\n| `app` | `app_id`, `name`, `icon_url`, `platform`, `bundle_id`, `store_id` |\n| `channel` | `ad_network_id`, `name`, `icon_url`, `short_id`, `custom` |\n| `campaign` | `campaign_id`, `name`, `icon_url`, the app columns (`app_id`, `app_name`, `app_icon_url`, `platform`, `bundle_id`, `store_id`) and the channel columns (`ad_network_id`, `ad_network_name`, `ad_network_icon_url`) |\n| `creative` | `creative_id`, `name`, `remote_creative_id`, the app columns and the channel columns |\n| `country` | `country`, `name` |\n| `site` | `site_id`, `name` |\n| `channel,app` | `ad_network_id`, `app_id`, the app columns and the channel columns |\n| `channel,app,country` | the `channel,app` columns and `country` |\n| `campaign,country` | the `campaign` columns and `country` |\n| any other combination | `name`: the ids joined with `-`, and the id column of each value with its columns: for `app`, the app columns; for `channel`, `ad_network_name`, `ad_network_icon_url`, `ad_network_short_id`, `ad_network_custom`; for `campaign`, `campaign_name`, `campaign_icon_url`, the app columns and the channel columns; for `creative`, `creative_name`, `remote_creative_id`, the app columns and the channel columns |\n\nA group_by with `campaign` or `creative` leaves out `channel` and `app`, which they determine: `channel,campaign` returns the `campaign` columns.\n",
        "deprecated": false,
        "tags": [
          "Reporting Metrics"
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "description": "First day to include, YYYY-MM-DD. Defaults to 30 days before today",
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2026-09-01"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "description": "Last day to include, YYYY-MM-DD. Defaults to today",
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2026-09-30"
            }
          },
          {
            "name": "app_ids",
            "in": "query",
            "required": false,
            "description": "Ids of the apps to report on, comma-separated; all accessible apps when blank",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "example": [
                "5ca0d40e-a595-430d-bb99-e188ee10d291"
              ]
            }
          },
          {
            "name": "channel_ids",
            "in": "query",
            "required": false,
            "description": "Ids of the channels to report on, comma-separated; all channels when blank",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "example": [
                3
              ]
            }
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "description": "Period of each row. With `totals-daily`, one row covers the whole date range",
            "schema": {
              "type": "string",
              "enum": [
                "daily",
                "weekly",
                "monthly",
                "totals-daily"
              ],
              "default": "daily"
            }
          },
          {
            "name": "metrics",
            "in": "query",
            "required": false,
            "description": "Metrics to report, comma-separated: any of the [Metric Definitions](https://api-docs.tenjin.com/metric_definitions#spend) and the organization's `z_` custom metrics",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "default": [
                "spend",
                "impressions",
                "clicks",
                "installs",
                "cpi",
                "ctr",
                "cvr",
                "tcpi",
                "tracked_installs"
              ],
              "example": [
                "spend",
                "installs",
                "cpi"
              ]
            }
          },
          {
            "name": "metric_filters",
            "in": "query",
            "required": false,
            "description": "Keep only rows where every filter holds. A filter is metric:op:value; op is gt, gte, lt, lte or eq",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "omit_blank_rows",
            "in": "query",
            "required": false,
            "description": "Drop rows where every requested metric is zero or null",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "ad_network_ids",
            "in": "query",
            "required": false,
            "description": "Deprecated: use channel_ids. One ad network id, or several as `ad_network_ids[]`; ignored when channel_ids is sent",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "platforms",
            "in": "query",
            "required": false,
            "description": "Ignored; returned unchanged in meta.platforms",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaign_ids",
            "in": "query",
            "required": false,
            "description": "Ignored; returned unchanged in meta.campaign_ids",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cohort_strategy",
            "in": "query",
            "required": false,
            "description": "RELATIVE or ABSOLUTE, in any case; defaults to the user's cohort strategy setting",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "description": "Keep only these countries: two-letter country codes such as `US`, and `UN` for an unknown country",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "example": [
                "US",
                "JP"
              ]
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "description": "Dimensions to group the rows by, comma-separated; any combination of them",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "channel",
                  "app",
                  "country",
                  "campaign",
                  "site",
                  "creative"
                ]
              },
              "default": [
                "app"
              ],
              "example": [
                "channel",
                "app"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results to fetch.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 0,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The report",
            "headers": {
              "Link": {
                "schema": {
                  "type": "string"
                },
                "description": "URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page"
              },
              "Total": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items on all pages"
              },
              "Per-Page": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items per page"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpendReportDocument"
                },
                "examples": {
                  "Group by app": {
                    "value": {
                      "data": [
                        {
                          "id": "2026-08-25,cdeefd60-238c-4818-a948-44f3351f0b47",
                          "type": "report",
                          "attributes": {
                            "date": "2026-08-25",
                            "app_id": "cdeefd60-238c-4818-a948-44f3351f0b47",
                            "spend": 843.36,
                            "installs": 2590,
                            "clicks": 8301,
                            "impressions": 423383,
                            "name": "Alpha",
                            "icon_url": "/default_app_icon.png",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios"
                          }
                        },
                        {
                          "id": "2026-08-25,6f08bd91-f376-4e19-b4b1-1b1c9f6f99dd",
                          "type": "report",
                          "attributes": {
                            "date": "2026-08-25",
                            "app_id": "6f08bd91-f376-4e19-b4b1-1b1c9f6f99dd",
                            "spend": 567.86,
                            "installs": 1327,
                            "clicks": 4157,
                            "impressions": 287763,
                            "name": "Bravo",
                            "icon_url": "/default_app_icon.png",
                            "bundle_id": "com.example.bravo",
                            "store_id": "com.example.bravo",
                            "platform": "android"
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/reports/spend?start_date=2026-08-25&end_date=2026-08-31&group_by=app&granularity=daily&metrics=spend%2Cinstalls%2Cclicks%2Cimpressions"
                      },
                      "meta": {
                        "count": 14,
                        "per_page": 100,
                        "start_date": "2026-08-25",
                        "end_date": "2026-08-31",
                        "granularity": "daily",
                        "metrics": [
                          "spend",
                          "installs",
                          "clicks",
                          "impressions"
                        ],
                        "organization_id": "48328cd8-8a31-42a0-baa6-6724783f90e9",
                        "app_ids": [],
                        "ad_network_ids": [],
                        "group_by": "app_id",
                        "countries": [],
                        "campaign_ids": [],
                        "platforms": []
                      }
                    }
                  },
                  "Group by channel": {
                    "value": {
                      "data": [
                        {
                          "id": "2026-08-25,900011",
                          "type": "report",
                          "attributes": {
                            "date": "2026-08-25",
                            "ad_network_id": 900011,
                            "spend": 1125.59,
                            "impressions": 566074,
                            "clicks": 8978,
                            "installs": 3007,
                            "cpi": 0.37432324575989356,
                            "ctr": 1.5860117228489559,
                            "cvr": 33.49298284695924,
                            "tcpi": 0.3581259942729876,
                            "tracked_installs": 3143,
                            "name": "Network One",
                            "icon_url": "",
                            "short_id": "network_one",
                            "custom": false
                          }
                        },
                        {
                          "id": "2026-08-25,900012",
                          "type": "report",
                          "attributes": {
                            "date": "2026-08-25",
                            "ad_network_id": 900012,
                            "spend": 285.63,
                            "impressions": 145072,
                            "clicks": 3480,
                            "installs": 910,
                            "cpi": 0.3138791208791209,
                            "ctr": 2.3988088673210544,
                            "cvr": 26.149425287356323,
                            "tcpi": 0.3661923076923077,
                            "tracked_installs": 780,
                            "name": "Network Two Account",
                            "icon_url": "",
                            "short_id": "network_two",
                            "custom": true
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/reports/spend?start_date=2026-08-25&end_date=2026-08-31&group_by=channel&granularity=daily"
                      },
                      "meta": {
                        "count": 14,
                        "per_page": 100,
                        "start_date": "2026-08-25",
                        "end_date": "2026-08-31",
                        "granularity": "daily",
                        "metrics": [
                          "spend",
                          "impressions",
                          "clicks",
                          "installs",
                          "cpi",
                          "ctr",
                          "cvr",
                          "tcpi",
                          "tracked_installs"
                        ],
                        "organization_id": "2e6bca27-ad83-4280-b807-82e800acdfcf",
                        "app_ids": [],
                        "ad_network_ids": [],
                        "group_by": "ad_network_id",
                        "countries": [],
                        "campaign_ids": [],
                        "platforms": []
                      }
                    }
                  },
                  "Group by campaign": {
                    "value": {
                      "data": [
                        {
                          "id": "2026-08-25,751bed7c-9433-4108-88f5-50cba7ad8ce6",
                          "type": "report",
                          "attributes": {
                            "date": "2026-08-25",
                            "campaign_id": "751bed7c-9433-4108-88f5-50cba7ad8ce6",
                            "spend": 376.59000000000003,
                            "impressions": 158201,
                            "clicks": 2687,
                            "installs": 875,
                            "cpi": 0.43038857142857145,
                            "ctr": 1.6984721967623466,
                            "cvr": 32.564197990323784,
                            "tcpi": 0.527436974789916,
                            "tracked_installs": 714,
                            "name": "Alpha N1 C1",
                            "icon_url": "",
                            "app_id": "c53de2ed-14cb-46f9-82ba-f4da3ea36520",
                            "app_name": "Alpha",
                            "app_icon_url": "/default_app_icon.png",
                            "ad_network_id": 900011,
                            "ad_network_name": "Network One",
                            "ad_network_icon_url": "",
                            "platform": "ios",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001"
                          }
                        },
                        {
                          "id": "2026-08-25,7ab8995e-0772-4171-8962-de739f98280f",
                          "type": "report",
                          "attributes": {
                            "date": "2026-08-25",
                            "campaign_id": "7ab8995e-0772-4171-8962-de739f98280f",
                            "spend": 181.14000000000001,
                            "impressions": 120110,
                            "clicks": 2134,
                            "installs": 805,
                            "cpi": 0.2250186335403727,
                            "ctr": 1.7767046873699108,
                            "cvr": 37.722586691658854,
                            "tcpi": 0.20490950226244345,
                            "tracked_installs": 884,
                            "name": "Alpha N1 C2",
                            "icon_url": "",
                            "app_id": "c53de2ed-14cb-46f9-82ba-f4da3ea36520",
                            "app_name": "Alpha",
                            "app_icon_url": "/default_app_icon.png",
                            "ad_network_id": 900011,
                            "ad_network_name": "Network One",
                            "ad_network_icon_url": "",
                            "platform": "ios",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001"
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/reports/spend?start_date=2026-08-25&end_date=2026-08-31&group_by=campaign&granularity=daily&per_page=20&page=1",
                        "last": "https://api.tenjin.com/v2/reports/spend?end_date=2026-08-31&granularity=daily&group_by=campaign&page=2&per_page=20&start_date=2026-08-25",
                        "next": "https://api.tenjin.com/v2/reports/spend?end_date=2026-08-31&granularity=daily&group_by=campaign&page=2&per_page=20&start_date=2026-08-25"
                      },
                      "meta": {
                        "count": 35,
                        "per_page": 20,
                        "start_date": "2026-08-25",
                        "end_date": "2026-08-31",
                        "granularity": "daily",
                        "metrics": [
                          "spend",
                          "impressions",
                          "clicks",
                          "installs",
                          "cpi",
                          "ctr",
                          "cvr",
                          "tcpi",
                          "tracked_installs"
                        ],
                        "organization_id": "ce301e87-e26a-4626-aa7e-c8f0501cd1af",
                        "app_ids": [],
                        "ad_network_ids": [],
                        "group_by": "campaign_id",
                        "countries": [],
                        "campaign_ids": [],
                        "platforms": []
                      }
                    }
                  },
                  "Group by channel,app,country, totals": {
                    "value": {
                      "data": [
                        {
                          "id": "900011,e31e4c10-667b-461a-8388-5a8ac6c77480,BR",
                          "type": "report",
                          "attributes": {
                            "ad_network_id": 900011,
                            "app_id": "e31e4c10-667b-461a-8388-5a8ac6c77480",
                            "country": "BR",
                            "spend": 764.77,
                            "impressions": 258890,
                            "clicks": 9554,
                            "installs": 2474,
                            "cpi": 0.30912287793047694,
                            "ctr": 3.6903704275947313,
                            "cvr": 25.894913125392506,
                            "tcpi": 0.4107250268528464,
                            "tracked_installs": 1862,
                            "app_name": "Alpha",
                            "app_icon_url": "/default_app_icon.png",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios",
                            "ad_network_name": "Network One",
                            "ad_network_icon_url": ""
                          }
                        },
                        {
                          "id": "900012,e31e4c10-667b-461a-8388-5a8ac6c77480,BR",
                          "type": "report",
                          "attributes": {
                            "ad_network_id": 900012,
                            "app_id": "e31e4c10-667b-461a-8388-5a8ac6c77480",
                            "country": "BR",
                            "spend": 296.46,
                            "impressions": 248003,
                            "clicks": 2631,
                            "installs": 986,
                            "cpi": 0.3006693711967545,
                            "ctr": 1.0608742636177788,
                            "cvr": 37.47624477385025,
                            "tcpi": 0.38854521625163824,
                            "tracked_installs": 763,
                            "app_name": "Alpha",
                            "app_icon_url": "/default_app_icon.png",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios",
                            "ad_network_name": "Network Two Account",
                            "ad_network_icon_url": ""
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/reports/spend?start_date=2026-08-25&end_date=2026-08-31&group_by=channel%2Capp%2Ccountry&granularity=totals-daily"
                      },
                      "meta": {
                        "count": 15,
                        "per_page": 100,
                        "start_date": "2026-08-25",
                        "end_date": "2026-08-31",
                        "granularity": "totals-daily",
                        "metrics": [
                          "spend",
                          "impressions",
                          "clicks",
                          "installs",
                          "cpi",
                          "ctr",
                          "cvr",
                          "tcpi",
                          "tracked_installs"
                        ],
                        "organization_id": "fcb1ab2e-9dbb-453f-b5d9-9bb02a014533",
                        "app_ids": [],
                        "ad_network_ids": [],
                        "group_by": "ad_network_app_country",
                        "countries": [],
                        "campaign_ids": [],
                        "platforms": []
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 100 report requests in a minute with one access token",
            "headers": {
              "X-Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Length of the rate limit period, in seconds"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/reports/ad_revenue": {
      "get": {
        "operationId": "get_reports_ad_revenue",
        "summary": "Pull an ad revenue report",
        "description": "Columns of a row by group_by, besides `date` (absent with `granularity=totals-daily`) and the requested metrics. A combination has the columns of each of its values.\n\n| group_by | Columns |\n| --- | --- |\n| `app` | `app_id`, `app_name`, `app_icon_url`, `platform`, `bundle_id`, `store_id` |\n| `channel` | `ad_network_id`, `ad_network_name`, `ad_network_icon_url`, `ad_network_short_id`, `ad_network_custom` |\n| `country` | `country_name` (the ISO country code) |\n| `ad_placement` | `ad_placement_id`, `ad_placement_name`, the `app` columns and the `channel` columns |\n",
        "deprecated": false,
        "tags": [
          "Reporting Metrics"
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "description": "First day to include, YYYY-MM-DD. Defaults to 30 days before today",
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2026-09-01"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "description": "Last day to include, YYYY-MM-DD. Defaults to today",
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2026-09-30"
            }
          },
          {
            "name": "app_ids",
            "in": "query",
            "required": false,
            "description": "Ids of the apps to report on, comma-separated; all accessible apps when blank",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "example": [
                "5ca0d40e-a595-430d-bb99-e188ee10d291"
              ]
            }
          },
          {
            "name": "channel_ids",
            "in": "query",
            "required": false,
            "description": "Ids of the channels to report on, comma-separated; all channels when blank",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "example": [
                3
              ]
            }
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "description": "Period of each row. With `totals-daily`, one row covers the whole date range",
            "schema": {
              "type": "string",
              "enum": [
                "daily",
                "weekly",
                "monthly",
                "totals-daily"
              ],
              "default": "daily"
            }
          },
          {
            "name": "metrics",
            "in": "query",
            "required": false,
            "description": "Metrics to report, comma-separated; see the [Metric Definitions](https://api-docs.tenjin.com/metric_definitions#ad_revenue)",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ad_revenue",
                  "clicks",
                  "impressions",
                  "ecpm",
                  "ecpc"
                ]
              },
              "default": [
                "ad_revenue",
                "impressions",
                "clicks",
                "ecpm",
                "ecpc"
              ],
              "example": [
                "ad_revenue",
                "ecpm"
              ]
            }
          },
          {
            "name": "metric_filters",
            "in": "query",
            "required": false,
            "description": "Keep only rows where every filter holds. A filter is metric:op:value; op is gt, gte, lt, lte or eq",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "omit_blank_rows",
            "in": "query",
            "required": false,
            "description": "Drop rows where every requested metric is zero or null",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "ad_network_ids",
            "in": "query",
            "required": false,
            "description": "Deprecated: use channel_ids. One ad network id, or several as `ad_network_ids[]`; ignored when channel_ids is sent",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "platforms",
            "in": "query",
            "required": false,
            "description": "Ignored; returned unchanged in meta.platforms",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "description": "Keep only these countries: two-letter country codes such as `US`, and `UN` for an unknown country",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "example": [
                "US",
                "JP"
              ]
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "description": "Dimensions to group the rows by, comma-separated; any combination of them",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "channel",
                  "app",
                  "country",
                  "ad_placement"
                ]
              },
              "default": [
                "app"
              ],
              "example": [
                "channel",
                "app",
                "country"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results to fetch.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 0,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The report",
            "headers": {
              "Link": {
                "schema": {
                  "type": "string"
                },
                "description": "URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page"
              },
              "Total": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items on all pages"
              },
              "Per-Page": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items per page"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdRevenueReportDocument"
                },
                "examples": {
                  "Group by channel,app,country, monthly": {
                    "value": {
                      "data": [
                        {
                          "id": "2026-08-01,900011,74775bac-ff20-41cd-b129-eb124ae3a338,BR",
                          "type": "report",
                          "attributes": {
                            "date": "2026-08-01",
                            "ad_network_id": 900011,
                            "app_id": "74775bac-ff20-41cd-b129-eb124ae3a338",
                            "country_name": "BR",
                            "ad_revenue": 153.26,
                            "impressions": 227142,
                            "clicks": 11808,
                            "ecpm": 0.6747321059073179,
                            "ecpc": 0.012979336043360433,
                            "app_name": "Alpha",
                            "app_icon_url": "/default_app_icon.png",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios",
                            "ad_network_name": "Network One",
                            "ad_network_icon_url": "",
                            "ad_network_short_id": "network_one",
                            "ad_network_custom": false
                          }
                        },
                        {
                          "id": "2026-08-01,900012,74775bac-ff20-41cd-b129-eb124ae3a338,BR",
                          "type": "report",
                          "attributes": {
                            "date": "2026-08-01",
                            "ad_network_id": 900012,
                            "app_id": "74775bac-ff20-41cd-b129-eb124ae3a338",
                            "country_name": "BR",
                            "ad_revenue": 212.25,
                            "impressions": 193037,
                            "clicks": 8249,
                            "ecpm": 1.0995301418898968,
                            "ecpc": 0.025730391562613652,
                            "app_name": "Alpha",
                            "app_icon_url": "/default_app_icon.png",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios",
                            "ad_network_name": "Network Two Account",
                            "ad_network_icon_url": "",
                            "ad_network_short_id": "network_two",
                            "ad_network_custom": true
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/reports/ad_revenue?start_date=2026-08-25&end_date=2026-08-31&group_by=channel%2Capp%2Ccountry&granularity=monthly"
                      },
                      "meta": {
                        "count": 15,
                        "per_page": 100,
                        "start_date": "2026-08-25",
                        "end_date": "2026-08-31",
                        "granularity": "monthly",
                        "metrics": [
                          "ad_revenue",
                          "impressions",
                          "clicks",
                          "ecpm",
                          "ecpc"
                        ],
                        "organization_id": "7fcc8f37-2d3f-4cf7-b109-af97836327a3",
                        "app_ids": [],
                        "ad_network_ids": [],
                        "group_by": [
                          "ad_network_id",
                          "app_id",
                          "country"
                        ],
                        "countries": [],
                        "platforms": []
                      }
                    }
                  },
                  "Group by ad_placement, totals": {
                    "value": {
                      "data": [
                        {
                          "id": "bd8380d9-c2fc-40ac-a8d2-322c35ef9494",
                          "type": "report",
                          "attributes": {
                            "ad_network_id": 900011,
                            "app_id": "b9313013-ef8d-4ca1-80e9-0c3966f9d624",
                            "ad_placement_id": "bd8380d9-c2fc-40ac-a8d2-322c35ef9494",
                            "ad_revenue": 875.27,
                            "ecpm": 0.8716891011723839,
                            "app_name": "Alpha",
                            "app_icon_url": "/default_app_icon.png",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios",
                            "ad_network_name": "Network One",
                            "ad_network_icon_url": "",
                            "ad_network_short_id": "network_one",
                            "ad_network_custom": false,
                            "ad_placement_name": "Placement Alpha One"
                          }
                        },
                        {
                          "id": "508b4810-88d3-4a90-8723-b38e7d2cee61",
                          "type": "report",
                          "attributes": {
                            "ad_network_id": 900012,
                            "app_id": "b9313013-ef8d-4ca1-80e9-0c3966f9d624",
                            "ad_placement_id": "508b4810-88d3-4a90-8723-b38e7d2cee61",
                            "ad_revenue": 914.09,
                            "ecpm": 0.9819949508513725,
                            "app_name": "Alpha",
                            "app_icon_url": "/default_app_icon.png",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios",
                            "ad_network_name": "Network Two Account",
                            "ad_network_icon_url": "",
                            "ad_network_short_id": "network_two",
                            "ad_network_custom": true,
                            "ad_placement_name": "Placement Alpha Two"
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/reports/ad_revenue?start_date=2026-08-25&end_date=2026-08-31&group_by=ad_placement&granularity=totals-daily&metrics=ad_revenue%2Cecpm"
                      },
                      "meta": {
                        "count": 3,
                        "per_page": 100,
                        "start_date": "2026-08-25",
                        "end_date": "2026-08-31",
                        "granularity": "totals-daily",
                        "metrics": [
                          "ad_revenue",
                          "ecpm"
                        ],
                        "organization_id": "75fe3cdd-3b96-4372-afe6-abaf376b7b44",
                        "app_ids": [],
                        "ad_network_ids": [],
                        "group_by": [
                          "ad_placement_id"
                        ],
                        "countries": [],
                        "platforms": []
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 100 report requests in a minute with one access token",
            "headers": {
              "X-Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Length of the rate limit period, in seconds"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/reports/{id}": {
      "get": {
        "operationId": "get_reports_id",
        "summary": "Pull data from a saved report",
        "deprecated": false,
        "tags": [
          "Reporting Metrics"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Id of the saved report",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results to fetch.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 0,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The report: a spend report or an ad revenue report, by the saved report type",
            "headers": {
              "Link": {
                "schema": {
                  "type": "string"
                },
                "description": "URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page"
              },
              "Total": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items on all pages"
              },
              "Per-Page": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items per page"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SpendReportDocument"
                    },
                    {
                      "$ref": "#/components/schemas/AdRevenueReportDocument"
                    }
                  ]
                },
                "examples": {
                  "A spend report": {
                    "value": {
                      "data": [
                        {
                          "id": "2026-08-29,900011,8448c238-d62f-4283-b08c-18b87eebb702,BR",
                          "type": "report",
                          "attributes": {
                            "date": "2026-08-29",
                            "ad_network_id": 900011,
                            "app_id": "8448c238-d62f-4283-b08c-18b87eebb702",
                            "country": "BR",
                            "spend": 128.9,
                            "installs": 66,
                            "app_name": "Alpha",
                            "app_icon_url": "/default_app_icon.png",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios",
                            "ad_network_name": "Network One",
                            "ad_network_icon_url": ""
                          }
                        },
                        {
                          "id": "2026-08-29,900012,8448c238-d62f-4283-b08c-18b87eebb702,BR",
                          "type": "report",
                          "attributes": {
                            "date": "2026-08-29",
                            "ad_network_id": 900012,
                            "app_id": "8448c238-d62f-4283-b08c-18b87eebb702",
                            "country": "BR",
                            "spend": 12.8,
                            "installs": 252,
                            "app_name": "Alpha",
                            "app_icon_url": "/default_app_icon.png",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios",
                            "ad_network_name": "Network Two Account",
                            "ad_network_icon_url": ""
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/reports/c0bd3ef9-8475-4754-b46f-7b2af56781b3?per_page=60&page=2",
                        "first": "https://api.tenjin.com/v2/reports/c0bd3ef9-8475-4754-b46f-7b2af56781b3?page=1&per_page=60",
                        "prev": "https://api.tenjin.com/v2/reports/c0bd3ef9-8475-4754-b46f-7b2af56781b3?page=1&per_page=60"
                      },
                      "meta": {
                        "count": 105,
                        "per_page": 60,
                        "start_date": "2026-08-25",
                        "end_date": "2026-09-01",
                        "granularity": "daily",
                        "metrics": [
                          "spend",
                          "installs"
                        ],
                        "organization_id": "2f221e03-4283-44be-ba37-f3598bb9a478",
                        "app_ids": [],
                        "ad_network_ids": [],
                        "group_by": "ad_network_app_country",
                        "countries": [],
                        "campaign_ids": [],
                        "platforms": []
                      }
                    }
                  },
                  "An ad revenue report": {
                    "value": {
                      "data": [
                        {
                          "id": "2026-08-24,4f0c68f8-5cdb-44bf-a8c9-e543cfdfb1dd",
                          "type": "report",
                          "attributes": {
                            "date": "2026-08-24",
                            "ad_network_id": 900011,
                            "app_id": "7224f3fd-afd9-4d39-964e-6ba9fe98e78f",
                            "ad_placement_id": "4f0c68f8-5cdb-44bf-a8c9-e543cfdfb1dd",
                            "ad_revenue": 731.27,
                            "impressions": 869141,
                            "app_name": "Alpha",
                            "app_icon_url": "/default_app_icon.png",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios",
                            "ad_network_name": "Network One",
                            "ad_network_icon_url": "",
                            "ad_network_short_id": "network_one",
                            "ad_network_custom": false,
                            "ad_placement_name": "Placement Alpha One"
                          }
                        },
                        {
                          "id": "2026-08-31,4f0c68f8-5cdb-44bf-a8c9-e543cfdfb1dd",
                          "type": "report",
                          "attributes": {
                            "date": "2026-08-31",
                            "ad_network_id": 900011,
                            "app_id": "7224f3fd-afd9-4d39-964e-6ba9fe98e78f",
                            "ad_placement_id": "4f0c68f8-5cdb-44bf-a8c9-e543cfdfb1dd",
                            "ad_revenue": 144,
                            "impressions": 134967,
                            "app_name": "Alpha",
                            "app_icon_url": "/default_app_icon.png",
                            "bundle_id": "com.example.alpha",
                            "store_id": "2000000001",
                            "platform": "ios",
                            "ad_network_name": "Network One",
                            "ad_network_icon_url": "",
                            "ad_network_short_id": "network_one",
                            "ad_network_custom": false,
                            "ad_placement_name": "Placement Alpha One"
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/reports/16143d3f-7344-4143-b9ee-7561f22ee3aa"
                      },
                      "meta": {
                        "count": 2,
                        "per_page": 100,
                        "start_date": "2026-08-25",
                        "end_date": "2026-09-01",
                        "granularity": "weekly",
                        "metrics": [
                          "ad_revenue",
                          "impressions"
                        ],
                        "organization_id": "0559c5d9-4076-4c48-b6da-7b1fb7a7cced",
                        "app_ids": [],
                        "ad_network_ids": [],
                        "group_by": [
                          "ad_placement_id"
                        ],
                        "countries": [],
                        "platforms": []
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 100 report requests in a minute with one access token",
            "headers": {
              "X-Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Length of the rate limit period, in seconds"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/saved_reports": {
      "get": {
        "operationId": "get_saved_reports",
        "summary": "List saved reports",
        "deprecated": false,
        "tags": [
          "Saved Reports"
        ],
        "parameters": [
          {
            "name": "report_type",
            "in": "query",
            "required": false,
            "description": "Keep only saved reports of this report type",
            "schema": {
              "type": "string",
              "enum": [
                "user_acquisition",
                "ad_revenue"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results to fetch.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer",
              "default": 25,
              "minimum": 0,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Saved reports",
            "headers": {
              "Link": {
                "schema": {
                  "type": "string"
                },
                "description": "URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page"
              },
              "Total": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items on all pages"
              },
              "Per-Page": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items per page"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedReportListDocument"
                },
                "examples": {
                  "Saved reports": {
                    "value": {
                      "data": [
                        {
                          "id": "06efdb3a-d521-4239-91aa-600fea7fca6d",
                          "type": "saved_report",
                          "attributes": {
                            "name": "Alpha UA",
                            "past_number_days": 14,
                            "metrics": [
                              "spend",
                              "installs"
                            ],
                            "granularity": "weekly",
                            "report_type": "user_acquisition",
                            "channel_ids": [
                              900001
                            ],
                            "app_ids": [
                              "203c03df-be47-4437-8b90-367d96565d19"
                            ],
                            "group_by": "channel_app"
                          }
                        },
                        {
                          "id": "f816a781-0c09-4476-be46-02e60fa060b9",
                          "type": "saved_report",
                          "attributes": {
                            "name": "bravo revenue",
                            "past_number_days": 30,
                            "metrics": [
                              "ad_revenue"
                            ],
                            "granularity": "monthly",
                            "report_type": "ad_revenue",
                            "channel_ids": [],
                            "app_ids": [],
                            "group_by": "ad_placement"
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/saved_reports?per_page=2",
                        "next": "https://api.tenjin.com/v2/saved_reports?page=2&per_page=2",
                        "last": "https://api.tenjin.com/v2/saved_reports?page=2&per_page=2"
                      },
                      "meta": {
                        "count": 3,
                        "per_page": 2
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_saved_reports",
        "summary": "Create a saved report",
        "deprecated": false,
        "tags": [
          "Saved Reports"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/post_saved_reports_Request"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created saved report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedReportDocument"
                },
                "examples": {
                  "The created saved report": {
                    "value": {
                      "data": {
                        "id": "38ad4186-f449-4359-96ce-b821b74927b1",
                        "type": "saved_report",
                        "attributes": {
                          "name": "Alpha UA",
                          "past_number_days": 14,
                          "metrics": [
                            "spend",
                            "installs"
                          ],
                          "granularity": "weekly",
                          "report_type": "user_acquisition",
                          "channel_ids": [
                            900001
                          ],
                          "app_ids": [
                            "e19fac7f-fedd-4b8e-8d7a-505e20c01dc7"
                          ],
                          "group_by": "channel_app"
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/saved_reports/38ad4186-f449-4359-96ce-b821b74927b1"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Read-only mode during maintenance; try again later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/saved_reports/{id}": {
      "get": {
        "operationId": "get_saved_reports_id",
        "summary": "Get a saved report",
        "deprecated": false,
        "tags": [
          "Saved Reports"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Id of the saved report",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The saved report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedReportDocument"
                },
                "examples": {
                  "The saved report": {
                    "value": {
                      "data": {
                        "id": "38ad4186-f449-4359-96ce-b821b74927b1",
                        "type": "saved_report",
                        "attributes": {
                          "name": "Alpha UA",
                          "past_number_days": 14,
                          "metrics": [
                            "spend",
                            "installs"
                          ],
                          "granularity": "weekly",
                          "report_type": "user_acquisition",
                          "channel_ids": [
                            900001
                          ],
                          "app_ids": [
                            "e19fac7f-fedd-4b8e-8d7a-505e20c01dc7"
                          ],
                          "group_by": "channel_app"
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/saved_reports/38ad4186-f449-4359-96ce-b821b74927b1"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patch_saved_reports_id",
        "summary": "Update a saved report",
        "deprecated": false,
        "tags": [
          "Saved Reports"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Id of the saved report",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/patch_saved_reports_id_Request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated saved report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedReportDocument"
                },
                "examples": {
                  "The updated saved report": {
                    "value": {
                      "data": {
                        "id": "38ad4186-f449-4359-96ce-b821b74927b1",
                        "type": "saved_report",
                        "attributes": {
                          "name": "Alpha UA",
                          "past_number_days": 14,
                          "metrics": [
                            "spend",
                            "installs"
                          ],
                          "granularity": "weekly",
                          "report_type": "user_acquisition",
                          "channel_ids": [
                            900001
                          ],
                          "app_ids": [
                            "e19fac7f-fedd-4b8e-8d7a-505e20c01dc7"
                          ],
                          "group_by": "channel_app"
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/saved_reports/38ad4186-f449-4359-96ce-b821b74927b1"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Read-only mode during maintenance; try again later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_saved_reports_id",
        "summary": "Delete a saved report",
        "deprecated": false,
        "tags": [
          "Saved Reports"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Id of the saved report",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The saved report is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyDocument"
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Read-only mode during maintenance; try again later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SkanReportDocument": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkanReportResource"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "$ref": "#/components/schemas/SkanReportMeta"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "What went wrong"
          }
        },
        "required": [
          "error"
        ]
      },
      "SpendReportDocument": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpendReportResource"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "$ref": "#/components/schemas/SpendReportMeta"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "AdRevenueReportDocument": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdRevenueReportResource"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "$ref": "#/components/schemas/AdRevenueReportMeta"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "SavedReportListDocument": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SavedReportResource"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "post_saved_reports_Request": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the saved report",
            "maxLength": 255
          },
          "granularity": {
            "type": "string",
            "description": "Granularity of the report",
            "enum": [
              "daily",
              "weekly",
              "monthly",
              "totals-daily"
            ]
          },
          "group_by": {
            "type": "array",
            "description": "Dimensions to group the report by, comma-separated or as an array. The dimensions and combinations each report_type takes: user_acquisition: `channel`, `app`, `country`, `campaign`, `site`, `creative`, `channel,app,country`, `channel,app`, `campaign,country`; ad_revenue: `channel`, `app`, `country`, `ad_placement`, `channel,app,country`, `channel,app`, `app,country`",
            "items": {
              "type": "string",
              "enum": [
                "channel",
                "app",
                "country",
                "campaign",
                "site",
                "creative",
                "ad_placement"
              ]
            }
          },
          "report_type": {
            "type": "string",
            "description": "`user_acquisition` for a spend report, `ad_revenue` for an ad revenue report",
            "enum": [
              "user_acquisition",
              "ad_revenue"
            ]
          },
          "past_number_days": {
            "type": "integer",
            "description": "Number of days before today that the report covers",
            "default": 30
          },
          "channel_ids": {
            "type": "array",
            "description": "Ids of the channels the report covers, comma-separated or as an array; all when blank",
            "items": {
              "type": "integer"
            }
          },
          "app_ids": {
            "type": "array",
            "description": "Ids of the apps the report covers, comma-separated or as an array; all when blank",
            "items": {
              "type": "string"
            }
          },
          "metrics": {
            "type": "array",
            "description": "Metrics of the report, comma-separated or as an array: any of the [spend metrics](https://api-docs.tenjin.com/metric_definitions#spend) for user_acquisition, or of the [ad revenue metrics](https://api-docs.tenjin.com/metric_definitions#ad_revenue) for ad_revenue. A POST without metrics uses spend, impressions, clicks, installs, cpi, ctr, cvr, tcpi for user_acquisition, and ad_revenue, impressions, clicks, ecpm, ecpc for ad_revenue",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "name",
          "granularity",
          "group_by",
          "report_type"
        ]
      },
      "SavedReportDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SavedReportResource"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "type": "object",
            "description": "Always empty"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "patch_saved_reports_id_Request": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the saved report",
            "maxLength": 255
          },
          "granularity": {
            "type": "string",
            "description": "Granularity of the report",
            "enum": [
              "daily",
              "weekly",
              "monthly",
              "totals-daily"
            ]
          },
          "group_by": {
            "type": "array",
            "description": "Dimensions to group the report by, comma-separated or as an array. The dimensions and combinations each report_type takes: user_acquisition: `channel`, `app`, `country`, `campaign`, `site`, `creative`, `channel,app,country`, `channel,app`, `campaign,country`; ad_revenue: `channel`, `app`, `country`, `ad_placement`, `channel,app,country`, `channel,app`, `app,country`",
            "items": {
              "type": "string",
              "enum": [
                "channel",
                "app",
                "country",
                "campaign",
                "site",
                "creative",
                "ad_placement"
              ]
            }
          },
          "past_number_days": {
            "type": "integer",
            "description": "Number of days before today that the report covers"
          },
          "channel_ids": {
            "type": "array",
            "description": "Ids of the channels the report covers, comma-separated or as an array; all when blank",
            "items": {
              "type": "integer"
            }
          },
          "app_ids": {
            "type": "array",
            "description": "Ids of the apps the report covers, comma-separated or as an array; all when blank",
            "items": {
              "type": "string"
            }
          },
          "metrics": {
            "type": "array",
            "description": "Metrics of the report, comma-separated or as an array: any of the [spend metrics](https://api-docs.tenjin.com/metric_definitions#spend) for user_acquisition, or of the [ad revenue metrics](https://api-docs.tenjin.com/metric_definitions#ad_revenue) for ad_revenue. A POST without metrics uses spend, impressions, clicks, installs, cpi, ctr, cvr, tcpi for user_acquisition, and ad_revenue, impressions, clicks, ecpm, ecpc for ad_revenue",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "EmptyDocument": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Always empty"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "type": "object",
            "description": "Always empty"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Links": {
        "type": "object",
        "properties": {
          "self": {
            "type": "string",
            "format": "uri",
            "description": "URL of this request"
          },
          "first": {
            "type": "string",
            "format": "uri",
            "description": "URL of the first page of a list"
          },
          "prev": {
            "type": "string",
            "format": "uri",
            "description": "URL of the previous page of a list"
          },
          "next": {
            "type": "string",
            "format": "uri",
            "description": "URL of the next page of a list"
          },
          "last": {
            "type": "string",
            "format": "uri",
            "description": "URL of the last page of a list"
          }
        },
        "required": [
          "self"
        ]
      },
      "SkanReportMeta": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Number of rows on all pages"
          },
          "per_page": {
            "type": "integer",
            "description": "Number of rows per page",
            "example": 100
          },
          "start_date": {
            "type": "string",
            "format": "date",
            "description": "The start_date param, or its default"
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "description": "The end_date param, or its default"
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The requested metrics"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "description": "Id of your organization"
          },
          "app_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The app_ids param"
          },
          "granularity": {
            "type": "string",
            "description": "The granularity param, or its default",
            "enum": [
              "daily",
              "totals-daily"
            ],
            "example": "daily"
          },
          "group_by": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "app_id",
                  "ad_network_id",
                  "conversion_value",
                  "fidelity_type",
                  "sk_ad_network_id",
                  "sk_campaign_id",
                  "sk_source_app_id",
                  "campaign_id"
                ]
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SkanReportDimension"
                }
              }
            ],
            "description": "Internal dimension names: a string for one dimension, an array for several"
          },
          "ad_network_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "The channel_ids param"
          }
        },
        "required": [
          "count",
          "per_page",
          "start_date",
          "end_date",
          "metrics",
          "organization_id",
          "app_ids",
          "granularity",
          "group_by",
          "ad_network_ids"
        ]
      },
      "SkanReportResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "sk_ad_network_report"
            ]
          },
          "attributes": {
            "type": "object",
            "description": "The dimension columns of the group_by, and the requested metrics; see the [Metric Definitions](https://api-docs.tenjin.com/metric_definitions#sk_ad_network)",
            "properties": {
              "date": {
                "type": "string",
                "format": "date",
                "description": "First day of the period; absent with granularity=totals-daily",
                "example": "2026-09-01"
              },
              "app_id": {
                "type": "string",
                "format": "uuid",
                "description": "Id of the app. Group by app or campaign; every group_by of several values includes app",
                "nullable": true
              },
              "app_name": {
                "type": "string",
                "description": "Name of the app. Group by app or campaign",
                "nullable": true,
                "example": "My Game"
              },
              "platform": {
                "type": "string",
                "description": "Platform of the app. Group by app or campaign",
                "nullable": true,
                "enum": [
                  "amazon",
                  "android",
                  "android_other",
                  "ios",
                  "windows",
                  "unspecified",
                  null
                ],
                "example": "ios"
              },
              "bundle_id": {
                "type": "string",
                "description": "Bundle id of the app in its store. Group by app or campaign",
                "nullable": true,
                "example": "com.example.mygame"
              },
              "store_id": {
                "type": "string",
                "description": "Id of the app in its store. Group by app or campaign",
                "nullable": true,
                "example": "655745678"
              },
              "ad_network_id": {
                "type": "integer",
                "description": "Id of the channel. Group by channel or campaign",
                "nullable": true,
                "example": 3
              },
              "ad_network_name": {
                "type": "string",
                "description": "Name of the channel. Group by channel or campaign",
                "nullable": true,
                "example": "Facebook"
              },
              "ad_network_short_id": {
                "type": "string",
                "description": "URL-safe id of the channel. Group by channel",
                "nullable": true,
                "example": "facebook"
              },
              "campaign_id": {
                "type": "string",
                "format": "uuid",
                "description": "Id of the campaign. Group by campaign"
              },
              "campaign_name": {
                "type": "string",
                "description": "Name of the campaign. Group by campaign",
                "nullable": true,
                "example": "Facebook Campaign"
              },
              "conversion_value": {
                "type": "integer",
                "description": "SKAdNetwork conversion value, from 0 to 63. Group by conversion_value",
                "nullable": true,
                "example": 12
              },
              "fidelity_type": {
                "type": "integer",
                "description": "1 for StoreKit-rendered ads, 0 for view-through ads. Group by fidelity_type",
                "nullable": true,
                "example": 1
              },
              "sk_ad_network_id": {
                "type": "string",
                "description": "SKAdNetwork id of the ad network. Group by sk_ad_network",
                "nullable": true,
                "example": "v9wttpbfk9.skadnetwork"
              },
              "sk_campaign_id": {
                "type": "integer",
                "description": "SKAdNetwork campaign id, from 0 to 99. Group by sk_campaign",
                "nullable": true,
                "example": 7
              },
              "sk_source_app_id": {
                "type": "integer",
                "description": "Store id of the app that showed the ad. Group by sk_source_app",
                "nullable": true,
                "example": 1234567890
              },
              "conversion_value_count": {
                "type": "integer",
                "description": "Conversions. When requested",
                "nullable": true
              },
              "conversion_value_total": {
                "type": "integer",
                "description": "Conversion Value Total. When requested",
                "nullable": true
              },
              "conversion_value_avg": {
                "type": "number",
                "format": "double",
                "description": "Conversion Value Average. When requested",
                "nullable": true
              },
              "redownload_count": {
                "type": "integer",
                "description": "Redownloads. When requested",
                "nullable": true
              },
              "redownload_cv_total": {
                "type": "integer",
                "description": "Redownload Conversion Value Total. When requested",
                "nullable": true
              },
              "redownload_cv_avg": {
                "type": "number",
                "format": "double",
                "description": "Redownload Conversion Value Average. When requested",
                "nullable": true
              },
              "first_download_count": {
                "type": "integer",
                "description": "First Downloads. When requested",
                "nullable": true
              },
              "first_download_cv_total": {
                "type": "integer",
                "description": "First Download Conversion Value Total. When requested",
                "nullable": true
              },
              "first_download_cv_avg": {
                "type": "number",
                "format": "double",
                "description": "First Download Conversion Value Average. When requested",
                "nullable": true
              },
              "assists": {
                "type": "integer",
                "description": "Assists. When requested",
                "nullable": true
              },
              "redownload_assists": {
                "type": "integer",
                "description": "Redownload Assists. When requested",
                "nullable": true
              },
              "first_download_assists": {
                "type": "integer",
                "description": "First Download Assists. When requested",
                "nullable": true
              }
            }
          }
        },
        "required": [
          "id",
          "type",
          "attributes"
        ]
      },
      "SpendReportMeta": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Number of rows on all pages"
          },
          "per_page": {
            "type": "integer",
            "description": "Number of rows per page",
            "example": 100
          },
          "start_date": {
            "type": "string",
            "format": "date",
            "description": "The start_date param, or its default"
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "description": "The end_date param, or its default"
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The requested metrics"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "description": "Id of your organization"
          },
          "app_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The app_ids param"
          },
          "granularity": {
            "type": "string",
            "description": "The granularity param, or its default",
            "enum": [
              "daily",
              "weekly",
              "monthly",
              "totals-daily"
            ],
            "example": "daily"
          },
          "group_by": {
            "type": "string",
            "description": "Internal dimension name for one dimension, a name for some combinations, or null for any other combination",
            "nullable": true,
            "enum": [
              "ad_network_id",
              "app_id",
              "campaign_id",
              "country",
              "site_id",
              "creative_id",
              "ad_network_app",
              "ad_network_app_country",
              "channel_country",
              "app_country",
              "campaign_country",
              "campaign_creative",
              "campaign_site",
              "creative_country",
              "creative_site",
              null
            ]
          },
          "countries": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The countries param"
          },
          "campaign_ids": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ],
            "description": "The deprecated campaign_ids param as sent; empty when not sent"
          },
          "platforms": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ],
            "description": "The deprecated platforms param as sent; empty when not sent"
          },
          "ad_network_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ],
            "description": "The channel_ids param, or the deprecated ad_network_ids param as sent: a string or an array of strings"
          }
        },
        "required": [
          "count",
          "per_page",
          "start_date",
          "end_date",
          "metrics",
          "organization_id",
          "app_ids",
          "granularity",
          "group_by",
          "countries",
          "campaign_ids",
          "platforms",
          "ad_network_ids"
        ]
      },
      "SpendReportResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "report"
            ]
          },
          "attributes": {
            "type": "object",
            "description": "The dimension columns of the group_by, and the requested metrics: any of the [Metric Definitions](https://api-docs.tenjin.com/metric_definitions#spend) and the organization's z_ custom metrics. Unknown metric names are left out.",
            "properties": {
              "date": {
                "type": "string",
                "format": "date",
                "description": "First day of the period; absent with granularity=totals-daily",
                "example": "2026-09-01"
              },
              "name": {
                "type": "string",
                "description": "Name of the app, channel, campaign or creative; the country code or site id. Group by app, channel, campaign, creative, country or site, and the campaign name for campaign,country. Absent for channel,app and channel,app,country. A group_by with campaign or creative ignores channel and app. For any other combination, the ids joined with `-`, such as `3-US`",
                "nullable": true,
                "example": "My Game"
              },
              "icon_url": {
                "type": "string",
                "description": "Icon URL of the app, channel or campaign. Group by app or channel alone, or a group_by that includes campaign, without site or creative",
                "nullable": true
              },
              "short_id": {
                "type": "string",
                "description": "URL-safe id of the channel. Group by channel",
                "nullable": true,
                "example": "facebook"
              },
              "custom": {
                "type": "boolean",
                "description": "Whether the channel is a custom one. Group by channel",
                "nullable": true,
                "example": false
              },
              "app_id": {
                "type": "string",
                "format": "uuid",
                "description": "Id of the app. A group_by that includes app, campaign or creative",
                "nullable": true
              },
              "app_name": {
                "type": "string",
                "description": "Name of the app. A group_by that includes app, campaign or creative, except app alone",
                "nullable": true,
                "example": "My Game"
              },
              "app_icon_url": {
                "type": "string",
                "description": "Icon URL of the app. A group_by that includes app, campaign or creative, except app alone",
                "nullable": true
              },
              "platform": {
                "type": "string",
                "description": "Platform of the app. A group_by that includes app, campaign or creative",
                "nullable": true,
                "enum": [
                  "amazon",
                  "android",
                  "android_other",
                  "ios",
                  "windows",
                  "unspecified",
                  null
                ],
                "example": "ios"
              },
              "bundle_id": {
                "type": "string",
                "description": "Bundle id of the app in its store. A group_by that includes app, campaign or creative",
                "nullable": true,
                "example": "com.example.mygame"
              },
              "store_id": {
                "type": "string",
                "description": "Id of the app in its store. A group_by that includes app, campaign or creative",
                "nullable": true,
                "example": "655745678"
              },
              "ad_network_id": {
                "type": "integer",
                "description": "Id of the channel. A group_by that includes channel, campaign or creative",
                "nullable": true,
                "example": 3
              },
              "ad_network_name": {
                "type": "string",
                "description": "Name of the channel. A group_by that includes channel, campaign or creative, except channel alone",
                "nullable": true,
                "example": "Facebook"
              },
              "ad_network_icon_url": {
                "type": "string",
                "description": "Icon URL of the channel. A group_by that includes channel, campaign or creative, except channel alone",
                "nullable": true
              },
              "ad_network_short_id": {
                "type": "string",
                "description": "URL-safe id of the channel. A group_by that includes channel and country or site, without campaign or creative, except channel,app,country",
                "nullable": true,
                "example": "facebook"
              },
              "ad_network_custom": {
                "type": "boolean",
                "description": "Whether the channel is a custom one. A group_by that includes channel and country or site, without campaign or creative, except channel,app,country",
                "example": false
              },
              "campaign_id": {
                "type": "string",
                "format": "uuid",
                "description": "Id of the campaign. A group_by that includes campaign"
              },
              "campaign_name": {
                "type": "string",
                "description": "Name of the campaign. A group_by that includes campaign and site or creative",
                "nullable": true,
                "example": "Facebook Campaign"
              },
              "campaign_icon_url": {
                "type": "string",
                "description": "Icon URL of the campaign. A group_by that includes campaign and site or creative",
                "nullable": true
              },
              "creative_id": {
                "type": "string",
                "format": "uuid",
                "description": "Id of the creative. A group_by that includes creative"
              },
              "creative_name": {
                "type": "string",
                "description": "Name of the creative. A group_by that includes creative and campaign, country or site",
                "nullable": true,
                "example": "Summer video 15s"
              },
              "remote_creative_id": {
                "type": "string",
                "description": "Id of the creative on the ad network. A group_by that includes creative",
                "nullable": true,
                "example": "23851234567890999"
              },
              "country": {
                "type": "string",
                "description": "ISO country code. A group_by that includes country",
                "example": "US"
              },
              "site_id": {
                "type": "string",
                "description": "Id of the site. A group_by that includes site"
              }
            },
            "additionalProperties": {
              "type": "number",
              "format": "double",
              "nullable": true
            }
          }
        },
        "required": [
          "id",
          "type",
          "attributes"
        ]
      },
      "AdRevenueReportMeta": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Number of rows on all pages"
          },
          "per_page": {
            "type": "integer",
            "description": "Number of rows per page",
            "example": 100
          },
          "start_date": {
            "type": "string",
            "format": "date",
            "description": "The start_date param, or its default"
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "description": "The end_date param, or its default"
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The requested metrics"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "description": "Id of your organization"
          },
          "app_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The app_ids param"
          },
          "granularity": {
            "type": "string",
            "description": "The granularity param, or its default",
            "enum": [
              "daily",
              "weekly",
              "monthly",
              "totals-daily"
            ],
            "example": "daily"
          },
          "group_by": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ad_network_id",
                "app_id",
                "country",
                "ad_placement_id"
              ]
            },
            "description": "Internal dimension names"
          },
          "countries": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The countries param"
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The deprecated platforms param as sent; empty when not sent"
          },
          "ad_network_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ],
            "description": "The channel_ids param, or the deprecated ad_network_ids param as an array of strings"
          }
        },
        "required": [
          "count",
          "per_page",
          "start_date",
          "end_date",
          "metrics",
          "organization_id",
          "app_ids",
          "granularity",
          "group_by",
          "countries",
          "platforms",
          "ad_network_ids"
        ]
      },
      "AdRevenueReportResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "report"
            ]
          },
          "attributes": {
            "type": "object",
            "description": "The dimension columns of the group_by, and the requested metrics; see the [Metric Definitions](https://api-docs.tenjin.com/metric_definitions#ad_revenue)",
            "properties": {
              "date": {
                "type": "string",
                "format": "date",
                "description": "First day of the period; absent with granularity=totals-daily",
                "example": "2026-09-01"
              },
              "app_id": {
                "type": "string",
                "format": "uuid",
                "description": "Id of the app. Group by app or ad_placement",
                "nullable": true
              },
              "app_name": {
                "type": "string",
                "description": "Name of the app. Group by app or ad_placement",
                "nullable": true,
                "example": "My Game"
              },
              "app_icon_url": {
                "type": "string",
                "description": "Icon URL of the app. Group by app or ad_placement",
                "nullable": true
              },
              "platform": {
                "type": "string",
                "description": "Platform of the app. Group by app or ad_placement",
                "nullable": true,
                "enum": [
                  "amazon",
                  "android",
                  "android_other",
                  "ios",
                  "windows",
                  "unspecified",
                  null
                ],
                "example": "ios"
              },
              "bundle_id": {
                "type": "string",
                "description": "Bundle id of the app in its store. Group by app or ad_placement",
                "nullable": true,
                "example": "com.example.mygame"
              },
              "store_id": {
                "type": "string",
                "description": "Id of the app in its store. Group by app or ad_placement",
                "nullable": true,
                "example": "655745678"
              },
              "ad_network_id": {
                "type": "integer",
                "description": "Id of the channel. Group by channel or ad_placement",
                "nullable": true,
                "example": 3
              },
              "ad_network_name": {
                "type": "string",
                "description": "Name of the channel. Group by channel or ad_placement",
                "nullable": true,
                "example": "AppLovin"
              },
              "ad_network_icon_url": {
                "type": "string",
                "description": "Icon URL of the channel. Group by channel or ad_placement",
                "nullable": true
              },
              "ad_network_short_id": {
                "type": "string",
                "description": "URL-safe id of the channel. Group by channel or ad_placement",
                "nullable": true,
                "example": "applovin"
              },
              "ad_network_custom": {
                "type": "boolean",
                "description": "Whether the channel is a custom one. Group by channel or ad_placement",
                "example": false
              },
              "country_name": {
                "type": "string",
                "description": "ISO country code, despite the name. Group by country",
                "example": "US"
              },
              "ad_placement_id": {
                "type": "string",
                "format": "uuid",
                "description": "Id of the ad placement. Group by ad_placement"
              },
              "ad_placement_name": {
                "type": "string",
                "description": "Name of the ad placement. Group by ad_placement",
                "nullable": true,
                "example": "Rewarded video"
              },
              "ad_revenue": {
                "type": "number",
                "format": "double",
                "description": "Ad Revenue. When requested",
                "nullable": true
              },
              "clicks": {
                "type": "number",
                "format": "double",
                "description": "Clicks. When requested",
                "nullable": true
              },
              "impressions": {
                "type": "number",
                "format": "double",
                "description": "Impressions. When requested",
                "nullable": true
              },
              "ecpm": {
                "type": "number",
                "format": "double",
                "description": "eCPM. When requested",
                "nullable": true
              },
              "ecpc": {
                "type": "number",
                "format": "double",
                "description": "eCPC. When requested",
                "nullable": true
              }
            }
          }
        },
        "required": [
          "id",
          "type",
          "attributes"
        ]
      },
      "PageMeta": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Number of items on all pages"
          },
          "per_page": {
            "type": "integer",
            "description": "Number of items per page"
          }
        },
        "required": [
          "count",
          "per_page"
        ]
      },
      "SavedReportResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "saved_report"
            ]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of the saved report",
                "example": "Daily spend by channel"
              },
              "past_number_days": {
                "type": "integer",
                "description": "Number of days before today that the report covers",
                "example": 30
              },
              "metrics": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Metrics of the report",
                "example": [
                  "spend",
                  "installs",
                  "cpi"
                ]
              },
              "granularity": {
                "type": "string",
                "description": "Granularity of the report",
                "enum": [
                  "daily",
                  "weekly",
                  "monthly",
                  "totals-daily"
                ],
                "example": "daily"
              },
              "report_type": {
                "type": "string",
                "description": "`user_acquisition` for a spend report, `ad_revenue` for an ad revenue report",
                "enum": [
                  "user_acquisition",
                  "ad_revenue"
                ],
                "example": "user_acquisition"
              },
              "channel_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                },
                "description": "Ids of the channels the report covers; all when empty",
                "example": [
                  3
                ]
              },
              "app_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Ids of the apps the report covers; all when empty"
              },
              "group_by": {
                "type": "string",
                "description": "The dimension the report groups by, or the name of its combination: `channel_app_country`, `channel_app`, `campaign_country`, `app_country`. A report saved outside the API can hold several dimensions, comma-separated (`app,site`). Null when a stored dimension has no API name",
                "nullable": true,
                "example": "channel_app"
              }
            },
            "required": [
              "name",
              "past_number_days",
              "metrics",
              "granularity",
              "report_type",
              "channel_ids",
              "app_ids",
              "group_by"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "attributes"
        ]
      },
      "SkanReportDimension": {
        "type": "string",
        "enum": [
          "app_id",
          "ad_network_id",
          "conversion_value",
          "fidelity_type",
          "sk_ad_network_id",
          "sk_campaign_id",
          "sk_source_app_id",
          "campaign_id"
        ]
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Generate an access token on the [Access Tokens](https://dashboard.tenjin.com/dashboard/access_tokens) page of the Tenjin dashboard and send it as `Authorization: Bearer <access token>`. [API access tokens](https://tenjin.com/docs/api-access-tokens/) explains them."
      }
    }
  },
  "security": [
    {
      "Bearer": []
    }
  ],
  "externalDocs": {
    "description": "Find out more about the Reporting Metrics API",
    "url": "https://tenjin.com/docs/automation-apis/#reporting-metrics-api"
  }
}
