cURL
curl --request PATCH \
--url https://api.{environment}.corti.app/v2/interactions/{id}/facts/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Tenant-Name: <tenant-name>' \
--data '
{
"facts": [
{
"factId": "3c9d8a12-7f44-4b3e-9e6f-9271c2bbfa08",
"isDiscarded": true,
"text": "<string>",
"group": "other"
}
]
}
'import { CortiClient, CortiEnvironment } from "@corti/sdk";
const client = new CortiClient({
environment: CortiEnvironment.Eu,
auth: {
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET"
},
tenantName: "YOUR_TENANT_NAME"
});
await client.facts.batchUpdate("f47ac10b-58cc-4372-a567-0e02b2c3d479", {
facts: [{
factId: "3c9d8a12-7f44-4b3e-9e6f-9271c2bbfa08"
}]
});using Corti;
var client = new CortiClient(
"TENANT_NAME",
CortiClientEnvironment.Eu,
new CortiClientAuth.ClientCredentials("client_id", "client_secret")
);
await client.Facts.BatchUpdateAsync(
"f47ac10b-58cc-4372-a567-0e02b2c3d479",
new FactsBatchUpdateRequest
{
Facts = new List<FactsBatchUpdateInput>()
{
new FactsBatchUpdateInput { FactId = "3c9d8a12-7f44-4b3e-9e6f-9271c2bbfa08" },
},
}
);import requests
url = "https://api.{environment}.corti.app/v2/interactions/{id}/facts/"
payload = { "facts": [
{
"factId": "3c9d8a12-7f44-4b3e-9e6f-9271c2bbfa08",
"isDiscarded": True,
"text": "<string>",
"group": "other"
}
] }
headers = {
"Tenant-Name": "<tenant-name>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{environment}.corti.app/v2/interactions/{id}/facts/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'facts' => [
[
'factId' => '3c9d8a12-7f44-4b3e-9e6f-9271c2bbfa08',
'isDiscarded' => true,
'text' => '<string>',
'group' => 'other'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Tenant-Name: <tenant-name>"
],
]);
$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.{environment}.corti.app/v2/interactions/{id}/facts/"
payload := strings.NewReader("{\n \"facts\": [\n {\n \"factId\": \"3c9d8a12-7f44-4b3e-9e6f-9271c2bbfa08\",\n \"isDiscarded\": true,\n \"text\": \"<string>\",\n \"group\": \"other\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Tenant-Name", "<tenant-name>")
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.patch("https://api.{environment}.corti.app/v2/interactions/{id}/facts/")
.header("Tenant-Name", "<tenant-name>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"facts\": [\n {\n \"factId\": \"3c9d8a12-7f44-4b3e-9e6f-9271c2bbfa08\",\n \"isDiscarded\": true,\n \"text\": \"<string>\",\n \"group\": \"other\"\n }\n ]\n}")
.asString();{
"facts": [
{
"id": "3c9d8a12-7f44-4b3e-9e6f-9271c2bbfa08",
"text": "<string>",
"group": "other",
"groupId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"isDiscarded": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}{
"requestid": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"validationErrors": [
{}
]
}Facts
Update Facts
Updates multiple facts associated with an interaction.
PATCH
/
interactions
/
{id}
/
facts
/
cURL
curl --request PATCH \
--url https://api.{environment}.corti.app/v2/interactions/{id}/facts/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Tenant-Name: <tenant-name>' \
--data '
{
"facts": [
{
"factId": "3c9d8a12-7f44-4b3e-9e6f-9271c2bbfa08",
"isDiscarded": true,
"text": "<string>",
"group": "other"
}
]
}
'import { CortiClient, CortiEnvironment } from "@corti/sdk";
const client = new CortiClient({
environment: CortiEnvironment.Eu,
auth: {
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET"
},
tenantName: "YOUR_TENANT_NAME"
});
await client.facts.batchUpdate("f47ac10b-58cc-4372-a567-0e02b2c3d479", {
facts: [{
factId: "3c9d8a12-7f44-4b3e-9e6f-9271c2bbfa08"
}]
});using Corti;
var client = new CortiClient(
"TENANT_NAME",
CortiClientEnvironment.Eu,
new CortiClientAuth.ClientCredentials("client_id", "client_secret")
);
await client.Facts.BatchUpdateAsync(
"f47ac10b-58cc-4372-a567-0e02b2c3d479",
new FactsBatchUpdateRequest
{
Facts = new List<FactsBatchUpdateInput>()
{
new FactsBatchUpdateInput { FactId = "3c9d8a12-7f44-4b3e-9e6f-9271c2bbfa08" },
},
}
);import requests
url = "https://api.{environment}.corti.app/v2/interactions/{id}/facts/"
payload = { "facts": [
{
"factId": "3c9d8a12-7f44-4b3e-9e6f-9271c2bbfa08",
"isDiscarded": True,
"text": "<string>",
"group": "other"
}
] }
headers = {
"Tenant-Name": "<tenant-name>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{environment}.corti.app/v2/interactions/{id}/facts/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'facts' => [
[
'factId' => '3c9d8a12-7f44-4b3e-9e6f-9271c2bbfa08',
'isDiscarded' => true,
'text' => '<string>',
'group' => 'other'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Tenant-Name: <tenant-name>"
],
]);
$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.{environment}.corti.app/v2/interactions/{id}/facts/"
payload := strings.NewReader("{\n \"facts\": [\n {\n \"factId\": \"3c9d8a12-7f44-4b3e-9e6f-9271c2bbfa08\",\n \"isDiscarded\": true,\n \"text\": \"<string>\",\n \"group\": \"other\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Tenant-Name", "<tenant-name>")
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.patch("https://api.{environment}.corti.app/v2/interactions/{id}/facts/")
.header("Tenant-Name", "<tenant-name>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"facts\": [\n {\n \"factId\": \"3c9d8a12-7f44-4b3e-9e6f-9271c2bbfa08\",\n \"isDiscarded\": true,\n \"text\": \"<string>\",\n \"group\": \"other\"\n }\n ]\n}")
.asString();{
"facts": [
{
"id": "3c9d8a12-7f44-4b3e-9e6f-9271c2bbfa08",
"text": "<string>",
"group": "other",
"groupId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"isDiscarded": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}{
"requestid": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"validationErrors": [
{}
]
}Authorizations
Input your token
Headers
Identifies a distinct entity within Corti's multi-tenant system. Ensures correct routing and authentication of the request.
Example:
"base"
Path Parameters
The unique identifier of the interaction. Must be a valid UUID.
Example:
"f47ac10b-58cc-4372-a567-0e02b2c3d479"
Body
application/json
A list of facts to be updated.
Show child attributes
Show child attributes
Response
Returns the list of successfully updated facts.
A list of updated facts.
Show child attributes
Show child attributes
Was this page helpful?
⌘I