MediaMath Strategies API

Strategies

OpenAPI Specification

mediamath-strategies-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Campaigns Ad Servers Strategies API
  description: 'MediaMath Campaign Management API


    [Postman Collection](https://apidocs.mediamath.com/guides/postman-collections)

    '
  version: 3.0.1807
  contact:
    url: https://support.infillion.com/
servers:
- url: https://api.mediamath.com/api/v3.0
  description: Live Server
security:
- Auth0:
  - offline_access
  - manage:services
tags:
- name: Strategies
  description: Strategies
paths:
  /strategies:
    post:
      tags:
      - Strategies
      operationId: create-strategy
      summary: Create a Strategy
      description: "Create a strategy. \nIf your use case requires more than 100,000 IPs or postal codes, please contact your MediaMath representative to discuss custom solutions or alternative approaches.\n"
      parameters:
      - $ref: '#/components/parameters/extended'
      requestBody:
        $ref: '#/components/requestBodies/strategy_create'
      responses:
        '201':
          description: Strategy created response
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/strategy'
                - $ref: '#/components/schemas/strategy_extended'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
    get:
      operationId: list-strategies
      summary: List Strategies
      description: Get a list of strategies
      tags:
      - Strategies
      parameters:
      - $ref: '#/components/parameters/strategy_with'
      - $ref: '#/components/parameters/page_limit'
      - $ref: '#/components/parameters/page_offset'
      - $ref: '#/components/parameters/sort_by'
      - $ref: '#/components/parameters/q'
      - $ref: '#/components/parameters/extended'
      - $ref: '#/components/parameters/full'
      - name: live_only
        in: query
        required: false
        description: "If provided and true only strategies with start_date < now and end_date > now will be returned. \nDefault value is false. \nIf use_campaign_start = true campaign.start_date will be used instead of one from strategy.\nIf use_campaign_end = true campaign.end_date will be used instead of one from strategy.\n"
        schema:
          type: boolean
      responses:
        '200':
          description: List strategies response
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/strategy_collection'
                - $ref: '#/components/schemas/strategy_collection_full'
                - $ref: '#/components/schemas/strategy_collection_full_extended'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
  /strategies/{strategy_id}:
    post:
      operationId: update-strategy
      summary: Update a Strategy
      description: 'Update a strategy by ID.

        If your use case requires more than 100,000 IPs or postal codes, please contact your MediaMath representative to discuss custom solutions or alternative approaches.

        '
      tags:
      - Strategies
      parameters:
      - in: path
        name: strategy_id
        schema:
          type: integer
        required: true
        description: Numeric ID of the strategy to update
      - $ref: '#/components/parameters/extended'
      requestBody:
        $ref: '#/components/requestBodies/strategy_update'
      responses:
        '200':
          description: Strategy updated response
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/strategy'
                - $ref: '#/components/schemas/strategy_extended'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
        '409':
          $ref: '#/components/responses/error'
    get:
      operationId: get-strategy
      summary: Get a Strategy
      description: Get a strategy by ID
      tags:
      - Strategies
      parameters:
      - in: path
        name: strategy_id
        schema:
          type: integer
        required: true
        description: Numeric ID of the strategy object to get
      - $ref: '#/components/parameters/extended'
      responses:
        '200':
          description: Strategy response
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/strategy'
                - $ref: '#/components/schemas/strategy_extended'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
  /strategies/{strategy_id}/copy:
    description: Copy a strategy
    post:
      tags:
      - Strategies
      summary: Copy a strategy
      description: Copy a strategy
      parameters:
      - in: path
        name: strategy_id
        schema:
          type: integer
        required: true
        description: Numeric ID of the strategy object
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: boolean
                  description: Indicates the status.
                name:
                  type: string
                  description: Name of the entity.
                duration:
                  type: object
                  properties:
                    start_date:
                      type: string
                      format: date-time
                      description: Start date of the strategy.
                    copy_use_campaign_start:
                      type: boolean
                      description: Indicates if we copy the 'use_campaign_start' field.
                    end_date:
                      type: string
                      format: date-time
                      description: End date of the strategy.
                    copy_use_campaign_end:
                      type: boolean
                      description: Indicates if we copy the 'use_campaign_end' field.
                targeting:
                  type: object
                  properties:
                    copy_geofence:
                      type: boolean
                      description: Indicates if copy geofencing is enabled.
                    copy_contextual:
                      type: boolean
                      description: Indicates if copy contextual targeting is enabled.
                    copy_audience:
                      type: boolean
                      description: Indicates if copy audience targeting is enabled.
                    copy_technology:
                      type: boolean
                      description: Indicates if copy technology targeting is enabled.
                    copy_my_data:
                      type: boolean
                      description: Indicates if copy "my_data" targeting is enabled.
                    copy_location:
                      type: boolean
                      description: Indicates if copy "location" targeting is enabled.
                    copy_day_parts:
                      type: boolean
                      description: Indicates if copy "day_parts" targeting is enabled.
                    copy_postal_codes:
                      type: boolean
                      description: Indicates if copy "postal_codes" targeting is enabled.
                    copy_audio_video:
                      type: boolean
                      description: Indicates if copy "audio_video" targeting is enabled.
                    copy_ip_addresses:
                      type: boolean
                      description: Indicates if copy 'ip_address" targeting is enabled.
                    copy_fold_position:
                      type: boolean
                      description: Indicates if copy 'fold_position' targeting is enabled.
                inventory:
                  type: object
                  properties:
                    copy_supply:
                      type: boolean
                      description: Indicates if a supply is copied.
                    copy_site_lists:
                      type: boolean
                      description: Indicates if site lists are copied.
                    copy_supply_controls:
                      type: boolean
                      description: Indicates if supply controls are copied
                concepts:
                  type: object
                  properties:
                    copy_creative_groups:
                      type: boolean
                      description: Indicates if creative groups are copied
              required:
              - name
              - status
      responses:
        '200':
          description: Strategy copy
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/strategy'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
      operationId: post-copy-strategy
  /strategies/{strategy_id}/healthcheck:
    description: Get strategy health
    get:
      operationId: get-strategy-healthcheck
      summary: Get Strategy Health
      description: Get strategy health
      tags:
      - Strategies
      parameters:
      - in: path
        name: strategy_id
        schema:
          type: integer
        required: true
        description: Numeric ID of the strategy object
      responses:
        '200':
          $ref: '#/components/responses/strategy_healthcheck'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
  /strategies/{strategy_id}/friendly_names:
    description: Get targeting friendly names
    get:
      operationId: get-strategy-friendly-names
      summary: Get Targeting Friendly Names
      description: Get targeting friendly names
      tags:
      - Strategies
      parameters:
      - in: path
        name: strategy_id
        schema:
          type: integer
        required: true
        description: Numeric ID of the strategy object
      responses:
        '200':
          $ref: '#/components/responses/strategy_friendly_names'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
  /strategies/{strategy_id}/forecast_query:
    description: Get forecast query
    get:
      operationId: get-strategy-forecast-query
      summary: Get Forecast Query
      description: Get forecast query
      tags:
      - Strategies
      parameters:
      - in: path
        name: strategy_id
        schema:
          type: integer
        required: true
        description: Numeric ID of the strategy object
      responses:
        '200':
          $ref: '#/components/responses/strategy_forecast_query'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
  /strategies/{strategy_id}/targeting_expression:
    description: Get targeting expression
    get:
      operationId: get-strategy-targeting-expression
      summary: Get Targeting Expression
      description: Get the normalized targeting expression for a strategy.
      tags:
      - Strategies
      parameters:
      - in: path
        name: strategy_id
        schema:
          type: integer
        required: true
        description: Numeric ID of the strategy object
      - in: query
        name: include_inactive
        schema:
          type: boolean
          default: false
        required: false
        description: When true, includes inactive supply sources and strategy targets in the expression. Default behavior filters these out.
      responses:
        '200':
          $ref: '#/components/responses/strategy_targeting_expression'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
  /strategies/{strategy_id}/history:
    get:
      operationId: strategy-audit-log
      summary: Strategy Audit Log
      description: Get a list changes to this strategy
      tags:
      - Strategies
      parameters:
      - $ref: '#/components/parameters/page_limit'
      - $ref: '#/components/parameters/page_offset'
      - in: path
        name: strategy_id
        schema:
          type: integer
        required: true
        description: Numeric ID of the strategy
      responses:
        '200':
          $ref: '#/components/responses/audit_log'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
  /bulk_update/strategies:
    post:
      operationId: bulk-update-strategies
      summary: Bulk Update Strategies
      description: Update multiple strategies
      tags:
      - Strategies
      responses:
        '200':
          $ref: '#/components/responses/strategy_bulk'
        '207':
          description: Multi-status updated strategy list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/strategy_full_response'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      requestBody:
        $ref: '#/components/requestBodies/strategy_bulk_update'
  /strategies/{strategy_id}/permissions:
    get:
      operationId: list-user-permissions-strategy
      summary: List User Permissions for a Strategy
      description: List user permissions for a strategy
      tags:
      - Strategies
      parameters:
      - $ref: '#/components/parameters/page_limit'
      - $ref: '#/components/parameters/page_offset'
      - $ref: '#/components/parameters/sort_by'
      - $ref: '#/components/parameters/q'
      - in: path
        name: strategy_id
        schema:
          type: integer
        required: true
        description: Numeric ID of the strategy
      responses:
        '200':
          description: List user permissions response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/permission_strategy_with_user'
                  meta:
                    $ref: '#/components/schemas/list_metadata'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/error'
  /audit_log/strategies:
    post:
      operationId: strategy-audit-log-bulk
      summary: Bulk Strategy Audit Log
      description: Get a list of changes to these strategies
      tags:
      - Strategies
      parameters:
      - $ref: '#/components/parameters/page_limit'
      - $ref: '#/components/parameters/page_offset'
      responses:
        '200':
          $ref: '#/components/responses/audit_log_bulk'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/error'
        '403':
          $ref: '#/components/responses/error'
      requestBody:
        $ref: '#/components/requestBodies/id_list'
components:
  schemas:
    strategy_segment_group:
      type: object
      properties:
        operator:
          type: string
          enum:
          - AND
        segment_groups:
          type: array
          items:
            type: object
            properties:
              segment_group_id:
                type: integer
                format: int32
                example: 43
      required:
      - segment_groups
      - operator
    supply_source_extended:
      title: ''
      type: object
      properties:
        supply_source_id:
          type: integer
        name:
          type: string
          description: available only when extended
          readOnly: true
        rtb_type:
          type: string
          enum:
          - STANDARD
          - MARKETPLACE
          description: available only when extended
          readOnly: true
      required:
      - supply_source_id
    deal_group:
      title: ''
      type: object
      properties:
        deal_group_id:
          type: integer
          format: int32
          example: 9
      required:
      - deal_group_id
    strategy_pacing:
      type: object
      additionalProperties: false
      properties:
        impression_pacing_type:
          type: string
          enum:
          - even
          - asap
          - no-limit
        impression_pacing_amount:
          type: integer
          minimum: 1
          nullable: true
          format: int32
          example: 23
        impression_pacing_interval:
          type: string
          enum:
          - hour
          - day
        pacing_type:
          type: string
          enum:
          - even
          - asap
        pacing_amount:
          type: number
          format: float
          minimum: 0.01
          maximum: 9999999.99
          nullable: false
        pacing_interval:
          type: string
          enum:
          - hour
          - day
        pacing_optimization_type:
          type: string
          enum:
          - monetary
          - impression
        pacing_optimization_amount:
          type: number
          format: float
          minimum: 0
          maximum: 9999999.99
          nullable: true
        use_dba_strategy_pacing:
          type: string
          enum:
          - always
          - never
          - custom
        use_dba_strategy_pacing_after_date:
          type: string
          format: date
          nullable: true
    permission_flags:
      type: object
      properties:
        create:
          type: boolean
        read:
          type: boolean
        update:
          type: boolean
        delete:
          type: boolean
        inherited_from:
          type: string
    strategy_segment_group_exclude_extended:
      type: object
      properties:
        segment_groups:
          type: array
          items:
            type: object
            properties:
              segment_group_id:
                type: integer
              segment_group_name:
                type: string
      required:
      - segment_groups
    strategy_healthcheck:
      type: object
      properties:
        result:
          type: string
          enum:
          - pass
          - warning
          - fail
        organization:
          type: object
          properties:
            id:
              type: integer
            status:
              type: boolean
            activity_check:
              $ref: '#/components/schemas/healthcheck_result'
        contract:
          type: object
          properties:
            id:
              type: integer
              nullable: true
              description: Null when the organization has no contract on file.
            expiration_date:
              type: string
              format: date-time
              nullable: true
              description: effective_end_date of the contract surfaced by the check; null when no contract was found.
            activity_check:
              $ref: '#/components/schemas/healthcheck_result'
        agency:
          type: object
          properties:
            id:
              type: integer
            status:
              type: boolean
            activity_check:
              $ref: '#/components/schemas/healthcheck_result'
        advertiser:
          type: object
          properties:
            id:
              type: integer
            status:
              type: boolean
            activity_check:
              $ref: '#/components/schemas/healthcheck_result'
        campaign:
          type: object
          properties:
            id:
              type: integer
            status:
              type: boolean
            activity_check:
              $ref: '#/components/schemas/healthcheck_result'
            start_date:
              type: string
              format: date-time
            end_date:
              type: string
              format: date-time
            start_end_date_check:
              $ref: '#/components/schemas/healthcheck_result'
            budget_check:
              $ref: '#/components/schemas/healthcheck_result'
            remaining_budget:
              type: number
              nullable: true
              description: Remaining budget (total_budget − spend_to_date) on the campaign's relevant budget flight; null when no active flight exists.
            currency_code:
              type: string
              nullable: true
              description: Currency of `remaining_budget`, inherited from the relevant budget flight; null when no active flight exists.
        strategy:
          type: object
          properties:
            id:
              type: integer
            status:
              type: boolean
            activity_check:
              $ref: '#/components/schemas/healthcheck_result'
            start_date:
              type: string
              format: date-time
            use_campaign_start:
              type: boolean
            use_campaign_end:
              type: boolean
            end_date:
              type: string
              format: date-time
            start_end_date_check:
              $ref: '#/components/schemas/healthcheck_result'
            budget_check:
              $ref: '#/components/schemas/healthcheck_result'
            remaining_budget:
              type: number
              nullable: true
              description: Strategy budget minus spend-to-date; null when no strategy-level budget cap is set.
            currency_code:
              type: string
              nullable: true
              description: Currency of `remaining_budget`, inherited from the parent campaign; null when no strategy-level cap is set.
            inventory_check:
              $ref: '#/components/schemas/healthcheck_result'
            day_parts_check:
              $ref: '#/components/schemas/healthcheck_result'
            next_active_window_start:
              type: string
              format: date-time
              nullable: true
              description: 'UTC time the next active daypart window will open. Populated only when

                day_parts_check is `warning` (currently outside every active window); null

                otherwise (including when no dayparting is configured).

                '
        creative:
          type: object
          description: 'Collective creative diagnostics. A strategy has many creatives via the

            strategy_concepts → concepts → atomic_creatives path, so there is no single

            creative to point at — only the two pass/fail outcomes.

            '
          properties:
            activity_check:
              description: pass if ≥1 attached creative is active and within its start/end date window.
              allOf:
              - $ref: '#/components/schemas/healthcheck_result'
            approval_check:
              description: pass if ≥1 attached creative has at least one APPROVED row in creative_approvals.
              allOf:
              - $ref: '#/components/schemas/healthcheck_result'
    targeting_ip_addresses:
      type: object
      properties:
        restriction:
          type: string
          example: INCLUDE
          enum:
          - INCLUDE
          - EXCLUDE
          - ''
        codes:
          writeOnly: true
          type: array
          maxItems: 100000
          items:
            type: string
    strategy:
      title: strategy_response
      type: object
      properties:
        data:
          allOf:
          - type: object
            properties:
              inherited_mfa_avoidance:
                type: string
                description: available if mfa_avoidance = INHERIT
                enum:
                - INHERIT
                - ALLOW_ALL
                - EXCLUDE_MFA
              inherited_mfa_from:
                type: string
                description: available if mfa_avoidance = INHERIT
                enum:
                - Organization
                - Agency
                - Advertiser
                - Campaign
                - Strategy
          - $ref: '#/components/schemas/strategy_campaign_info'
          - $ref: '#/components/schemas/strategy_full_response'
        meta:
          $ref: '#/components/schemas/single_metadata'
    strategy_campaign_info:
      type: object
      properties:
        campaign_name:
          type: string
          readOnly: true
        campaign_start_date:
          type: string
          format: date-time
          readOnly: true
        campaign_end_date:
          type: string
          format: date-time
          readOnly: true
        campaign_zone_name:
          type: string
          readOnly: true
        campaign_service_type:
          type: string
          readOnly: true
        campaign_goal_type:
          type: string
          readOnly: true
        campaign_goal_value:
          type: number
          format: float
          readOnly: true
        campaign_merit_pixel_id:
          type: integer
          nullable: true
          readOnly: true
        viewability:
          type: object
          readOnly: true
          properties:
            sample_rate:
              type: number
              format: float
              readOnly: true
            type:
              type: string
              readOnly: true
              example: AUTO_TAG
            vendor_id:
              type: integer
              readOnly: true
    strategy_collection_full_extended:
      type: object
      title: strategy_collection_full_extended
      properties:
        data:
          type: array
          items:
            allOf:
            - $ref: '#/components/schemas/strategy_campaign_info'
            - $ref: '#/components/schemas/strategy_full_extended'
        meta:
          $ref: '#/components/schemas/list_metadata'
    strategy_collection:
      type: object
      title: strategy_collection
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              entity_type:
                type: string
              name:
                type: string
        meta:
          $ref: '#/components/schemas/list_metadata'
    deal:
      title: ''
      type: object
      properties:
        deal_id:
          type: integer
          format: int32
          example: 8
      required:
      - deal_id
    targeting_friendly_name:
      type: object
      properties:
        friendly_name:
          type: string
        vendor_id:
          type: integer
        vendor_name:
          type: string
        target_id:
          type: string
        dimension_id:
          type: integer
          format: int32
        dimension_code:
          type: string
        tuple:
          type: string
    strategy_my_data_extended:
      type: object
      title: ''
      properties:
        operator:
          type: string
          enum:
          - AND
          - OR
          default: OR
        pixels:
          type: array
          items:
            type: object
            properties:
              pixel_id:
                type: integer
              pixel_name:
                type: string
                description: available only when extended
                readOnly: true
              pixel_type:
                type: string
                enum:
                - event
                - data
                - dynamic
                description: available only when extended
                readOnly: true
              owner_type:
                type: string
                enum:
                - advertiser
                - agency
                description: available only when extended
                readOnly: true
              owner_id:
                type: integer
                description: available only when extended
                readOnly: true
              owner_name:
                type: string
                description: available only when extended
                readOnly: true
            required:
            - pixel_id
      required:
      - pixels
    strategy_duration:
      type: object
      additionalProperties: false
      description: Duration of strategy must not exceed 36 months
      properties:
        use_campaign_start:
          type: boolean
        use_campaign_end:
          type: boolean
        start_date:
          type: string
          format: date-time
          nullable: true
        end_date:
          type: string
          format: date-time
          nullable: true
    strategy_my_data:
      type: object
      title: ''
      properties:
        operator:
          type: string
          enum:
          - AND
          - OR
          default: OR
        pixels:
          type: array
          items:
            type: object
            properties:
              pixel_id:
                type: integer
                format: int32
                example: 65
            required:
            - pixel_id
      required:
      - pixels
    strategy_frequency:
      type: object
      additionalProperties: false
      properties:
        frequency_type:
          type: string
          enum:
          - even
          - asap
          - no-limit
          - t1-optimized
          - frequency_goal
          default: no-limit
        frequency_interval:
          type: string
          enum:
          - hour
          - day
          - week
          - month
          - not-applicable
          nullable: true
          default: not-applicable
        frequency_amount:
          type: integer
          nullable: true
          format: int32
          example: 345
        frequency_optimization:
          type: boolean
          default: false
    domain_restriction:
      type: object
      required:
      - domain
      - target_type
      properties:
        domain:
          type: string
          example: www.mediamath.com
        target_type:
          type: string
          enum:
          - DOMAIN
          - APP
    permission:
      type: object
      properties:
        id:
          type: integer
        create:
          type: boolean
        read:
          type: boolean
        update:
          type: boolean
        delete:
          type: boolean
        propogate:
          type: boolean
    error_response:
      title: error response
      type: object
      required:
      - errors
      - meta
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              field:
                description: Optional when it is a schema error
     

# --- truncated at 32 KB (84 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/mediamath/refs/heads/main/openapi/mediamath-strategies-api-openapi.yml