Skip to main content
POST
Bid Request (v2)

Headers

Request

Required: version ("2.0"), id, opportunities. Everything else is optional. Unknown fields are refused.

context

A conversation is described by messages, a summary, keywords, or any mix of them. Send everything you have: more context means better matches. Context doesn’t guarantee an ad: targeting and campaign budgets still apply. Send context.id when you have one. Without it you still get ads, but we can’t pace ads or avoid repeats within a conversation. Without messages, send chat.turn_number if you can. Otherwise ad-offset rules (“no ad before turn N”) can’t apply. None of them means the ad is shown before the conversation starts. That request serves card only: asking for any other format is refused with 400, and so is a turn_number above 0 without a conversation.

opportunities

image takes no options: send {}. Every image is square (1:1), and there is no minimum size. A listed part may still be missing from a bid, for example a card with no photo. A part you leave out never comes back. A card may also carry a cta, which you can’t list. Only the first opportunity is auctioned. The rest come back with no_bid_reason: "multi_slot_not_supported".

user

The entire user block can be omitted. Without user.id, contextual matching still works, as does chat pacing when context.id is supplied. User-based retargeting, campaign repeat limits, per-user abuse limits, and user-linked transcript storage are skipped. We do not generate an ID. Age checks still apply if an age is supplied without an ID. Hashes are lowercase 64-character hex. Anything else is refused, so an unhashed address never reaches us. See User & Chat Identification for the exact hashing steps.

device

The end user’s device, never your server. Every field is optional, and the whole block can be left out.
Always send geo.country. Without the user’s country, every campaign that targets a country is skipped. ip is only the fallback.
Always send type and os. Without them, device-targeted campaigns can’t match. user_agent is only the fallback.
Send these on every request. They decide which campaigns can bid at all. Where there is a fallback, it often comes up empty, and then every campaign that targets that field is skipped. Send these when you have them. Leave geo out and we look the user up from device.ip. Leave both out and the user’s country is unknown. No header describes the end user. X-Forwarded-For, User-Agent and Accept-Language on your request are ignored: from your server they describe your server.

device.ip

Send exactly one bare address: IPv4 in dotted form (8.8.8.8) or IPv6 in any standard notation (2606:4700:4700::1111). Anything else is a 400 invalid_request naming device.ip: The address must be the end user’s public one. These ranges are refused, and the error names the range:
The documentation ranges (192.0.2.x, 198.51.100.x, 203.0.113.x, 2001:db8::) are what examples and test fixtures usually use, so they are the ones most often hit by accident. To test from your laptop, send your own public IP.

Screen and network

screen, manufacturer, connection_type and mccmnc describe the device’s hardware and network. Leave a field out when you can’t read it; never estimate it. A value outside the rules below is a 400 invalid_request. screen is the whole physical display, not the window or the safe area, measured in portrait. width is the short edge and height the long one, however the device is held, so width > height is refused. Both are required inside screen, as whole numbers of physical pixels from 100 to 20,000. pixel_ratio is optional, from 0.5 to 5. manufacturer is lowercase, 1–100 characters, with no surrounding spaces: apple, samsung. Anything with an uppercase letter is refused. connection_type is the network the device is on now. Send cellular when you can’t tell the generation; never guess one. On a VPN or tethering, leave it out. mccmnc says which mobile operator issued the user’s SIM card. Every operator has a fixed code made of two parts: the MCC (Mobile Country Code, three digits, the country) and the MNC (Mobile Network Code, two or three digits, the operator in that country). Send them joined by a hyphen. "310-260" is T-Mobile US, "234-15" is Vodafone UK. It must match ^[2-7]\d{2}-\d{2,3}$, and it is a string, never a number. It is the SIM’s home operator, so it doesn’t change when the user roams.

surface

Where the ad is shown: an app, a web page or a browser extension. Optional, but once you send it, type is required along with the fields that type needs.
Each type needs its own fields, and refuses the fields another type owns. Anything missing or extra is a 400. store must fit device.os: apple with ios or macos; google, amazon, samsung or huawei with android; microsoft with windows.

Optional mobile navigation declarations

Declare only support your publisher client actually implements. Missing declarations mean unknown; explicit false means unsupported. They do not grant tracking permission, establish attribution or activate a store-handoff route. No additional consent or advertising-ID field is required for these declarations. When supplied, capabilities must contain at least one known member, with JSON boolean values (true or false). Unknown members and incompatible platform combinations are refused. Keep the returned action URL and tracker methods unchanged; capability declarations do not authorize rewriting them.

privacy

The consent signals you collected for this user. Every field is optional. Leaving one out means unknown, not “no”.
A dropped ID doesn’t fail the request: we still look for an ad, just without the ID. Leave both fields out and the ID is passed on as sent.

Response

A carousel has 3–5 assets.items, each with title, image, optional price (amount as a string, currency) and its own actions.click_url. It has no bid-level click_url.
A poll has assets.question, 2 or more assets.options (each id and text) and an optional cta. Its actions always carry a vote_url. When the user picks an option, POST {"option_id": "<id>"} to vote_url: see Poll Voting. click_url, when present, is for the cta.

No-bid reasons

New values may be added. Treat one you don’t know as no_fill.

Auction notices

Every bid comes with a win_url and a loss_url. You don’t have to call them. Call them only if you run your own auction on your side (header bidding), where our bid competes with bids from other SSPs. If you just show our ad, skip this section: the trackers are all you need.
If you do run your own auction, tell us how our bid did. Call one of these, once, per bid: Use the URLs exactly as given. Both always answer 204. Codes are OpenRTB 2.5 §5.25, plus our own 500.

Errors

Branch on code, never on message. fields appears only for invalid_request.