curl --request POST \
--url https://insights.reforge.com/api/v1/conversations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"id": "conversation-123",
"title": "Customer Support Request",
"source": "intercom",
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"contacts": [
{
"id": "<string>",
"shouldUnflattenProperties": true,
"properties": {
"$email": "<string>",
"$name": "<string>",
"$createdAt": "2023-11-07T05:31:56Z",
"$updatedAt": "2023-11-07T05:31:56Z",
"$contractValue": 100000
},
"account": {
"id": "account-789",
"shouldUnflattenProperties": true
},
"source": "<string>"
}
],
"messages": [
{
"id": "message-789",
"incoming": true,
"contactId": "user-456",
"content": "Hello! I'm having trouble...",
"createdAt": "2024-01-01T00:00:00.000Z",
"shouldUnflattenProperties": true,
"properties": {},
"sourceUrl": "<string>"
}
],
"rating": 123,
"shouldUnflattenProperties": true,
"propagatePropertiesToMessages": false,
"properties": {}
}
EOFimport requests
url = "https://insights.reforge.com/api/v1/conversations"
payload = {
"id": "conversation-123",
"title": "Customer Support Request",
"source": "intercom",
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"contacts": [
{
"id": "<string>",
"shouldUnflattenProperties": True,
"properties": {
"$email": "<string>",
"$name": "<string>",
"$createdAt": "2023-11-07T05:31:56Z",
"$updatedAt": "2023-11-07T05:31:56Z",
"$contractValue": 100000
},
"account": {
"id": "account-789",
"shouldUnflattenProperties": True
},
"source": "<string>"
}
],
"messages": [
{
"id": "message-789",
"incoming": True,
"contactId": "user-456",
"content": "Hello! I'm having trouble...",
"createdAt": "2024-01-01T00:00:00.000Z",
"shouldUnflattenProperties": True,
"properties": {},
"sourceUrl": "<string>"
}
],
"rating": 123,
"shouldUnflattenProperties": True,
"propagatePropertiesToMessages": False,
"properties": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'conversation-123',
title: 'Customer Support Request',
source: 'intercom',
createdAt: '2024-01-01T00:00:00.000Z',
updatedAt: '2024-01-01T00:00:00.000Z',
contacts: [
{
id: '<string>',
shouldUnflattenProperties: true,
properties: {
$email: '<string>',
$name: '<string>',
$createdAt: '2023-11-07T05:31:56Z',
$updatedAt: '2023-11-07T05:31:56Z',
$contractValue: 100000
},
account: {id: 'account-789', shouldUnflattenProperties: true},
source: '<string>'
}
],
messages: [
{
id: 'message-789',
incoming: true,
contactId: 'user-456',
content: 'Hello! I\'m having trouble...',
createdAt: '2024-01-01T00:00:00.000Z',
shouldUnflattenProperties: true,
properties: {},
sourceUrl: '<string>'
}
],
rating: 123,
shouldUnflattenProperties: true,
propagatePropertiesToMessages: false,
properties: {}
})
};
fetch('https://insights.reforge.com/api/v1/conversations', 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://insights.reforge.com/api/v1/conversations",
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([
'id' => 'conversation-123',
'title' => 'Customer Support Request',
'source' => 'intercom',
'createdAt' => '2024-01-01T00:00:00.000Z',
'updatedAt' => '2024-01-01T00:00:00.000Z',
'contacts' => [
[
'id' => '<string>',
'shouldUnflattenProperties' => true,
'properties' => [
'$email' => '<string>',
'$name' => '<string>',
'$createdAt' => '2023-11-07T05:31:56Z',
'$updatedAt' => '2023-11-07T05:31:56Z',
'$contractValue' => 100000
],
'account' => [
'id' => 'account-789',
'shouldUnflattenProperties' => true
],
'source' => '<string>'
]
],
'messages' => [
[
'id' => 'message-789',
'incoming' => true,
'contactId' => 'user-456',
'content' => 'Hello! I\'m having trouble...',
'createdAt' => '2024-01-01T00:00:00.000Z',
'shouldUnflattenProperties' => true,
'properties' => [
],
'sourceUrl' => '<string>'
]
],
'rating' => 123,
'shouldUnflattenProperties' => true,
'propagatePropertiesToMessages' => false,
'properties' => [
]
]),
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://insights.reforge.com/api/v1/conversations"
payload := strings.NewReader("{\n \"id\": \"conversation-123\",\n \"title\": \"Customer Support Request\",\n \"source\": \"intercom\",\n \"createdAt\": \"2024-01-01T00:00:00.000Z\",\n \"updatedAt\": \"2024-01-01T00:00:00.000Z\",\n \"contacts\": [\n {\n \"id\": \"<string>\",\n \"shouldUnflattenProperties\": true,\n \"properties\": {\n \"$email\": \"<string>\",\n \"$name\": \"<string>\",\n \"$createdAt\": \"2023-11-07T05:31:56Z\",\n \"$updatedAt\": \"2023-11-07T05:31:56Z\",\n \"$contractValue\": 100000\n },\n \"account\": {\n \"id\": \"account-789\",\n \"shouldUnflattenProperties\": true\n },\n \"source\": \"<string>\"\n }\n ],\n \"messages\": [\n {\n \"id\": \"message-789\",\n \"incoming\": true,\n \"contactId\": \"user-456\",\n \"content\": \"Hello! I'm having trouble...\",\n \"createdAt\": \"2024-01-01T00:00:00.000Z\",\n \"shouldUnflattenProperties\": true,\n \"properties\": {},\n \"sourceUrl\": \"<string>\"\n }\n ],\n \"rating\": 123,\n \"shouldUnflattenProperties\": true,\n \"propagatePropertiesToMessages\": false,\n \"properties\": {}\n}")
req, _ := http.NewRequest("POST", 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.post("https://insights.reforge.com/api/v1/conversations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"conversation-123\",\n \"title\": \"Customer Support Request\",\n \"source\": \"intercom\",\n \"createdAt\": \"2024-01-01T00:00:00.000Z\",\n \"updatedAt\": \"2024-01-01T00:00:00.000Z\",\n \"contacts\": [\n {\n \"id\": \"<string>\",\n \"shouldUnflattenProperties\": true,\n \"properties\": {\n \"$email\": \"<string>\",\n \"$name\": \"<string>\",\n \"$createdAt\": \"2023-11-07T05:31:56Z\",\n \"$updatedAt\": \"2023-11-07T05:31:56Z\",\n \"$contractValue\": 100000\n },\n \"account\": {\n \"id\": \"account-789\",\n \"shouldUnflattenProperties\": true\n },\n \"source\": \"<string>\"\n }\n ],\n \"messages\": [\n {\n \"id\": \"message-789\",\n \"incoming\": true,\n \"contactId\": \"user-456\",\n \"content\": \"Hello! I'm having trouble...\",\n \"createdAt\": \"2024-01-01T00:00:00.000Z\",\n \"shouldUnflattenProperties\": true,\n \"properties\": {},\n \"sourceUrl\": \"<string>\"\n }\n ],\n \"rating\": 123,\n \"shouldUnflattenProperties\": true,\n \"propagatePropertiesToMessages\": false,\n \"properties\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://insights.reforge.com/api/v1/conversations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"conversation-123\",\n \"title\": \"Customer Support Request\",\n \"source\": \"intercom\",\n \"createdAt\": \"2024-01-01T00:00:00.000Z\",\n \"updatedAt\": \"2024-01-01T00:00:00.000Z\",\n \"contacts\": [\n {\n \"id\": \"<string>\",\n \"shouldUnflattenProperties\": true,\n \"properties\": {\n \"$email\": \"<string>\",\n \"$name\": \"<string>\",\n \"$createdAt\": \"2023-11-07T05:31:56Z\",\n \"$updatedAt\": \"2023-11-07T05:31:56Z\",\n \"$contractValue\": 100000\n },\n \"account\": {\n \"id\": \"account-789\",\n \"shouldUnflattenProperties\": true\n },\n \"source\": \"<string>\"\n }\n ],\n \"messages\": [\n {\n \"id\": \"message-789\",\n \"incoming\": true,\n \"contactId\": \"user-456\",\n \"content\": \"Hello! I'm having trouble...\",\n \"createdAt\": \"2024-01-01T00:00:00.000Z\",\n \"shouldUnflattenProperties\": true,\n \"properties\": {},\n \"sourceUrl\": \"<string>\"\n }\n ],\n \"rating\": 123,\n \"shouldUnflattenProperties\": true,\n \"propagatePropertiesToMessages\": false,\n \"properties\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": [
{
"message": "Invalid input"
}
]
}{
"error": "We are limiting to 10 per minute, please try again later"
}Submit a conversation
Submits conversation data to the system for processing. This can be content like a call transcript, email thread, or chat conversation.
curl --request POST \
--url https://insights.reforge.com/api/v1/conversations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"id": "conversation-123",
"title": "Customer Support Request",
"source": "intercom",
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"contacts": [
{
"id": "<string>",
"shouldUnflattenProperties": true,
"properties": {
"$email": "<string>",
"$name": "<string>",
"$createdAt": "2023-11-07T05:31:56Z",
"$updatedAt": "2023-11-07T05:31:56Z",
"$contractValue": 100000
},
"account": {
"id": "account-789",
"shouldUnflattenProperties": true
},
"source": "<string>"
}
],
"messages": [
{
"id": "message-789",
"incoming": true,
"contactId": "user-456",
"content": "Hello! I'm having trouble...",
"createdAt": "2024-01-01T00:00:00.000Z",
"shouldUnflattenProperties": true,
"properties": {},
"sourceUrl": "<string>"
}
],
"rating": 123,
"shouldUnflattenProperties": true,
"propagatePropertiesToMessages": false,
"properties": {}
}
EOFimport requests
url = "https://insights.reforge.com/api/v1/conversations"
payload = {
"id": "conversation-123",
"title": "Customer Support Request",
"source": "intercom",
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"contacts": [
{
"id": "<string>",
"shouldUnflattenProperties": True,
"properties": {
"$email": "<string>",
"$name": "<string>",
"$createdAt": "2023-11-07T05:31:56Z",
"$updatedAt": "2023-11-07T05:31:56Z",
"$contractValue": 100000
},
"account": {
"id": "account-789",
"shouldUnflattenProperties": True
},
"source": "<string>"
}
],
"messages": [
{
"id": "message-789",
"incoming": True,
"contactId": "user-456",
"content": "Hello! I'm having trouble...",
"createdAt": "2024-01-01T00:00:00.000Z",
"shouldUnflattenProperties": True,
"properties": {},
"sourceUrl": "<string>"
}
],
"rating": 123,
"shouldUnflattenProperties": True,
"propagatePropertiesToMessages": False,
"properties": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'conversation-123',
title: 'Customer Support Request',
source: 'intercom',
createdAt: '2024-01-01T00:00:00.000Z',
updatedAt: '2024-01-01T00:00:00.000Z',
contacts: [
{
id: '<string>',
shouldUnflattenProperties: true,
properties: {
$email: '<string>',
$name: '<string>',
$createdAt: '2023-11-07T05:31:56Z',
$updatedAt: '2023-11-07T05:31:56Z',
$contractValue: 100000
},
account: {id: 'account-789', shouldUnflattenProperties: true},
source: '<string>'
}
],
messages: [
{
id: 'message-789',
incoming: true,
contactId: 'user-456',
content: 'Hello! I\'m having trouble...',
createdAt: '2024-01-01T00:00:00.000Z',
shouldUnflattenProperties: true,
properties: {},
sourceUrl: '<string>'
}
],
rating: 123,
shouldUnflattenProperties: true,
propagatePropertiesToMessages: false,
properties: {}
})
};
fetch('https://insights.reforge.com/api/v1/conversations', 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://insights.reforge.com/api/v1/conversations",
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([
'id' => 'conversation-123',
'title' => 'Customer Support Request',
'source' => 'intercom',
'createdAt' => '2024-01-01T00:00:00.000Z',
'updatedAt' => '2024-01-01T00:00:00.000Z',
'contacts' => [
[
'id' => '<string>',
'shouldUnflattenProperties' => true,
'properties' => [
'$email' => '<string>',
'$name' => '<string>',
'$createdAt' => '2023-11-07T05:31:56Z',
'$updatedAt' => '2023-11-07T05:31:56Z',
'$contractValue' => 100000
],
'account' => [
'id' => 'account-789',
'shouldUnflattenProperties' => true
],
'source' => '<string>'
]
],
'messages' => [
[
'id' => 'message-789',
'incoming' => true,
'contactId' => 'user-456',
'content' => 'Hello! I\'m having trouble...',
'createdAt' => '2024-01-01T00:00:00.000Z',
'shouldUnflattenProperties' => true,
'properties' => [
],
'sourceUrl' => '<string>'
]
],
'rating' => 123,
'shouldUnflattenProperties' => true,
'propagatePropertiesToMessages' => false,
'properties' => [
]
]),
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://insights.reforge.com/api/v1/conversations"
payload := strings.NewReader("{\n \"id\": \"conversation-123\",\n \"title\": \"Customer Support Request\",\n \"source\": \"intercom\",\n \"createdAt\": \"2024-01-01T00:00:00.000Z\",\n \"updatedAt\": \"2024-01-01T00:00:00.000Z\",\n \"contacts\": [\n {\n \"id\": \"<string>\",\n \"shouldUnflattenProperties\": true,\n \"properties\": {\n \"$email\": \"<string>\",\n \"$name\": \"<string>\",\n \"$createdAt\": \"2023-11-07T05:31:56Z\",\n \"$updatedAt\": \"2023-11-07T05:31:56Z\",\n \"$contractValue\": 100000\n },\n \"account\": {\n \"id\": \"account-789\",\n \"shouldUnflattenProperties\": true\n },\n \"source\": \"<string>\"\n }\n ],\n \"messages\": [\n {\n \"id\": \"message-789\",\n \"incoming\": true,\n \"contactId\": \"user-456\",\n \"content\": \"Hello! I'm having trouble...\",\n \"createdAt\": \"2024-01-01T00:00:00.000Z\",\n \"shouldUnflattenProperties\": true,\n \"properties\": {},\n \"sourceUrl\": \"<string>\"\n }\n ],\n \"rating\": 123,\n \"shouldUnflattenProperties\": true,\n \"propagatePropertiesToMessages\": false,\n \"properties\": {}\n}")
req, _ := http.NewRequest("POST", 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.post("https://insights.reforge.com/api/v1/conversations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"conversation-123\",\n \"title\": \"Customer Support Request\",\n \"source\": \"intercom\",\n \"createdAt\": \"2024-01-01T00:00:00.000Z\",\n \"updatedAt\": \"2024-01-01T00:00:00.000Z\",\n \"contacts\": [\n {\n \"id\": \"<string>\",\n \"shouldUnflattenProperties\": true,\n \"properties\": {\n \"$email\": \"<string>\",\n \"$name\": \"<string>\",\n \"$createdAt\": \"2023-11-07T05:31:56Z\",\n \"$updatedAt\": \"2023-11-07T05:31:56Z\",\n \"$contractValue\": 100000\n },\n \"account\": {\n \"id\": \"account-789\",\n \"shouldUnflattenProperties\": true\n },\n \"source\": \"<string>\"\n }\n ],\n \"messages\": [\n {\n \"id\": \"message-789\",\n \"incoming\": true,\n \"contactId\": \"user-456\",\n \"content\": \"Hello! I'm having trouble...\",\n \"createdAt\": \"2024-01-01T00:00:00.000Z\",\n \"shouldUnflattenProperties\": true,\n \"properties\": {},\n \"sourceUrl\": \"<string>\"\n }\n ],\n \"rating\": 123,\n \"shouldUnflattenProperties\": true,\n \"propagatePropertiesToMessages\": false,\n \"properties\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://insights.reforge.com/api/v1/conversations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"conversation-123\",\n \"title\": \"Customer Support Request\",\n \"source\": \"intercom\",\n \"createdAt\": \"2024-01-01T00:00:00.000Z\",\n \"updatedAt\": \"2024-01-01T00:00:00.000Z\",\n \"contacts\": [\n {\n \"id\": \"<string>\",\n \"shouldUnflattenProperties\": true,\n \"properties\": {\n \"$email\": \"<string>\",\n \"$name\": \"<string>\",\n \"$createdAt\": \"2023-11-07T05:31:56Z\",\n \"$updatedAt\": \"2023-11-07T05:31:56Z\",\n \"$contractValue\": 100000\n },\n \"account\": {\n \"id\": \"account-789\",\n \"shouldUnflattenProperties\": true\n },\n \"source\": \"<string>\"\n }\n ],\n \"messages\": [\n {\n \"id\": \"message-789\",\n \"incoming\": true,\n \"contactId\": \"user-456\",\n \"content\": \"Hello! I'm having trouble...\",\n \"createdAt\": \"2024-01-01T00:00:00.000Z\",\n \"shouldUnflattenProperties\": true,\n \"properties\": {},\n \"sourceUrl\": \"<string>\"\n }\n ],\n \"rating\": 123,\n \"shouldUnflattenProperties\": true,\n \"propagatePropertiesToMessages\": false,\n \"properties\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": [
{
"message": "Invalid input"
}
]
}{
"error": "We are limiting to 10 per minute, please try again later"
}Authorizations
Bearer authentication header of the form Bearer , where is your auth token.
Body
The unique identifier for the conversation.
"conversation-123"
The title of the conversation.
"Customer Support Request"
The source of the conversation.
"intercom"
The date and time the conversation was created.
"2024-01-01T00:00:00.000Z"
The date and time the conversation was last updated.
"2024-01-01T00:00:00.000Z"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The numeric rating (integer)
Whether to unflatten properties that are meant to be nested objects for example { "plan.type": "Pro" } will be unflattened to { "plan": { "type": "Pro" } }
When true, conversation-level properties are merged into each message's rawData. Message properties take precedence over conversation properties when there are key conflicts.
Additional metadata properties (key-value pairs)
Response
Conversation submitted successfully.
true