Add a new lead to campaign
curl --request POST \
--url https://adscrush-api.anonymoussherlock.workers.dev/api/v1/leads \
--header 'API_KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"phone": "<string>",
"s1": "<string>",
"lp_name": "<string>",
"address": "<string>"
}
'import requests
url = "https://adscrush-api.anonymoussherlock.workers.dev/api/v1/leads"
payload = {
"name": "<string>",
"phone": "<string>",
"s1": "<string>",
"lp_name": "<string>",
"address": "<string>"
}
headers = {
"API_KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {API_KEY: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
phone: '<string>',
s1: '<string>',
lp_name: '<string>',
address: '<string>'
})
};
fetch('https://adscrush-api.anonymoussherlock.workers.dev/api/v1/leads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://adscrush-api.anonymoussherlock.workers.dev/api/v1/leads",
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([
'name' => '<string>',
'phone' => '<string>',
's1' => '<string>',
'lp_name' => '<string>',
'address' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"API_KEY: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://adscrush-api.anonymoussherlock.workers.dev/api/v1/leads"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"s1\": \"<string>\",\n \"lp_name\": \"<string>\",\n \"address\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API_KEY", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://adscrush-api.anonymoussherlock.workers.dev/api/v1/leads")
.header("API_KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"s1\": \"<string>\",\n \"lp_name\": \"<string>\",\n \"address\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://adscrush-api.anonymoussherlock.workers.dev/api/v1/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API_KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"s1\": \"<string>\",\n \"lp_name\": \"<string>\",\n \"address\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"order_id": "rec_crlh9b3n9o8uin0cj1kg"
}{
"success": false,
"error": "validation",
"message": "Invalid input data"
}{
"success": false,
"error": "unauthorized",
"message": "Authentication failed"
}{
"success": false,
"error": "error",
"message": "An unexpected error occurred"
}Leads endpoints
Create lead
Add a new lead to campaign
POST
/
v1
/
leads
Add a new lead to campaign
curl --request POST \
--url https://adscrush-api.anonymoussherlock.workers.dev/api/v1/leads \
--header 'API_KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"phone": "<string>",
"s1": "<string>",
"lp_name": "<string>",
"address": "<string>"
}
'import requests
url = "https://adscrush-api.anonymoussherlock.workers.dev/api/v1/leads"
payload = {
"name": "<string>",
"phone": "<string>",
"s1": "<string>",
"lp_name": "<string>",
"address": "<string>"
}
headers = {
"API_KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {API_KEY: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
phone: '<string>',
s1: '<string>',
lp_name: '<string>',
address: '<string>'
})
};
fetch('https://adscrush-api.anonymoussherlock.workers.dev/api/v1/leads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://adscrush-api.anonymoussherlock.workers.dev/api/v1/leads",
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([
'name' => '<string>',
'phone' => '<string>',
's1' => '<string>',
'lp_name' => '<string>',
'address' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"API_KEY: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://adscrush-api.anonymoussherlock.workers.dev/api/v1/leads"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"s1\": \"<string>\",\n \"lp_name\": \"<string>\",\n \"address\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API_KEY", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://adscrush-api.anonymoussherlock.workers.dev/api/v1/leads")
.header("API_KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"s1\": \"<string>\",\n \"lp_name\": \"<string>\",\n \"address\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://adscrush-api.anonymoussherlock.workers.dev/api/v1/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API_KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"s1\": \"<string>\",\n \"lp_name\": \"<string>\",\n \"address\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"order_id": "rec_crlh9b3n9o8uin0cj1kg"
}{
"success": false,
"error": "validation",
"message": "Invalid input data"
}{
"success": false,
"error": "unauthorized",
"message": "Authentication failed"
}{
"success": false,
"error": "error",
"message": "An unexpected error occurred"
}Authorizations
Your API key. Include this key in the API_KEY header when making requests to endpoints that require authentication. You can find your API key in the 'Profile' tab on the website.
Body
application/json
Was this page helpful?
⌘I
