This guide is for developers sending real-time bid requests into a CallGrid bidding campaign from a custom platform. It covers the endpoint, the request, the response, the optional confirmation step and testing.
If you send bids from Ringba or Retreaver, use the platform guides instead:
If you are on CallGrid yourself, see Posting Bids from CallGrid to CallGrid using RTB.
How a bid flows#
- You send a bid request for a caller to the Grid ID the campaign owner gave you.
- CallGrid applies the campaign's bid settings, rate limits, duplicate rules, blocklists and bid rules, pings the campaign's buyers and picks a winner.
- CallGrid returns a bid response: a bid amount and, unless a confirmation step is required, where to send the call.
- You send the call there before the bid expires.
Endpoint#
POST https://bid.callgrid.com/api/bid/{Grid-ID}{Grid-ID}identifies your source on the campaign. The campaign owner copies it from the campaign's Sources tab and gives it to you.- You can also send a GET request with the fields as URL parameters.
- Headers for POST:
Content-Type: application/jsonandAccept: application/json. - The Grid ID is the only authentication. Do not send API keys or Bearer tokens to the bid endpoint, and keep Grid IDs server side.
- The bid host
bid.callgrid.comis separate from the REST API atapi.callgrid.com.
Request#
Field | Required | Notes |
|---|---|---|
| For phone number bids | The caller's phone number. Required when you ask for a phone number ( |
| Optional | Two-letter state. Buyers often filter on state. |
| Optional | Five-digit ZIP. |
| Optional | Set to |
Custom fields | Optional | Any extra data the campaign owner expects, such as a publisher ID. |
SIP address or phone number#
CallGrid returns a SIP address by default. If you cannot send the call over SIP, send "pstn": true in the POST body (or &pstn=true on a GET) to get a phone number instead. The phone number is reserved for the Caller ID on the bid, so the call you send must carry that same Caller ID or it is rejected. Retreaver is detected automatically and gets a phone number without the flag.
Custom fields#
A custom field is kept only if a tag with exactly that name exists in the campaign owner's CallGrid account; anything else is dropped. Tag names are case sensitive. Agree the field names with the campaign owner before you go live.
Example#
curl -X POST https://bid.callgrid.com/api/bid/YOUR_GRID_ID \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{ "CallerId": "3035551234", "InboundStateCode": "CO", "InboundZipCode": "80301", "PublisherId": "pub123", "pstn": false }'The same request as a GET:
curl "https://bid.callgrid.com/api/bid/YOUR_GRID_ID?CallerId=3035551234&InboundStateCode=CO"Response#
Send a test bid and capture the raw response before you build your parsing. The values to read are:
Value | What it is |
|---|---|
|
|
| The bid ID. Keep it; you need it for the confirmation step and for troubleshooting. |
| The bid amount. |
| The call duration the bid requires. It is not a phone number. |
Routing target | The SIP address to send the call to, or a phone number with |
These are the fields CallGrid's own ping template maps when one CallGrid account bids into another. Your response may include other fields; map the ones your captured response returns.
Response codes#
Code | Meaning |
|---|---|
1000 | Success, the bid was accepted |
4001 | Disabled: missing or unknown Grid ID, or source not found |
4002 | Campaign, source or grid is paused |
4003 | Invalid caller ID |
4004 | Capacity check failed: every buyer capped, or no buyer accepted the ping |
4005 | Duplicate: the caller was already paid out |
4006 | No phone numbers available for PSTN |
4007 | Caller blocked |
4008 | Duplicate bid |
4009 | Failed tag rules |
4010 | Bid not found (confirmation) |
4011 | Bid expired (confirmation) |
4012 | Bid does not require confirmation |
4013 | All destinations closed |
5001 | Rate limit exceeded (HTTP 429) |
See Call Bidding Error Codes Explained for what to do about each one.
Confirmation step#
Most Grid IDs do not need this. If the campaign owner turns on Require Confirmation Post, the bid response does not include where to send the call, and you must confirm first:
GET or POST https://bid.callgrid.com/api/bid/confirmation/{bid_id}{bid_id}is theidfrom the bid response.- You can add tag data, as URL parameters on a GET or in the body on a POST. Only custom tags can be added or changed on the confirmation; values collected on the bid are kept.
- For phone number bids, send
CallerIdon the confirmation if you did not send it on the bid. It cannot replace a Caller ID sent on the bid. A phone number confirmation with no Caller ID is rejected. - Send
pstnon the original bid, not on the confirmation. - A successful confirmation returns
code1000 anddynamicPhoneNumber(phone number bids) ordynamicSipAddress(SIP bids).
Example:
GET https://bid.callgrid.com/api/bid/confirmation/BID_ID?CallerId=3035551234&PublisherSubId=abcTiming and limits#
- Send the call before the bid expires. The campaign owner sets Bid Expiration (a new bidding campaign starts at 20 seconds; the setting accepts 10 to 120 seconds) and what happens to late calls.
- The campaign owner can cap bid requests per minute, hour or day. Requests over the cap return 5001 with HTTP 429; back off and stay under the agreed rate.
- Do not re-send the same Caller ID to the same Grid ID in a loop; duplicate rules will reject it.
- Set your own request timeout and route the call elsewhere if CallGrid does not answer in time.
Testing checklist#
- Grid ID is correct and the source is active
CallerIdis sent on phone number bids (or on the confirmation, if one is required)- Raw response captured and parsing built against it
- Code handling covers 1000, 4001 to 4013 and 5001
- Confirmation URL tested, if the campaign requires it
- Test calls arrive before the bid expires
- Requests and responses logged for debugging
- Campaign owner sees your test bids in Reports > Bids
Do it with AI#
The campaign owner can ask Claude or ChatGPT through the CallGrid connector: "Show the last 20 bids from my source and why any were rejected." Setup guides: Claude and ChatGPT. The connector is read only. It looks things up; settings are changed in CallGrid.
Stuck on a step? Ask Griddy.