CallGrid

CallGrid Bid API - Advanced RTB Integration Guide

Send real-time bids to a CallGrid campaign from your own platform: endpoint, request fields, SIP or phone number, response codes and the confirmation step.

Updated 5 min read

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#

  1. You send a bid request for a caller to the Grid ID the campaign owner gave you.
  2. CallGrid applies the campaign's bid settings, rate limits, duplicate rules, blocklists and bid rules, pings the campaign's buyers and picks a winner.
  3. CallGrid returns a bid response: a bid amount and, unless a confirmation step is required, where to send the call.
  4. You send the call there before the bid expires.

Endpoint#

Text
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/json and Accept: 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.com is separate from the REST API at api.callgrid.com.

Request#

Field

Required

Notes

CallerId

For phone number bids

The caller's phone number. Required when you ask for a phone number (pstn=true), unless the campaign requires a confirmation step, in which case you can send it on the confirmation instead. The campaign's Require Caller ID setting also applies.

InboundStateCode

Optional

Two-letter state. Buyers often filter on state.

InboundZipCode

Optional

Five-digit ZIP.

pstn

Optional

Set to true to get a phone number instead of a SIP address.

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#

Shell
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:

Shell
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

code

1000 means the bid was accepted. Anything else is a rejection (see Response codes).

id

The bid ID. Keep it; you need it for the confirmation step and for troubleshooting.

dynamicBid

The bid amount.

dynamicDuration

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 pstn=true. Map the field name your captured response returns.

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:

Text
GET or POST https://bid.callgrid.com/api/bid/confirmation/{bid_id}
  • {bid_id} is the id from 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 CallerId on 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 pstn on the original bid, not on the confirmation.
  • A successful confirmation returns code 1000 and dynamicPhoneNumber (phone number bids) or dynamicSipAddress (SIP bids).

Example:

Text
GET https://bid.callgrid.com/api/bid/confirmation/BID_ID?CallerId=3035551234&PublisherSubId=abc

Timing 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
  • CallerId is 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.