Report Cohorts
Path Parameters
projectId*string
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
from*string
to*string
currency?string|null
timezone?|null
environment?|null
groupBy*string
Value in
- "surface"
- "platform"
- "campaign"
- "ad_group"
unit*string
Value in
- "week"
- "month"
metric*string
Value in
- "roas"
- "revenue_per_payer"
- "payers"
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/projects/string/ads/reports/cohorts" \ -H "Content-Type: application/json" \ -d '{ "from": "string", "to": "string", "groupBy": "surface", "unit": "week", "metric": "roas" }'{ "from": "string", "to": "string", "currency": "string", "timezone": "string", "environment": "production", "hasMeasuredAccess": true, "provisionalFrom": "string", "warnings": [ { "code": "currency_converted", "currencies": [ "string" ] } ], "groupBy": "surface", "unit": "week", "metric": "roas", "cohorts": [ { "start": "string", "spend": -9007199254740991, "people": -9007199254740991, "values": [ { "day": -9007199254740991, "value": 0, "isMaturing": true } ] } ], "average": { "spend": -9007199254740991, "people": -9007199254740991, "values": [ { "day": -9007199254740991, "value": 0 } ] }, "groups": [ { "key": "string", "name": "string", "surface": "web", "people": -9007199254740991, "values": [ { "day": -9007199254740991, "value": 0 } ], "paybackDay": -9007199254740991 } ]}{ "error": { "type": "invalid_request", "code": "string", "message": "string", "param": "string" }}{ "error": { "type": "unauthenticated", "code": "string", "message": "string", "param": "string" }}{ "error": { "type": "permission_denied", "code": "string", "message": "string", "param": "string" }}{ "error": { "type": "not_found", "code": "string", "message": "string", "param": "string" }}{ "error": { "type": "internal", "code": "string", "message": "string", "param": "string" }}