Add or Update an Integration Account
curl --request POST \
--url https://api.captaindata.co/v3/integrations/{integration_uid}/accounts \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'x-project-id: <api-key>' \
--data '
{
"account": {
"uid": "Pass this UID to update an account only",
"name": "Your account",
"cookies": {
"li_at": "YOUR_SESSION_COOKIE"
},
"user_uid": "67890-wxyz"
},
"resume_paused_jobs": false,
"shared_account": false,
"retrieve_ip": false
}
'import requests
url = "https://api.captaindata.co/v3/integrations/{integration_uid}/accounts"
payload = {
"account": {
"uid": "Pass this UID to update an account only",
"name": "Your account",
"cookies": { "li_at": "YOUR_SESSION_COOKIE" },
"user_uid": "67890-wxyz"
},
"resume_paused_jobs": False,
"shared_account": False,
"retrieve_ip": False
}
headers = {
"Authorization": "<api-key>",
"x-project-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<api-key>',
'x-project-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account: {
uid: 'Pass this UID to update an account only',
name: 'Your account',
cookies: {li_at: 'YOUR_SESSION_COOKIE'},
user_uid: '67890-wxyz'
},
resume_paused_jobs: false,
shared_account: false,
retrieve_ip: false
})
};
fetch('https://api.captaindata.co/v3/integrations/{integration_uid}/accounts', 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://api.captaindata.co/v3/integrations/{integration_uid}/accounts",
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([
'account' => [
'uid' => 'Pass this UID to update an account only',
'name' => 'Your account',
'cookies' => [
'li_at' => 'YOUR_SESSION_COOKIE'
],
'user_uid' => '67890-wxyz'
],
'resume_paused_jobs' => false,
'shared_account' => false,
'retrieve_ip' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"x-project-id: <api-key>"
],
]);
$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://api.captaindata.co/v3/integrations/{integration_uid}/accounts"
payload := strings.NewReader("{\n \"account\": {\n \"uid\": \"Pass this UID to update an account only\",\n \"name\": \"Your account\",\n \"cookies\": {\n \"li_at\": \"YOUR_SESSION_COOKIE\"\n },\n \"user_uid\": \"67890-wxyz\"\n },\n \"resume_paused_jobs\": false,\n \"shared_account\": false,\n \"retrieve_ip\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("x-project-id", "<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://api.captaindata.co/v3/integrations/{integration_uid}/accounts")
.header("Authorization", "<api-key>")
.header("x-project-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account\": {\n \"uid\": \"Pass this UID to update an account only\",\n \"name\": \"Your account\",\n \"cookies\": {\n \"li_at\": \"YOUR_SESSION_COOKIE\"\n },\n \"user_uid\": \"67890-wxyz\"\n },\n \"resume_paused_jobs\": false,\n \"shared_account\": false,\n \"retrieve_ip\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.captaindata.co/v3/integrations/{integration_uid}/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["x-project-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account\": {\n \"uid\": \"Pass this UID to update an account only\",\n \"name\": \"Your account\",\n \"cookies\": {\n \"li_at\": \"YOUR_SESSION_COOKIE\"\n },\n \"user_uid\": \"67890-wxyz\"\n },\n \"resume_paused_jobs\": false,\n \"shared_account\": false,\n \"retrieve_ip\": false\n}"
response = http.request(request)
puts response.read_body{
"message": "Integration configured.",
"account": {
"api_key": null,
"cookies": {
"li_at": "YOUR_SESSION_COOKIE"
},
"integration_permalink": "linkedin",
"is_shared": false,
"name": "New account",
"password": null,
"setup_at": "Fri, 02 Oct 2020 13:34:38 GMT",
"uid": "xxxxxx-d339-4206-a4fb-a1fc8cc55eb7",
"user_id": null,
"username": null,
"via_extension": false,
"level": null
}
}{
"error": "The account uid you provided is not UUID."
}{
"error": "Could not find application."
}{
"detail": [
{
"loc": [
"body"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}Integrations
Add or Update an Integration Account
POST
/
v3
/
integrations
/
{integration_uid}
/
accounts
Add or Update an Integration Account
curl --request POST \
--url https://api.captaindata.co/v3/integrations/{integration_uid}/accounts \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'x-project-id: <api-key>' \
--data '
{
"account": {
"uid": "Pass this UID to update an account only",
"name": "Your account",
"cookies": {
"li_at": "YOUR_SESSION_COOKIE"
},
"user_uid": "67890-wxyz"
},
"resume_paused_jobs": false,
"shared_account": false,
"retrieve_ip": false
}
'import requests
url = "https://api.captaindata.co/v3/integrations/{integration_uid}/accounts"
payload = {
"account": {
"uid": "Pass this UID to update an account only",
"name": "Your account",
"cookies": { "li_at": "YOUR_SESSION_COOKIE" },
"user_uid": "67890-wxyz"
},
"resume_paused_jobs": False,
"shared_account": False,
"retrieve_ip": False
}
headers = {
"Authorization": "<api-key>",
"x-project-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<api-key>',
'x-project-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account: {
uid: 'Pass this UID to update an account only',
name: 'Your account',
cookies: {li_at: 'YOUR_SESSION_COOKIE'},
user_uid: '67890-wxyz'
},
resume_paused_jobs: false,
shared_account: false,
retrieve_ip: false
})
};
fetch('https://api.captaindata.co/v3/integrations/{integration_uid}/accounts', 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://api.captaindata.co/v3/integrations/{integration_uid}/accounts",
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([
'account' => [
'uid' => 'Pass this UID to update an account only',
'name' => 'Your account',
'cookies' => [
'li_at' => 'YOUR_SESSION_COOKIE'
],
'user_uid' => '67890-wxyz'
],
'resume_paused_jobs' => false,
'shared_account' => false,
'retrieve_ip' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"x-project-id: <api-key>"
],
]);
$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://api.captaindata.co/v3/integrations/{integration_uid}/accounts"
payload := strings.NewReader("{\n \"account\": {\n \"uid\": \"Pass this UID to update an account only\",\n \"name\": \"Your account\",\n \"cookies\": {\n \"li_at\": \"YOUR_SESSION_COOKIE\"\n },\n \"user_uid\": \"67890-wxyz\"\n },\n \"resume_paused_jobs\": false,\n \"shared_account\": false,\n \"retrieve_ip\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("x-project-id", "<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://api.captaindata.co/v3/integrations/{integration_uid}/accounts")
.header("Authorization", "<api-key>")
.header("x-project-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account\": {\n \"uid\": \"Pass this UID to update an account only\",\n \"name\": \"Your account\",\n \"cookies\": {\n \"li_at\": \"YOUR_SESSION_COOKIE\"\n },\n \"user_uid\": \"67890-wxyz\"\n },\n \"resume_paused_jobs\": false,\n \"shared_account\": false,\n \"retrieve_ip\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.captaindata.co/v3/integrations/{integration_uid}/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["x-project-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account\": {\n \"uid\": \"Pass this UID to update an account only\",\n \"name\": \"Your account\",\n \"cookies\": {\n \"li_at\": \"YOUR_SESSION_COOKIE\"\n },\n \"user_uid\": \"67890-wxyz\"\n },\n \"resume_paused_jobs\": false,\n \"shared_account\": false,\n \"retrieve_ip\": false\n}"
response = http.request(request)
puts response.read_body{
"message": "Integration configured.",
"account": {
"api_key": null,
"cookies": {
"li_at": "YOUR_SESSION_COOKIE"
},
"integration_permalink": "linkedin",
"is_shared": false,
"name": "New account",
"password": null,
"setup_at": "Fri, 02 Oct 2020 13:34:38 GMT",
"uid": "xxxxxx-d339-4206-a4fb-a1fc8cc55eb7",
"user_id": null,
"username": null,
"via_extension": false,
"level": null
}
}{
"error": "The account uid you provided is not UUID."
}{
"error": "Could not find application."
}{
"detail": [
{
"loc": [
"body"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}Authorizations
The Authorization header must include 'x-api-key' followed by your API key (e.g., 'Authorization: x-api-key YOUR_API_KEY').
Workspace UID required to identify the workspace.
Path Parameters
The slug of the integration, such as 'linkedin', used to create a new account of this type.
Body
application/json
The account JSON object to create or update.
Example:
{ "uid": "Pass this UID to update an account only", "name": "Your account", "cookies": { "li_at": "YOUR_SESSION_COOKIE" }, "user_uid": "67890-wxyz" }
Set this to true to resume all paused jobs if you update, for example, an account's cookie.
Example:
false
Set this to true to share this account to an external user.
Example:
false
Set this to true to retrieve the IP we attribute to the user/account.
Example:
false
Response
Successful Response
⌘I