Download OpenAPI specification:
Mozilla Ad Routing Service
context_id required | string <uuid> An identifier for the user's context. |
required | Array of objects (AdPlacement) non-empty A list of |
blocks | Array of strings A list of strings specifying blocked content. The string values come from the |
object (Consent) An object to specify consent specifiers for this request |
{- "context_id": "12347fff-00b0-aaaa-0978-189231239808",
- "placements": [
- {
- "placement": "placement_1",
- "count": 1,
- "content": {
- "taxonomy": "IAB-1.0",
- "categories": [
- "IAB1-5"
]
}
}
], - "blocks": [
- "CAISEm15IHNwZWNpYWwgc3BvbnNvcg"
], - "consent": {
- "gpp": "string"
}
}
{- "property1": [
- {
- "format": "banner",
- "url": "string",
- "callbacks": {
- "click": "string",
- "impression": "string",
- "report": "string"
}, - "attributions": {
- "partner_id": "string",
- "conversion": {
- "task_id": "string",
- "vdaf": "string",
- "bits": 0,
- "length": 0,
- "time_precision": 0,
- "default_measurement": 0,
- "index": 0
}
}, - "image_url": "string",
- "alt_text": "ACME Corp. Spring Launcher",
- "block_key": "CAISEm15IHNwZWNpYWwgc3BvbnNvcg"
}
], - "property2": [
- {
- "format": "banner",
- "url": "string",
- "callbacks": {
- "click": "string",
- "impression": "string",
- "report": "string"
}, - "attributions": {
- "partner_id": "string",
- "conversion": {
- "task_id": "string",
- "vdaf": "string",
- "bits": 0,
- "length": 0,
- "time_precision": 0,
- "default_measurement": 0,
- "index": 0
}
}, - "image_url": "string",
- "alt_text": "ACME Corp. Spring Launcher",
- "block_key": "CAISEm15IHNwZWNpYWwgc3BvbnNvcg"
}
]
}
Interaction callback URLs are returned in an ad response. When the corresponding action on the client occurs, those URLs should be fetched.
data required | string Encoded interaction data |
placement_id | string Identifier representing the instance of the placement (different identifier than placement from the ad request), used only in special situations. |
position | string Identifier indicating the position of the placement (optional). May be a string or numeric. If a numeric index is used it must be 0-based. |
reason | string Enum: "inappropriate" "not_interested" "seen_too_many_times" Identifier indicating the reason for the ad reporting interaction. Used only for, and required with, the 'report' action. |
Get a list of spocs based on region and pocket_id. The IP address is used to deduce a rough geographic region, for example "Texas" in the U.S. or "England" in the U.K. The IP is not stored or shared to preserve privacy.
site | integer <int32> [ 1 .. 2147483647 ] Example: site=2500 override siteId in ad decision requests |
region | string override region in keywords of ad decision requests for testing |
country | string override country in keywords of ad decision requests for testing |
version required | integer <int32> [ 1 .. 2 ] API version |
consumer_key required | string Identifies that the request is coming from Firefox. |
pocket_id required | string^\{[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}\... ID that uniquely identifies a session. |
Array of objects (Placement) | |
site | integer <int32> [ 1 .. 2147483647 ] override siteId in ad decision requests |
country | string override country in keywords of ad decision requests for testing |
region | string override region in keywords of ad decision requests for testing |
{- "version": 1,
- "consumer_key": "40249-e88c401e1b1f2242d9e441c4",
- "pocket_id": "{12345678-8901-2345-aaaa-bbbbbbcccccc}"
}
{- "settings": {
- "spocsPerNewTabs": 1,
- "domainAffinityParameterSets": {
- "property1": {
- "recencyFactor": 0,
- "frequencyFactor": 0,
- "combinedDomainFactor": 0,
- "perfectFrequencyVisits": 0,
- "perfectCombinedDomainScore": 0,
- "multiDomainBoost": 0,
- "itemScoreFactor": 0
}, - "property2": {
- "recencyFactor": 0,
- "frequencyFactor": 0,
- "combinedDomainFactor": 0,
- "perfectFrequencyVisits": 0,
- "perfectCombinedDomainScore": 0,
- "multiDomainBoost": 0,
- "itemScoreFactor": 0
}
}, - "timeSegments": [
- {
- "id": "string",
- "startTime": 0,
- "endTime": 0,
- "weightPosition": 1
}
], - "feature_flags": {
- "spoc_v2": true,
- "collections": true
}
}, - "__debug__": { },
- "property1": [
- {
- "campaign_id": 784,
- "caps": {
- "lifetime": 50,
- "flight": {
- "count": 10,
- "period": 86400
}, - "campaign": {
- "count": 10,
- "period": 86400
}
}, - "collection_title": "string",
- "context": "Sponsored by AdvertiserName",
- "cta": "Learn more",
- "domain": "mozilla.net",
- "domain_affinities": {
- "vanguard.com": 0.9956,
- "wealthsimple.com": 0.9193
}, - "excerpt": "Driving excerpt",
- "flight_id": 432,
- "id": 30295,
- "is_video": true,
- "item_score": 0.2,
- "min_score": 0.1,
- "parameter_set": "default",
- "personalization_models": { },
- "priority": 1,
- "shim": {
- "click": "1234123asdf4tYadsfQ,xY-01BU12",
- "impression": "a0c3943asdf4tYadsf300,xY-01BU9aadc",
- "delete": "fdea123asdf4tYadsf1000,xY-01BUa654",
- "save": "4567123asdf4tYadsfQcda,xY-01BU123"
}, - "sponsor": "AdvertiserName",
- "sponsored_by_override": "AdvertiserName",
- "title": "Why driving is hard—even for AIs",
}
], - "property2": [
- {
- "campaign_id": 784,
- "caps": {
- "lifetime": 50,
- "flight": {
- "count": 10,
- "period": 86400
}, - "campaign": {
- "count": 10,
- "period": 86400
}
}, - "collection_title": "string",
- "context": "Sponsored by AdvertiserName",
- "cta": "Learn more",
- "domain": "mozilla.net",
- "domain_affinities": {
- "vanguard.com": 0.9956,
- "wealthsimple.com": 0.9193
}, - "excerpt": "Driving excerpt",
- "flight_id": 432,
- "id": 30295,
- "is_video": true,
- "item_score": 0.2,
- "min_score": 0.1,
- "parameter_set": "default",
- "personalization_models": { },
- "priority": 1,
- "shim": {
- "click": "1234123asdf4tYadsfQ,xY-01BU12",
- "impression": "a0c3943asdf4tYadsf300,xY-01BU9aadc",
- "delete": "fdea123asdf4tYadsf1000,xY-01BUa654",
- "save": "4567123asdf4tYadsfQcda,xY-01BU123"
}, - "sponsor": "AdvertiserName",
- "sponsored_by_override": "AdvertiserName",
- "title": "Why driving is hard—even for AIs",
}
]
}
Used when a user opts-out of sponsored content to delete the user's data.
pocket_id required | string ID that uniquely identifies a session. |
{- "pocket_id": "{12345678-8901-2345-aaaa-bbbbbbcccccc}"
}
{- "tiles": [
- {
- "id": 1234,
- "name": "Example COM",
- "image_size": 200,
}
], - "sov": "kdfsi90wfglmnds"
}