Assignment API
Authentication
Section titled “Authentication”All API requests must include a Bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEY_HEREIf the key is missing, invalid, or of the wrong type, the server will return a 401 Unauthorized or 403 Forbidden response.
Base URL
Section titled “Base URL”https://api.outboundiq.cloudEndpoints
Section titled “Endpoints”Get Next ANI
Section titled “Get Next ANI”Requests the next outbound caller ID (ANI) to use when dialing a prospect. The selector geo-matches the prospect against your inventory and returns the best available number.
- Method:
POST - URL:
/assignment - Headers:
Authorization: Bearer YOUR_API_KEY_HEREContent-Type: application/json
Body Schema:
type Payload = { // The prospect / customer phone number you are about to dial (10-15 digits) prospect_phone: string;
// Optional US zip code for the prospect — improves geo-matching prospect_zip?: string;
// The campaign identifier from your dialer platform (as saved in outboundIQ). // Optional if a default campaign is configured on your API key. dialer_campaign?: string;
// Set to true for real-time / interactive assignment flows real_time?: boolean;};Body Example:
{ "prospect_phone": "5559876543", "prospect_zip": "90210", "dialer_campaign": "9001", "real_time": false}Success Response:
{ "success": true, "ani": "2345678901", "message": "ANI assigned successfully"}Failure Response:
{ "success": false, "message": "No available ANI found"}Example
Section titled “Example”curl -X POST \ https://api.outboundiq.cloud/assignment \ -H 'Authorization: Bearer YOUR_API_KEY_HERE' \ -H 'Content-Type: application/json' \ -d '{ "prospect_phone": "5559876543", "prospect_zip": "90210", "dialer_campaign": "9001", "real_time": false }'Get Next ANI (Batch)
Section titled “Get Next ANI (Batch)”Assigns ANIs for a batch of prospects in a single request. Useful for bulk list loading where many leads need an outbound caller ID at once. Each lead is processed independently — partial successes are reported per row.
- Method:
POST - URL:
/assignment/batch - Headers:
Authorization: Bearer YOUR_API_KEY_HEREContent-Type: application/json
Body Schema:
type Payload = { // Set to true for real-time / interactive assignment flows real_time?: boolean;
// Array of leads to assign ANIs for leads: Array<{ // Your identifier for this row — echoed back in the response row_id: string;
// The prospect / customer phone number (10-15 digits) prospect_phone: string;
// Optional US zip code for the prospect — improves geo-matching prospect_zip?: string;
// The campaign identifier from your dialer platform (as saved in outboundIQ). // Optional if a default campaign is configured on your API key. dialer_campaign?: string; }>;};Body Example:
{ "real_time": false, "leads": [ { "row_id": "lead-1", "prospect_phone": "5559876543", "prospect_zip": "90210", "dialer_campaign": "9001" }, { "row_id": "lead-2", "prospect_phone": "5551234567", "prospect_zip": "10001", "dialer_campaign": "9001" } ]}Success Response:
{ "success": true, "results": [ { "row_id": "lead-1", "outboundani": "2345678901", "error": "" }, { "row_id": "lead-2", "outboundani": "", "error": "No available ANI found" } ]}Each entry in results corresponds to one lead from the request. A row is considered successful when error is empty; otherwise outboundani will be an empty string and error explains why.
Example
Section titled “Example”curl -X POST \ https://api.outboundiq.cloud/assignment/batch \ -H 'Authorization: Bearer YOUR_API_KEY_HERE' \ -H 'Content-Type: application/json' \ -d '{ "real_time": false, "leads": [ { "row_id": "lead-1", "prospect_phone": "5559876543", "prospect_zip": "90210", "dialer_campaign": "9001" }, { "row_id": "lead-2", "prospect_phone": "5551234567", "prospect_zip": "10001", "dialer_campaign": "9001" } ] }'