CallGrid Bid API - Advanced RTB Integration Guide
The CallGrid Bid API allows custom platforms and developers to send real-time bid requests to CallGrid campaigns.
Updated 5 min read
Browse the knowledge base
On this page
- API Endpoint
- Base URL
- Request Format
- HTTP Headers
- Required Request Parameters
- Request Body Structure
- Optional Request Parameters
- Complete Request Example
- Response Format
- Success Response Structure
- Response Fields
- Response Codes
- Confirmation Step (Usually not Required)
- Confirmation Step URL
- Confirmation Step Parameters
- Confirmation Step Response
- Implementation Guide
- Step 1: Obtain Grid ID
- Step 2: Test Bid URL in browser or with curl.
- Step 3: Implementation.
- Best Practices
- Request Optimization
- Testing Checklist
- Additional Resources
- Support
Overview
The CallGrid Bid API allows custom platforms and developers to send real-time bid requests to CallGrid campaigns. This guide provides the technical specifications for integrating directly with the CallGrid RTB (Real-Time Bidding) system.
Key Features:
- RESTful JSON API
- Real-time bid responses (< 10 ms response times without pings)
- Flexible acceptance criteria
- Support for geographic targeting
- Detailed response codes for handling various scenarios
API Endpoint#
Base URL#
POST or GET https://bid.callgrid.com/api/bid/{Grid-ID}
Parameters:
- {Grid-ID}: The unique Grid identifier provided by your CallGrid buyer
Example:
https://bid.callgrid.com/api/bid/cm97s8hmv000ijt06r4djmije
* Note that you must use the correct Grid ID provided by your buyer.
Request Format#
You can use either GET or POST when sending to the CallGrid Bid API.
If sending through GET simply send the required parameters as URL parameters.
If sending through POST simply send the required data as post data via json or www/url-encoded.
HTTP Headers#
Headers for POST request
Content-Type: application/jsonAccept: application/jsonRequired Request Parameters#
CallerId (Required) - The caller's phone number (10-digit format recommended)
- Example: "3035551234"
InboundStateCode (Optional) - Two-letter state code of the incoming call
- Example: "CO"
Request Body Structure#
Data for post request
{ "CallerId": "+15551234567", "InboundStateCode": "CO"}Note: you can also send this data as URL parameters if sending via the GET method ie:
?CallerId=15551234567&InboundStateCode=CANote: If you cannot send the call over SIP you can pass the "pstn" flag to get a dynamic phone number to which you can send the call. Set { "pstn": true } in the post data or &pstn=true in the url parameters if using GET to request a dynamic phone number instead of a dynamic sip address. When sending a call over ptsn the caller ID must match the one specified in the bid, or the call will be rejected.
Optional Request Parameters#
You can include additional custom parameters based on your buyer's requirements:
{ "CallerId": "+15551234567", "InboundStateCode": "CO", "InboundZipCode": "80301", "age": 38, "CallQualityScore": "95", "CampaignType": "insurance", "PublisherId": "pub123" "pstn": false, // set to true if you cannot send via SIP}Note: To push a Tag through with the bid the Tag must exist in the receiving party's CallGrid account.
Complete Request Example#
Example with curl using POST:
curl -X POST https://bid.callgrid.com/api/bid/cm97s8hmv000ijt06r4djmije \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{ "CallerId": "+15551234567", "InboundStateCode": "CO" }'Example with curl using GET:
curl "https://bid.callgrid.com/api/bid/cm97s8hmv000ijt06r4djmije?CallerId=+15551234567&InboundStateCode=CO"Response Format#
Success Response Structure#
When a bid is accepted, CallGrid returns a JSON response with the following structure:
{ "id":"cmbidlwefyn02316t3nkxnelxz", "code":"1000", "message": "Success", "dynamicBid":"1.00", "dynamicDuration":"10", "expirationSeconds":"100", "payOnDuplicates":false, "dynamicSipAddress":"sip:cmbidlwefyn02316t3nkxnelxz@somewhere.sip.callgrid.com"}{ "id":"cmbidlwefyn02316t3nkxnelxz", "code":"1000", "message": "Success", "dynamicBid":"1.00", "dynamicDuration":"10", "expirationSeconds":"100", "payOnDuplicates":false, "dynamicPhoneNumber":"+1234567890"}Response Fields#
id (string) - The bid id. You will need to capture this if sending a Confirmation request.
code (integer) - Response status code (see Response Codes below)
message (string) - Human-readable message describing the response
dynamicBid (float) - The bid amount offered for the call in USD
dynamicDuration (string) - Phone number where the call should be routed
expirationSeconds (string) - The number of seconds until the bid expires. You must send the call within this time limit.
payOnDuplicates (boolean) - If this call will pay on a duplicate or not.
dynamicSipAddress (string) - The SIP address where the call should be routed.
dynamicPhoneNumber (string) - The Phone Number where the call should be routed. *If using pstn=true.
confirmationRequired (boolean) - If a confirmation step is required.
Response Codes#
Your CallGrid buyer will respond with one of these codes:
- 1000: Bid success - Bid received and created
- 4000 and above: Bid rejected - see the API Error Codes article for more details.
- 5001: Bid Rate Limits
Confirmation Step (Usually not Required)#
Note: Most CallGrid pings do NOT require a Confirmation Step. However, certain Grid IDs can be configured for your buyer to require a confirmation step.
If the response indicates a confirmation step is required (confirmationRequired: true), then you must send a Confirmation request or you will not receive a dynamicSipAddress or dynamicPhoneNumber. You may send additional tags through with the confirmation step. Your buyer might require you to post the CallerId or additional tags on the confirmation step.
Confirmation Step URL#
POST or GET https://bid.callgrid.com/api/bid/confirmation/{Bid-ID}
Parameters:
- {Bid-ID}: The unique Bid "id" returned from the "id" of the Bid Request above.
Example:
https://bid.callgrid.com/api/bid/confirmation/cm42x8hbv109ixtz64jdqmzof
* Note that you must use the correct Bid "id" field returned from the original bid request.
Confirmation Step Parameters #
To send through additional tag data on the confirmation step you can pass the parameters through a GET URL or a POST Body same as described above in the Request Format section. If you already sent certain parameters through on the initial request, you do not need to include them on the confirmation step. CallerId is not required but should be specified if it was not sent in the original request.
Confirmation Step Response#
The response codes and data sent on the confirmation reply are the same as the initial request step.
See the Response Format section above to see the response shape. A successful confirmation step will include a dynamicSipAddress or dynamicPhoneNumber and a code: 1000.
Implementation Guide#
Step 1: Obtain Grid ID#
Before integrating, obtain the Grid ID from your CallGrid buyer:
- Contact your CallGrid buyer/partner
- Request their Grid ID for RTB integration
- Confirm which parameters they expect in bid requests
- Verify their acceptance criteria (minimum bid amounts, geographic restrictions, etc.)
Step 2: Test Bid URL in browser or with curl.#
- Construct your bid URL using the Grid ID provided by buyer
- Test the URL using your browser or CURL using the GET request method.
Step 3: Implementation.#
- Check for code 1000 and map the dynamicSipAddress, dynamicBid, and dynamicDuration to the correct variables in your application.
Best Practices#
Request Optimization#
Send Complete Data:
- Always include CallerId (required)
- Include InboundStateCode or InboundZipCode when available
- Add custom parameters your buyer expects
Testing Checklist#
✓ Verify Grid ID is correct and active
✓ Confirm request includes required CallerId parameter
✓ Test with valid phone numbers (10-digit format)
✓ Verify timeout handling (10 second limit)
✓ Test response code handling (1000, 2000, 3000, 4000, 5000)
✓ Log all bid requests and responses for debugging
Additional Resources#
API Reference:
Platform-Specific Guides:
- Posting Bids from CallGrid to CallGrid
- Posting Bids from Ringba to CallGrid
- Posting Bids from Retreaver to CallGrid
- Receiving Bids in CallGrid
Support:
- Email: support@callgrid.com
- Documentation: callgrid.com/knowledge-base
Support#
For technical assistance with the CallGrid Bid API:
- Review this documentation and test your integration
- Contact your CallGrid buyer to verify Grid ID and requirements
- Reach out to CallGrid support with your integration details and logs
Need Help?
- Technical questions: support@callgrid.com
- Integration assistance: Include your Grid ID and sample requests
- Bug reports: Provide full request/response logs and error messages.
Was this article helpful?
Related articles
- CallGrid MCP: Connect to Claude (Desktop)Connect Claude to your CallGrid account with the hosted MCP server: turn on MCP access, add the connector, sign in once, and start asking about your calls.
- Roku Ads Manager Conversions API IntegrationSend call conversions from CallGrid to Roku Ads Manager with the Roku Advertising webhook template, and test that they arrive.
- Advanced Guide: Ringba to CallGrid RTB with Confirmation StepYou should only follow this guide if your buyer has explicitly told you that a confirmation step is required.