curl --request POST \
--url https://api.leadping.ai/sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"defaultTagIds": [
"<string>"
],
"defaultTagNames": [
"<string>"
]
}
'import requests
url = "https://api.leadping.ai/sources"
payload = {
"defaultTagIds": ["<string>"],
"defaultTagNames": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.leadping.ai/sources");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"defaultTagIds\": [\n \"<string>\"\n ],\n \"defaultTagNames\": [\n \"<string>\"\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.leadping.ai/sources")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"defaultTagIds\": [\n \"<string>\"\n ],\n \"defaultTagNames\": [\n \"<string>\"\n ]\n}")
.asString();const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({defaultTagIds: ['<string>'], defaultTagNames: ['<string>']})
};
fetch('https://api.leadping.ai/sources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leadping.ai/sources"
payload := strings.NewReader("{\n \"defaultTagIds\": [\n \"<string>\"\n ],\n \"defaultTagNames\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadping.ai/sources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'defaultTagIds' => [
'<string>'
],
'defaultTagNames' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"source": {
"isDemo": true,
"dailyLeadLimit": 123,
"description": "<string>",
"enabled": true,
"apiKeyPreview": "<string>",
"apiKeyRotatedAt": "2023-11-07T05:31:56Z",
"firstLeadReceivedAt": "2023-11-07T05:31:56Z",
"lastLeadReceivedAt": "2023-11-07T05:31:56Z",
"user": {
"id": "<string>",
"name": "<string>"
},
"createdByUser": {
"id": "<string>",
"name": "<string>"
},
"createdByUserEmail": "jsmith@example.com",
"modifiedByUser": {
"id": "<string>",
"name": "<string>"
},
"organization": {
"id": "<string>",
"name": "<string>"
},
"costPerLead": 123,
"automaticPhoneLookup": true,
"automaticConsentValidation": true,
"requiresTrustedForm": true,
"complianceApproved": true,
"defaultTagIds": [
"<string>"
],
"defaultTags": [
{
"id": "<string>",
"name": "<string>",
"normalizedName": "<string>",
"color": "<string>"
}
],
"name": "<string>",
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"modifiedAt": "2023-11-07T05:31:56Z"
},
"secret": "<string>"
}{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "The request could not be completed."
}Create an organization lead intake source
Creates a lead source for the current organization, storing intake credentials and routing context for captured external leads.
curl --request POST \
--url https://api.leadping.ai/sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"defaultTagIds": [
"<string>"
],
"defaultTagNames": [
"<string>"
]
}
'import requests
url = "https://api.leadping.ai/sources"
payload = {
"defaultTagIds": ["<string>"],
"defaultTagNames": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.leadping.ai/sources");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"defaultTagIds\": [\n \"<string>\"\n ],\n \"defaultTagNames\": [\n \"<string>\"\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.leadping.ai/sources")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"defaultTagIds\": [\n \"<string>\"\n ],\n \"defaultTagNames\": [\n \"<string>\"\n ]\n}")
.asString();const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({defaultTagIds: ['<string>'], defaultTagNames: ['<string>']})
};
fetch('https://api.leadping.ai/sources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leadping.ai/sources"
payload := strings.NewReader("{\n \"defaultTagIds\": [\n \"<string>\"\n ],\n \"defaultTagNames\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadping.ai/sources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'defaultTagIds' => [
'<string>'
],
'defaultTagNames' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"source": {
"isDemo": true,
"dailyLeadLimit": 123,
"description": "<string>",
"enabled": true,
"apiKeyPreview": "<string>",
"apiKeyRotatedAt": "2023-11-07T05:31:56Z",
"firstLeadReceivedAt": "2023-11-07T05:31:56Z",
"lastLeadReceivedAt": "2023-11-07T05:31:56Z",
"user": {
"id": "<string>",
"name": "<string>"
},
"createdByUser": {
"id": "<string>",
"name": "<string>"
},
"createdByUserEmail": "jsmith@example.com",
"modifiedByUser": {
"id": "<string>",
"name": "<string>"
},
"organization": {
"id": "<string>",
"name": "<string>"
},
"costPerLead": 123,
"automaticPhoneLookup": true,
"automaticConsentValidation": true,
"requiresTrustedForm": true,
"complianceApproved": true,
"defaultTagIds": [
"<string>"
],
"defaultTags": [
{
"id": "<string>",
"name": "<string>",
"normalizedName": "<string>",
"color": "<string>"
}
],
"name": "<string>",
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"modifiedAt": "2023-11-07T05:31:56Z"
},
"secret": "<string>"
}{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "The request could not be completed."
}Authorizations
Authorization header using the Bearer scheme. Accepted values are Leadping user JWT access tokens and WorkOS organization API keys beginning with sk_.
Body
The source data to create.
Defines the fields clients can send when working with lead source.
Tag IDs automatically assigned to leads created by this source.
Tag names automatically assigned to leads created by this source.
Human-readable source name.
Maximum new leads accepted per UTC day. Null means unlimited; zero pauses intake.
Human-readable description that explains this lead source request to API users.
Whether to look up lead phone numbers during intake. When disabled, lookup is required before calling or texting.
Whether to validate consent certificates during intake. Skipped validation leaves consent unverified.
Indicates whether leads from this source must include a TrustedForm or Leadping Consent certificate for consent proof.

