> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oneofnone.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get retention cohorts



## OpenAPI

````yaml get /v1/analytics/retention/cohorts
openapi: 3.1.0
info:
  title: One of None API
  version: 1.0.0
  description: >-
    The One of None API manages product collections, registrations, short URLs,
    team operations, and rewards used by storefront integrations including
    Shopify discounts and redemption flows.
servers:
  - url: https://api.oneofnone.io
security:
  - ApiKeyAuth: []
paths:
  /v1/analytics/retention/cohorts:
    get:
      summary: Get retention cohorts
      parameters:
        - schema:
            type: string
          required: false
          name: team_id
          in: query
        - schema:
            type: string
          required: false
          name: team_slug
          in: query
        - schema:
            anyOf:
              - type: string
              - type: array
                items:
                  type: string
          required: false
          name: team_ids
          in: query
        - schema:
            anyOf:
              - type: string
              - type: array
                items:
                  type: string
          required: false
          name: team_slugs
          in: query
        - schema:
            type: string
          required: false
          name: collection_id
          in: query
        - schema:
            type: string
          required: false
          name: collection_slug
          in: query
        - schema:
            anyOf:
              - type: string
              - type: array
                items:
                  type: string
          required: false
          name: collection_ids
          in: query
        - schema:
            type: string
          required: false
          name: date_from
          in: query
        - schema:
            type: string
          required: false
          name: date_to
          in: query
        - schema:
            type: string
            enum:
              - daily
              - weekly
              - monthly
          required: false
          name: aggregation
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 12
          required: false
          name: periods
          in: query
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetentionCohortsResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    RetentionCohortsResponse:
      type: object
      properties:
        meta:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              type:
                type: string
            required:
              - name
              - type
        data:
          type: array
          items:
            type: object
            properties:
              cohort_date:
                type: string
              period:
                type: number
              cohort_size:
                type: number
              retained_users:
                type: number
              retention_rate:
                type: number
            required:
              - cohort_date
              - period
              - cohort_size
              - retained_users
              - retention_rate
        rows:
          type: number
        statistics:
          type: object
          properties:
            elapsed:
              type: number
            rows_read:
              type: number
            bytes_read:
              type: number
          required:
            - elapsed
            - rows_read
            - bytes_read
      required:
        - meta
        - data
        - rows
        - statistics
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````