RinglessHub.com
API documentation for lead uploads and campaign integrations.
API reference

Upload leads into a campaign with one POST request.

Use the RinglessHub upload API to push leads directly into an existing campaign. Send JSON, include your API key in the request header, and pass one or more leads in the leads array.

Do not place a real API key in public frontend JavaScript or public docs. Keep API calls server-side whenever possible and replace the placeholder key below with your live key.
Method POST
Content Type application/json
Auth Header X-API-Key
Purpose Lead Upload

Endpoint

Send a JSON request to the upload endpoint with your campaign ID and lead array.

Request URL

POST https://www.ringlesshub.com/api/upload_leads.php

Required Headers

  • Content-Type: application/json
  • X-API-Key: YOUR_API_KEY_HERE

JSON Body

  • campaign_id — integer campaign ID to load the leads into
  • leads — array of lead objects

Lead Fields

  • phone — required phone number
  • first_name — optional
  • last_name — optional
  • make — optional
  • model — optional
  • year — optional
  • vin — optional

cURL Example

This is the cleaned-up version of the example you pasted.

curl -X POST https://www.ringlesshub.com/api/upload_leads.php \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY_HERE" \ -d '{ "campaign_id": 14, "leads": [ { "phone": "3055551212", "first_name": "John", "last_name": "Smith", "make": "Ford", "model": "F150", "year": "2020", "vin": "1FTFW1E50LFA00001" }, { "phone": "9545551212", "first_name": "Mary", "last_name": "Jones", "make": "Toyota", "model": "Camry", "year": "2019", "vin": "4T1B11HK0KU000002" } ] }'

PHP Example

Server-side PHP example using cURL.

<?php $url = 'https://www.ringlesshub.com/api/upload_leads.php'; $apiKey = 'YOUR_API_KEY_HERE'; $payload = [ 'campaign_id' => 14, 'leads' => [ [ 'phone' => '3055551212', 'first_name' => 'John', 'last_name' => 'Smith', 'make' => 'Ford', 'model' => 'F150', 'year' => '2020', 'vin' => '1FTFW1E50LFA00001', ], [ 'phone' => '9545551212', 'first_name' => 'Mary', 'last_name' => 'Jones', 'make' => 'Toyota', 'model' => 'Camry', 'year' => '2019', 'vin' => '4T1B11HK0KU000002', ], ], ]; $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ 'Content-Type: application/json', 'X-API-Key: ' . $apiKey, ], CURLOPT_POSTFIELDS => json_encode($payload), ]); $response = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($response === false) { die('cURL error: ' . curl_error($ch)); } curl_close($ch); echo "HTTP Status: " . $httpCode . PHP_EOL; echo $response;

JavaScript Example

Use this only from a secure backend or private environment.

const response = await fetch('https://www.ringlesshub.com/api/upload_leads.php', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': 'YOUR_API_KEY_HERE' }, body: JSON.stringify({ campaign_id: 14, leads: [ { phone: '3055551212', first_name: 'John', last_name: 'Smith', make: 'Ford', model: 'F150', year: '2020', vin: '1FTFW1E50LFA00001' } ] }) }); const data = await response.json(); console.log(data);

Sample Request Payload

Example JSON body structure.

{ "campaign_id": 14, "leads": [ { "phone": "3055551212", "first_name": "John", "last_name": "Smith", "make": "Ford", "model": "F150", "year": "2020", "vin": "1FTFW1E50LFA00001" } ] }

Example Responses

Use these as documentation examples for success and error cases.

Example Success

{ "success": true, "message": "Leads uploaded successfully.", "campaign_id": 14, "inserted": 2 }

Example Error

{ "success": false, "message": "Invalid API key." }