Import lead
curl --request PUT \
--url https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "<string>",
"company": "<string>",
"customVars": {},
"email": "<string>",
"lastName": "<string>",
"linkedinUrl": "<string>",
"position": "<string>",
"tagIds": [
"<string>"
],
"tags": [
"<string>"
]
}
'const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: '<string>',
company: '<string>',
customVars: {},
email: '<string>',
lastName: '<string>',
linkedinUrl: '<string>',
position: '<string>',
tagIds: ['<string>'],
tags: ['<string>']
})
};
fetch('https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: '<string>',
company: '<string>',
customVars: {},
email: '<string>',
lastName: '<string>',
linkedinUrl: '<string>',
position: '<string>',
tagIds: ['<string>'],
tags: ['<string>']
})
};
fetch('https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead';
const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: '<string>',
company: '<string>',
customVars: {},
email: '<string>',
lastName: '<string>',
linkedinUrl: '<string>',
position: '<string>',
tagIds: ['<string>'],
tags: ['<string>']
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead"
payload = {
"firstName": "<string>",
"company": "<string>",
"customVars": {},
"email": "<string>",
"lastName": "<string>",
"linkedinUrl": "<string>",
"position": "<string>",
"tagIds": ["<string>"],
"tags": ["<string>"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead"
payload := strings.NewReader("{\n \"firstName\": \"<string>\",\n \"company\": \"<string>\",\n \"customVars\": {},\n \"email\": \"<string>\",\n \"lastName\": \"<string>\",\n \"linkedinUrl\": \"<string>\",\n \"position\": \"<string>\",\n \"tagIds\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<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.put("https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"<string>\",\n \"company\": \"<string>\",\n \"customVars\": {},\n \"email\": \"<string>\",\n \"lastName\": \"<string>\",\n \"linkedinUrl\": \"<string>\",\n \"position\": \"<string>\",\n \"tagIds\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"firstName\": \"<string>\",\n \"company\": \"<string>\",\n \"customVars\": {},\n \"email\": \"<string>\",\n \"lastName\": \"<string>\",\n \"linkedinUrl\": \"<string>\",\n \"position\": \"<string>\",\n \"tagIds\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => '<string>',
'company' => '<string>',
'customVars' => [
],
'email' => '<string>',
'lastName' => '<string>',
'linkedinUrl' => '<string>',
'position' => '<string>',
'tagIds' => [
'<string>'
],
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <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;
}require 'uri'
require 'net/http'
url = URI("https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"<string>\",\n \"company\": \"<string>\",\n \"customVars\": {},\n \"email\": \"<string>\",\n \"lastName\": \"<string>\",\n \"linkedinUrl\": \"<string>\",\n \"position\": \"<string>\",\n \"tagIds\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"createdAt": "<string>",
"type": "email",
"value": "<string>"
}
],
"message": "<string>"
}{
"data": [
{
"createdAt": "<string>",
"type": "email",
"value": "<string>"
}
],
"message": "<string>"
}{
"data": [
{
"createdAt": "<string>",
"type": "email",
"value": "<string>"
}
],
"message": "<string>"
}sequences
Import lead
Import lead to a sequence. Requires at least one of email or linkedinUrl. If no tag is provided, a default date-based tag is applied automatically.
PUT
/
workspaces
/
{workspaceID}
/
sequences
/
{sequenceID}
/
import-lead
Import lead
curl --request PUT \
--url https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "<string>",
"company": "<string>",
"customVars": {},
"email": "<string>",
"lastName": "<string>",
"linkedinUrl": "<string>",
"position": "<string>",
"tagIds": [
"<string>"
],
"tags": [
"<string>"
]
}
'const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: '<string>',
company: '<string>',
customVars: {},
email: '<string>',
lastName: '<string>',
linkedinUrl: '<string>',
position: '<string>',
tagIds: ['<string>'],
tags: ['<string>']
})
};
fetch('https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: '<string>',
company: '<string>',
customVars: {},
email: '<string>',
lastName: '<string>',
linkedinUrl: '<string>',
position: '<string>',
tagIds: ['<string>'],
tags: ['<string>']
})
};
fetch('https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead';
const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: '<string>',
company: '<string>',
customVars: {},
email: '<string>',
lastName: '<string>',
linkedinUrl: '<string>',
position: '<string>',
tagIds: ['<string>'],
tags: ['<string>']
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead"
payload = {
"firstName": "<string>",
"company": "<string>",
"customVars": {},
"email": "<string>",
"lastName": "<string>",
"linkedinUrl": "<string>",
"position": "<string>",
"tagIds": ["<string>"],
"tags": ["<string>"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead"
payload := strings.NewReader("{\n \"firstName\": \"<string>\",\n \"company\": \"<string>\",\n \"customVars\": {},\n \"email\": \"<string>\",\n \"lastName\": \"<string>\",\n \"linkedinUrl\": \"<string>\",\n \"position\": \"<string>\",\n \"tagIds\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<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.put("https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"<string>\",\n \"company\": \"<string>\",\n \"customVars\": {},\n \"email\": \"<string>\",\n \"lastName\": \"<string>\",\n \"linkedinUrl\": \"<string>\",\n \"position\": \"<string>\",\n \"tagIds\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"firstName\": \"<string>\",\n \"company\": \"<string>\",\n \"customVars\": {},\n \"email\": \"<string>\",\n \"lastName\": \"<string>\",\n \"linkedinUrl\": \"<string>\",\n \"position\": \"<string>\",\n \"tagIds\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => '<string>',
'company' => '<string>',
'customVars' => [
],
'email' => '<string>',
'lastName' => '<string>',
'linkedinUrl' => '<string>',
'position' => '<string>',
'tagIds' => [
'<string>'
],
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <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;
}require 'uri'
require 'net/http'
url = URI("https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/sequences/{sequenceID}/import-lead")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"<string>\",\n \"company\": \"<string>\",\n \"customVars\": {},\n \"email\": \"<string>\",\n \"lastName\": \"<string>\",\n \"linkedinUrl\": \"<string>\",\n \"position\": \"<string>\",\n \"tagIds\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"createdAt": "<string>",
"type": "email",
"value": "<string>"
}
],
"message": "<string>"
}{
"data": [
{
"createdAt": "<string>",
"type": "email",
"value": "<string>"
}
],
"message": "<string>"
}{
"data": [
{
"createdAt": "<string>",
"type": "email",
"value": "<string>"
}
],
"message": "<string>"
}Authorizations
Body
application/json
Request body
Request body
Minimum string length:
1Show child attributes
Show child attributes
Email of the contact. Either email or linkedinUrl must be provided.
LinkedInUrl of the contact. Either email or linkedinUrl must be provided.
TagIDs are existing tag IDs to apply to the contact. The bulk create endpoint requires at least one tag (tags or tagIds).
TagNames are tag names to apply to the contact. The bulk create endpoint requires at least one tag (tags or tagIds).
Response
Lead imported successfully
