Add target
curl --request POST \
--url https://yourdomain.com/create_target \
--header 'Content-Type: application/json' \
--cookie admin_cookie= \
--data '
{
"address": "<string>",
"campaign": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"position": "<string>",
"custom": "<string>"
}
'import requests
url = "https://yourdomain.com/create_target"
payload = {
"address": "<string>",
"campaign": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"position": "<string>",
"custom": "<string>"
}
headers = {
"cookie": "admin_cookie=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'admin_cookie=', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: '<string>',
campaign: '<string>',
first_name: '<string>',
last_name: '<string>',
position: '<string>',
custom: '<string>'
})
};
fetch('https://yourdomain.com/create_target', 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://yourdomain.com/create_target",
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([
'address' => '<string>',
'campaign' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'position' => '<string>',
'custom' => '<string>'
]),
CURLOPT_COOKIE => "admin_cookie=",
CURLOPT_HTTPHEADER => [
"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://yourdomain.com/create_target"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"campaign\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"position\": \"<string>\",\n \"custom\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "admin_cookie=")
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://yourdomain.com/create_target")
.header("cookie", "admin_cookie=")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"campaign\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"position\": \"<string>\",\n \"custom\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://yourdomain.com/create_target")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'admin_cookie='
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"<string>\",\n \"campaign\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"position\": \"<string>\",\n \"custom\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"target_id": "<string>",
"address": "<string>",
"campaign": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"position": "<string>",
"custom": "<string>",
"phished": 123
}Target
Add target
Add a target to a campaign
POST
/
create_target
Add target
curl --request POST \
--url https://yourdomain.com/create_target \
--header 'Content-Type: application/json' \
--cookie admin_cookie= \
--data '
{
"address": "<string>",
"campaign": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"position": "<string>",
"custom": "<string>"
}
'import requests
url = "https://yourdomain.com/create_target"
payload = {
"address": "<string>",
"campaign": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"position": "<string>",
"custom": "<string>"
}
headers = {
"cookie": "admin_cookie=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'admin_cookie=', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: '<string>',
campaign: '<string>',
first_name: '<string>',
last_name: '<string>',
position: '<string>',
custom: '<string>'
})
};
fetch('https://yourdomain.com/create_target', 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://yourdomain.com/create_target",
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([
'address' => '<string>',
'campaign' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'position' => '<string>',
'custom' => '<string>'
]),
CURLOPT_COOKIE => "admin_cookie=",
CURLOPT_HTTPHEADER => [
"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://yourdomain.com/create_target"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"campaign\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"position\": \"<string>\",\n \"custom\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "admin_cookie=")
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://yourdomain.com/create_target")
.header("cookie", "admin_cookie=")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"campaign\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"position\": \"<string>\",\n \"custom\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://yourdomain.com/create_target")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'admin_cookie='
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"<string>\",\n \"campaign\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"position\": \"<string>\",\n \"custom\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"target_id": "<string>",
"address": "<string>",
"campaign": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"position": "<string>",
"custom": "<string>",
"phished": 123
}Authorizations
Admin cookie authentication (configurable in config.json)
Body
application/json
Response
Target created successfully
Unique target identifier
Target email address
Associated campaign name
Target first name
Target last name
Target job title/position
Custom field (phone number, etc.)
Email sent status (0 = not sent, 1 = sent)
⌘I