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

# /experimental/marketing-solutions/audiences/recommend-segments

> Recommend audience segments for MarketingSolutions from a freeform brief.



## OpenAPI

````yaml https://api.criteo.com/experimental/marketingsolutions/open-api-specifications.json post /experimental/marketing-solutions/audiences/recommend-segments
openapi: 3.0.1
info:
  title: Criteo API
  description: Criteo API - MarketingSolutions
  version: Experimental
servers:
  - url: https://api.criteo.com
security:
  - oauth: []
tags:
  - name: Advertiser
  - name: Analytics
  - name: Audience
  - name: Campaign
  - name: Catalog
  - name: Creative
  - name: Gateway
  - name: OnSiteRecommendation
  - name: Reco
paths:
  /experimental/marketing-solutions/audiences/recommend-segments:
    post:
      tags:
        - Audience
      summary: /experimental/marketing-solutions/audiences/recommend-segments
      description: >-
        Recommend audience segments for MarketingSolutions from a freeform
        brief.
      operationId: RecommendSegments
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecommendSegmentsRequest'
        required: true
        x-bodyName: request
      responses:
        '200':
          description: Recommended audience segments.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecommendSegmentsResponse'
      security:
        - oauth:
            - MarketingSolutions_Audience_Read
components:
  schemas:
    RecommendSegmentsRequest:
      required:
        - data
      type: object
      properties:
        data:
          $ref: '#/components/schemas/RecommendSegmentsRequestData'
      additionalProperties: false
      description: Request to recommend audience segments from a freeform brief.
    RecommendSegmentsResponse:
      required:
        - data
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/RecommendSegmentsData'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/RecommendSegmentsProblem'
          nullable: true
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/RecommendSegmentsProblem'
          nullable: true
      additionalProperties: false
      description: Recommended segments together with any warnings and errors.
    RecommendSegmentsRequestData:
      required:
        - attributes
      type: object
      properties:
        attributes:
          $ref: '#/components/schemas/RecommendSegmentsRequestAttributes'
        type:
          enum:
            - RecommendSegmentsRequest
          type: string
          default: RecommendSegmentsRequest
      additionalProperties: false
      description: The request attributes wrapped in a JSON:API-style data object.
    RecommendSegmentsData:
      required:
        - attributes
      type: object
      properties:
        attributes:
          $ref: '#/components/schemas/SegmentConfigurationV1'
        type:
          enum:
            - SegmentRecommendation
          type: string
          default: SegmentRecommendation
          nullable: true
      additionalProperties: false
      description: A recommended segment wrapped in a JSON:API-style data object.
    RecommendSegmentsProblem:
      type: object
      properties:
        detail:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
      additionalProperties: false
      description: A warning or an error raised while processing the request.
    RecommendSegmentsRequestAttributes:
      required:
        - brief
      type: object
      properties:
        advertiserId:
          type: string
          description: Advertiser ID the caller has access to.
        brief:
          type: string
          description: A freeform audience description.
        nbSegments:
          type: integer
          description: Number of segments to recommend, between 1 and 20 (defaults to 5).
          format: int32
          default: 5
        segmentStatusToRecommend:
          enum:
            - new
            - existing
          type: string
          description: Recommend existing segments or suggest new ones.
          default: new
        segmentTypesToRecommend:
          type: array
          items:
            enum:
              - affinityAllLevels
              - affinityTopLevel
              - affinityChildren
              - inMarketCategoryAllLevels
              - inMarketCategoryLevel1
              - inMarketCategoryLevel2
              - inMarketCategoryLevel3
              - behavioral
              - websiteVisitor
              - predictiveCLV
              - location
              - lookalike
              - filterBased
            type: string
      additionalProperties: false
      description: Brief and options of a segment recommendation request.
    SegmentConfigurationV1:
      required:
        - description
        - segmentType
        - alreadyCreated
      type: object
      properties:
        advertiserId:
          type: string
          nullable: true
        affinityConfiguration:
          $ref: '#/components/schemas/AffinityRecommendationV1'
        alreadyCreated:
          type: boolean
        behavioralConfiguration:
          $ref: '#/components/schemas/BehavioralRecommendationV1'
        dataProviderId:
          type: string
          nullable: true
        description:
          type: string
        inMarketConfiguration:
          $ref: '#/components/schemas/InMarketRecommendationV1'
        locationConfiguration:
          $ref: '#/components/schemas/LocationRecommendationV1'
        lookalikeConfiguration:
          $ref: '#/components/schemas/LookalikeRecommendationV1'
        segmentId:
          type: string
          nullable: true
        segmentName:
          type: string
          nullable: true
        segmentType:
          enum:
            - affinity
            - inMarket
            - websiteVisitor
            - predictiveCLV
            - location
            - lookalike
            - filterBased
            - behavioral
          type: string
        size:
          type: integer
          format: int64
          nullable: true
      additionalProperties: false
      description: A recommended audience segment and its configuration.
    AffinityRecommendationV1:
      required:
        - country
        - targetingCategoryIds
        - customCategoryIds
        - lookbackDays
        - numberOfEvents
        - targetingCategoryNames
        - customCategoryNames
      type: object
      properties:
        country:
          type: string
        customCategoryIds:
          type: array
          items:
            type: string
        customCategoryNames:
          type: array
          items:
            type: string
        lookbackDays:
          type: integer
          format: int32
        numberOfEvents:
          type: integer
          format: int32
        targetingCategoryIds:
          type: array
          items:
            type: string
        targetingCategoryNames:
          type: array
          items:
            type: string
      description: Configuration of a recommended affinity segment.
      nullable: true
    BehavioralRecommendationV1:
      required:
        - category
      type: object
      properties:
        category:
          enum:
            - seasonal
            - lifestyles
            - lifeEvents
            - buyingPatterns
            - unknown
          type: string
        country:
          type: string
          nullable: true
        endDate:
          type: string
          nullable: true
        startDate:
          type: string
          nullable: true
      description: Configuration of a recommended behavioral segment.
      nullable: true
    InMarketRecommendationV1:
      required:
        - country
        - buyingPower
        - interestIds
        - brandIds
        - priceRange
        - interestNames
        - brandNames
        - brandDesc
      type: object
      properties:
        brandDesc:
          type: array
          items:
            type: string
        brandIds:
          type: array
          items:
            type: string
        brandNames:
          type: array
          items:
            type: string
        buyingPower:
          type: array
          items:
            type: string
        country:
          type: string
        gender:
          type: string
          nullable: true
        interestIds:
          type: array
          items:
            type: string
        interestNames:
          type: array
          items:
            type: string
        priceRange:
          type: array
          items:
            type: string
      description: Configuration of a recommended in-market segment.
      nullable: true
    LocationRecommendationV1:
      required:
        - registryType
        - pointsOfInterest
        - geoDivisions
        - radiusInKm
      type: object
      properties:
        geoDivisions:
          type: array
          items:
            type: object
        partnerId:
          type: string
          nullable: true
        pointsOfInterest:
          type: array
          items:
            type: object
        radiusInKm:
          type: integer
          format: int32
        registryType:
          type: string
        userGroupId:
          type: string
          nullable: true
      description: Configuration of a recommended location segment.
      nullable: true
    LookalikeRecommendationV1:
      required:
        - seedSegmentId
        - targetSize
        - country
      type: object
      properties:
        country:
          type: string
        seedSegmentId:
          type: string
        targetSize:
          type: integer
          format: int64
      description: Configuration of a recommended lookalike segment.
      nullable: true
  securitySchemes:
    oauth:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.criteo.com/oauth2/token
          scopes:
            MarketingSolutions_Analytics_Read: >-
              Grants Read access to the capabilities from the Analytics domain,
              for MarketingSolutions applications
            MarketingSolutions_Audience_Manage: >-
              Grants Manage access to the capabilities from the Audience domain,
              for MarketingSolutions applications
            MarketingSolutions_Audience_Read: >-
              Grants Read access to the capabilities from the Audience domain,
              for MarketingSolutions applications
            MarketingSolutions_Campaign_Manage: >-
              Grants Manage access to the capabilities from the Campaign domain,
              for MarketingSolutions applications
            MarketingSolutions_Campaign_Read: >-
              Grants Read access to the capabilities from the Campaign domain,
              for MarketingSolutions applications
            MarketingSolutions_Catalog_Manage: >-
              Grants Manage access to the capabilities from the Catalog domain,
              for MarketingSolutions applications
            MarketingSolutions_Catalog_Read: >-
              Grants Read access to the capabilities from the Catalog domain,
              for MarketingSolutions applications
            MarketingSolutions_Creative_Manage: >-
              Grants Manage access to the capabilities from the Creative domain,
              for MarketingSolutions applications
            MarketingSolutions_Creative_Read: >-
              Grants Read access to the capabilities from the Creative domain,
              for MarketingSolutions applications
            MarketingSolutions_OnSiteRecommendation_Read: >-
              Grants Read access to the capabilities from the
              OnSiteRecommendation domain, for MarketingSolutions applications
            MarketingSolutions_Reco_Manage: >-
              Grants Manage access to the capabilities from the Reco domain, for
              MarketingSolutions applications
            MarketingSolutions_Reco_Read: >-
              Grants Read access to the capabilities from the Reco domain, for
              MarketingSolutions applications
        authorizationCode:
          authorizationUrl: https://api.criteo.com/oauth2
          tokenUrl: https://api.criteo.com/oauth2/token
          scopes:
            MarketingSolutions_Analytics_Read: >-
              Grants Read access to the capabilities from the Analytics domain,
              for MarketingSolutions applications
            MarketingSolutions_Audience_Manage: >-
              Grants Manage access to the capabilities from the Audience domain,
              for MarketingSolutions applications
            MarketingSolutions_Audience_Read: >-
              Grants Read access to the capabilities from the Audience domain,
              for MarketingSolutions applications
            MarketingSolutions_Campaign_Manage: >-
              Grants Manage access to the capabilities from the Campaign domain,
              for MarketingSolutions applications
            MarketingSolutions_Campaign_Read: >-
              Grants Read access to the capabilities from the Campaign domain,
              for MarketingSolutions applications
            MarketingSolutions_Catalog_Manage: >-
              Grants Manage access to the capabilities from the Catalog domain,
              for MarketingSolutions applications
            MarketingSolutions_Catalog_Read: >-
              Grants Read access to the capabilities from the Catalog domain,
              for MarketingSolutions applications
            MarketingSolutions_Creative_Manage: >-
              Grants Manage access to the capabilities from the Creative domain,
              for MarketingSolutions applications
            MarketingSolutions_Creative_Read: >-
              Grants Read access to the capabilities from the Creative domain,
              for MarketingSolutions applications
            MarketingSolutions_OnSiteRecommendation_Read: >-
              Grants Read access to the capabilities from the
              OnSiteRecommendation domain, for MarketingSolutions applications
            MarketingSolutions_Reco_Manage: >-
              Grants Manage access to the capabilities from the Reco domain, for
              MarketingSolutions applications
            MarketingSolutions_Reco_Read: >-
              Grants Read access to the capabilities from the Reco domain, for
              MarketingSolutions applications

````