Skip to main content

Postman Collection Guide

This document explains how to use the Teads AI Chatbot SDK Postman Collection to test and validate Measurement, Publisher (Organic), and Marketer (Paid) API integrations.


1. Overview

The Postman collection includes four main folders:

FolderDescription
MeasurementTest SDK event tracking (load, view, click)
Publisher (Organic)Fetch non-paid organic content recommendations
Marketer (Paid)Fetch paid ad recommendations
Combined FlowsSimulate full chatbot lifecycle (load → organic → paid)

Each request is preconfigured with dynamic variables and testMode=true for safe QA testing.


2. Download and Import

Download JSON Collection:
teads-ai-chatbot-sdk-postman-collection.json

To import into Postman:

  1. Open Postman.
  2. Click Import → Upload Files.
  3. Select the downloaded .json file.
  4. Postman will automatically create the folder structure and environment variables.

3. Variables Overview

VariableExampleDescription
base_urlhttps://mv.outbrain.comRoot API endpoint
base_path/Multivac/api/platformsBase path for all requests
contentUrlhttps://example.comThe canonical page/chatbot URL
contentUrlEncoded(auto-generated)URI-encoded version of contentUrl
measurement_keyabcd123-measureAPI key for measurement events
content_keyabcd456-contentAPI key for organic/paid flows
measurement_widget_idwidget-measure-01Widget ID for measurement flow
organic_widget_idwidget-organic-01Widget ID for organic flow
paid_widget_idwidget-paid-01Widget ID for paid flow
newslatestOrganic news filter
newsFromUSOrigin country for content
extidchatbot_loadEvent type for measurement
testModetrueEnables sandbox mode

4. Measurement Flow

Example: Measurement — chatbot_load

  • Fires a single event for chatbot initialization.
  • Uses measurement key and widget ID.
  • Response body can be ignored.
GET https://mv.outbrain.com/Multivac/api/platforms?contentUrl={{contentUrlEncoded}}&key={{measurement_key}}&widgetJSId={{measurement_widget_id}}&idx=0&format=vjnc&cors=true&extid=chatbot_load&testMode=true

Other Measurement Events

EventPurpose
unit_viewWhen ≥50% of unit visible for 1s
unit_clickWhen user clicks a recommendation

5. Publisher (Organic) Flow

Purpose: Fetch organic recommendations.

GET https://mv.outbrain.com/Multivac/api/platforms?contentUrl={{contentUrlEncoded}}&key={{content_key}}&widgetJSId={{organic_widget_id}}&idx=0&format=vjnc&cors=true&news={{news}}&newsFrom={{newsFrom}}&testMode=true
  • newsFrom can be customized by user geolocation.
  • Responses use the vjnc JSON schema.

6. Marketer (Paid) Flow

Purpose: Fetch paid ad recommendations.

GET https://mv.outbrain.com/Multivac/api/platforms?contentUrl={{contentUrlEncoded}}&key={{content_key}}&widgetJSId={{paid_widget_id}}&idx=0&format=vjnc&cors=true&testMode=true
  • Uses paid widget ID.
  • Paid recommendations usually start with http://paid.outbrain.com/... in their redirect URLs.

7. Combined Flow (Full Chatbot Lifecycle)

Simulate an entire chatbot session using three chained requests:

  1. Fire chatbot_load event (Measurement API)
  2. Fetch organic content (Publisher API)
  3. Fetch paid content (Marketer API)

All three requests can be run sequentially in the Combined Flows → load + organic + paid folder.


8. Pre-request Script

Each request runs a pre-request script that automatically encodes your contentUrl into contentUrlEncoded:

const raw = pm.variables.get('contentUrl') || '';
const enc = encodeURIComponent(raw.replace(/[#?].*$/, '')); // remove query/fragments
pm.collectionVariables.set('contentUrlEncoded', enc);

You do not need to encode it manually.


9. Environment Setup (Optional)

You can create a Postman Environment for each stage:

VariableDev ExampleProd Example
contentUrlhttps://dev.example.comhttps://example.com
measurement_keydev-measure-keyprod-measure-key
content_keydev-content-keyprod-content-key
testModetruefalse

10. Response Validation

FieldDescription
doc.urlTarget redirect for clicks
doc.orig_urlOriginal article destination
doc.pixelsTracking pixel URLs
doc.jsTrackersOptional JS trackers
doc.clickTrackersFired when user clicks

11. Troubleshooting

IssueCauseResolution
403 ForbiddenInvalid key or widget IDVerify credentials with Teads
Empty JSONMissing required paramCheck news, format, or cors
CORS blockedMissing cors=trueAdd query param
Clicks not trackedModified redirect URLUse doc.url exactly as returned

12. Best Practices

  • Use testMode=true during QA and staging.
  • Ensure all requests use HTTPS.
  • Keep API keys private and server-injected.
  • Run Measurement events within 3 minutes of content render.

FileDescription
Getting Started GuideIntroductory SDK setup instructions
Integration GuideEnd-to-end integration details
Privacy GuideData handling and compliance requirements
Settings FileEnvironment configuration and variables
Examples FileReady-to-use language examples

© 2025 Teads AI Platform. All rights reserved.