Content Correlation
This guide explains how to useexternal_reference to map generated commentaries back to your content (e.g., bet lines, articles, game events).
The Problem
When you create a topic through the API, you receive atopic_id. But how do you know which of your content items this commentary belongs to when it’s ready?
The Solution: external_reference
Theexternal_reference field allows you to pass your own content identifier when creating topics. This ID is:
- Stored with every share
- Returned in all API responses
- Included in webhook payloads
Creating Topics with external_reference
Validation Rules
| Rule | Details |
|---|---|
| Max length | 256 characters |
| Allowed characters | a-z, A-Z, 0-9, -, _, ., : |
| Case sensitivity | Yes - Bet-123 ≠ bet-123 |
Querying by external_reference
Retrieve all commentaries for a given reference:Idempotency
If you create a topic with the same(external_reference, persona_id) combination, we return the existing share instead of creating a duplicate:
- Retry logic after network failures
- Preventing duplicate commentary requests
- Safely re-running batch jobs
1:N Correlation Model
Oneexternal_reference can have multiple commentaries (one per persona). This supports the common use case of getting multiple analysts’ takes on the same bet line.
Using with Webhooks
Webhooks includeexternal_reference in every payload, making it easy to map callbacks to your content:
metadata Field
Usemetadata to store additional context that’s returned with all responses:
metadata field:
- Accepts any valid JSON object
- Has no size limit (but keep it reasonable)
- Is returned in all responses and webhooks
- Is stored with each share
Complete Integration Flow
Best Practices
- Use meaningful IDs: Make references human-readable for debugging
- Include metadata: Store context you’ll need when receiving webhooks
- Handle duplicates: Check for
duplicatestatus in responses - Query by reference: Use the by-reference endpoint rather than storing topic_ids