Update Recap CRM config
curl --request PUT \
--url https://api.pyai.com/v1/recap/crm-config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"salesforce": {
"enabled": true,
"instance_url": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"refresh_token": "<string>",
"object": "<string>",
"record_id_field": "<string>",
"field_map": {},
"create_activity": true
}
}
'import requests
url = "https://api.pyai.com/v1/recap/crm-config"
payload = { "salesforce": {
"enabled": True,
"instance_url": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"refresh_token": "<string>",
"object": "<string>",
"record_id_field": "<string>",
"field_map": {},
"create_activity": True
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
salesforce: {
enabled: true,
instance_url: '<string>',
client_id: '<string>',
client_secret: '<string>',
refresh_token: '<string>',
object: '<string>',
record_id_field: '<string>',
field_map: {},
create_activity: true
}
})
};
fetch('https://api.pyai.com/v1/recap/crm-config', 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.pyai.com/v1/recap/crm-config",
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([
'salesforce' => [
'enabled' => true,
'instance_url' => '<string>',
'client_id' => '<string>',
'client_secret' => '<string>',
'refresh_token' => '<string>',
'object' => '<string>',
'record_id_field' => '<string>',
'field_map' => [
],
'create_activity' => true
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pyai.com/v1/recap/crm-config"
payload := strings.NewReader("{\n \"salesforce\": {\n \"enabled\": true,\n \"instance_url\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"refresh_token\": \"<string>\",\n \"object\": \"<string>\",\n \"record_id_field\": \"<string>\",\n \"field_map\": {},\n \"create_activity\": true\n }\n}")
req, _ := http.NewRequest("PUT", 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))
}HttpResponse<String> response = Unirest.put("https://api.pyai.com/v1/recap/crm-config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"salesforce\": {\n \"enabled\": true,\n \"instance_url\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"refresh_token\": \"<string>\",\n \"object\": \"<string>\",\n \"record_id_field\": \"<string>\",\n \"field_map\": {},\n \"create_activity\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/recap/crm-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"salesforce\": {\n \"enabled\": true,\n \"instance_url\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"refresh_token\": \"<string>\",\n \"object\": \"<string>\",\n \"record_id_field\": \"<string>\",\n \"field_map\": {},\n \"create_activity\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"object": "recap.crm_config",
"salesforce": {
"enabled": true,
"instance_url": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"refresh_token": "<string>",
"object": "Opportunity",
"record_id_field": "salesforce_id",
"field_map": {},
"create_activity": true
},
"updated_at": 123
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>"
}
}Recap
Update Recap CRM config
Hand-configured Salesforce mapping for design partners. Omit secret fields on update to preserve existing values.
PUT
/
v1
/
recap
/
crm-config
Update Recap CRM config
curl --request PUT \
--url https://api.pyai.com/v1/recap/crm-config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"salesforce": {
"enabled": true,
"instance_url": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"refresh_token": "<string>",
"object": "<string>",
"record_id_field": "<string>",
"field_map": {},
"create_activity": true
}
}
'import requests
url = "https://api.pyai.com/v1/recap/crm-config"
payload = { "salesforce": {
"enabled": True,
"instance_url": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"refresh_token": "<string>",
"object": "<string>",
"record_id_field": "<string>",
"field_map": {},
"create_activity": True
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
salesforce: {
enabled: true,
instance_url: '<string>',
client_id: '<string>',
client_secret: '<string>',
refresh_token: '<string>',
object: '<string>',
record_id_field: '<string>',
field_map: {},
create_activity: true
}
})
};
fetch('https://api.pyai.com/v1/recap/crm-config', 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.pyai.com/v1/recap/crm-config",
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([
'salesforce' => [
'enabled' => true,
'instance_url' => '<string>',
'client_id' => '<string>',
'client_secret' => '<string>',
'refresh_token' => '<string>',
'object' => '<string>',
'record_id_field' => '<string>',
'field_map' => [
],
'create_activity' => true
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pyai.com/v1/recap/crm-config"
payload := strings.NewReader("{\n \"salesforce\": {\n \"enabled\": true,\n \"instance_url\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"refresh_token\": \"<string>\",\n \"object\": \"<string>\",\n \"record_id_field\": \"<string>\",\n \"field_map\": {},\n \"create_activity\": true\n }\n}")
req, _ := http.NewRequest("PUT", 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))
}HttpResponse<String> response = Unirest.put("https://api.pyai.com/v1/recap/crm-config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"salesforce\": {\n \"enabled\": true,\n \"instance_url\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"refresh_token\": \"<string>\",\n \"object\": \"<string>\",\n \"record_id_field\": \"<string>\",\n \"field_map\": {},\n \"create_activity\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/recap/crm-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"salesforce\": {\n \"enabled\": true,\n \"instance_url\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"refresh_token\": \"<string>\",\n \"object\": \"<string>\",\n \"record_id_field\": \"<string>\",\n \"field_map\": {},\n \"create_activity\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"object": "recap.crm_config",
"salesforce": {
"enabled": true,
"instance_url": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"refresh_token": "<string>",
"object": "Opportunity",
"record_id_field": "salesforce_id",
"field_map": {},
"create_activity": true
},
"updated_at": 123
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>"
}
}Authorizations
apiKeyxApiKey
Use Authorization: Bearer pyai_live_... (or pyai_test_...).
Body
application/json
Show child attributes
Show child attributes
⌘I