---
title: "Post Cohorts"
method: POST
path: "/insights/query/cohorts"
---

# Post Cohorts

`POST /insights/query/cohorts`

## Headers

- `Authorization` string, nullable
- `X-User-Id` string, nullable
- `X-Posthog-Session-Id` string

## Cookies

- `session_id` string, nullable

## Request body

- FetchCohortQuery
  - `currency` string, required
  - `timezone` string, required
  - `query` CohortsQuery, required
    - `metric` CohortMetric
      - `name` string, nullable
      - `hidden` boolean, nullable
      - `id` string
      - `filter` MetricFilter
        - `comparator` 'greater_than' | 'less_than', required
        - `value` number, required
      - `aggregate` CohortEventMetricAggregate
        - `type` 'ltv' | 'churn_rate' | 'total' | 'retention_rate' | 'repurchase_rate'
    - `filters` AllOfFilters
      - `all_of` AnyOfFilters[]
        - `any_of` union[]
          - union
            - EventPropertyFilter
              - …
            - EventSourceFilter
              - …
            - AdPlatformPropertyFilter
              - …
            - AdPlatformSourceFilter
              - …
            - TouchpointFilter
              - …
            - CustomDimensionFilter
              - …
            - AdPropertiesFilter
              - …
    - `breakdown` union
      - EventPropertyBreakdown
        - `type` 'event'
        - `scope` 'event' | 'profile' | 'session' | 'product', required
        - `property_name` union, required
          - string
          - union
            - RevenueProperty
              - …
            - TaxProperty
              - …
            - DiscountProperty
              - …
            - ShippingProperty
              - …
            - NetRevenueAfterTaxProperty
              - …
            - NetRevenueAfterTaxAndShippingProperty
              - …
            - ProductIDsProperty
              - …
            - VariantIDsProperty
              - …
            - ProductSKUsProperty
              - …
            - ProductNamesProperty
              - …
            - ProductBundleIds
              - …
            - ProductBundleNames
              - …
            - NumberOfItemsProperty
              - …
            - PaymentMethodProperty
              - …
            - SalesChannelTypeProperty
              - …
            - URLProperty
              - …
            - FullURLProperty
              - …
            - ReferrerProperty
              - …
            - LandingURLProperty
              - …
            - FullLandingURLProperty
              - …
            - LandingURLDomainProperty
              - …
            - LandingURLPathProperty
              - …
            - TimezoneProperty
              - …
            - LanguageProperty
              - …
            - TitleProperty
              - …
            - DeviceBrandProperty
              - …
            - DeviceModelProperty
              - …
            - DeviceTypeProperty
              - …
            - OSProperty
              - …
            - BrowserProperty
              - …
            - GenderGuessProperty
              - …
            - GeoIPCityNameProperty
              - …
            - GeoIPCountryNameProperty
              - …
            - GeoIPCountryCodeProperty
              - …
            - GeoIPRegionNameProperty
              - …
            - GeoIPZipCodeProperty
              - …
            - IsCustomerProperty
              - …
            - IsNewVisitorProperty
              - …
            - UtmSourceMedium
              - …
            - FullSessionReferrerProperty
              - …
            - ProfileIDProperty
              - …
            - OrderIDProperty
              - …
            - ProductPriceProperty
              - …
            - ProductQuantityProperty
              - …
            - ProductRevenueProperty
              - …
            - ProductDiscountProperty
              - …
            - ProductTaxesProperty
              - …
            - ProductShippingProperty
              - …
            - ProductNetRevenueProperty
              - …
            - COGSProperty
              - …
            - GrossProfitProperty
              - …
            - PaymentProcessingFeeProperty
              - …
            - ShippingCostProperty
              - …
            - GrossRevenueProperty
              - …
            - ContributionProfitProperty
              - …
        - `property_type` 'string' | 'numeric' | 'boolean' | 'list_of_strings', required
      - EventSourceBreakdown
        - `type` 'event_source'
      - AdPlatformSourceBreakdown
        - `type` 'ad_platform_source'
      - TouchpointBreakdown
        - `type` 'touchpoint'
        - `property` 'channel_group' | 'channel' | 'campaign' | 'adset' | 'ad', required
      - CustomDimensionBreakdown
        - `type` 'custom_dimension'
        - `custom_dimension_id` integer, required
    - `date_range` DateRangeQuery
      - `since` union, required
        - string, date
        - string, date-time
        - string
      - `until` union
        - string, date
        - string, date-time
        - string
    - `period` integer, nullable
    - `time_granularity` 'hour' | 'day' | 'week' | 'month' | 'second', required
    - `attribution_model` 'first_touch' | 'first_touch_paid' | 'inv_j_shaped' | 'j_shaped' | 'j_shaped_paid' | 'last_touch' | 'last_touch_paid' | 'linear' | 'participation' | 'time_decay' | 'inv_time_decay' | 'u_shaped' | 'direct_session' | 'inv_j_shaped_paid' | 'top_of_funnel'
    - `type` 'cohorts'
  - `start_of_week` 0 | 1
  - `invalidate_cache` boolean
  - `insight_id` integer, nullable

## Response `200`

Successful Response

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/runconverge/apis/fastapi.md) · [All operations](https://skmtc.dev/runconverge/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/runconverge/fastapi/revisions/1452e350bd1d/schema)
