Add Memory To Pack
curl --request POST \
--url https://api.example.com/context-packs/{context_pack_name}/memories \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": {
"text": "<string>",
"type": "text"
},
"source": {
"type": "<string>",
"conversation_id": "<string>",
"turn_index": 123,
"actor": "<string>",
"confidence": 0.5,
"document_url": "<string>"
},
"content_url": "<string>",
"search_text": "<string>",
"classification": {
"domain": "<string>",
"priority": "normal",
"tags": [
"<string>"
],
"sensitivity": "<string>"
},
"metadata": {},
"expires_at": "2023-11-07T05:31:56Z",
"pinned": false
}
'import requests
url = "https://api.example.com/context-packs/{context_pack_name}/memories"
payload = {
"content": {
"text": "<string>",
"type": "text"
},
"source": {
"type": "<string>",
"conversation_id": "<string>",
"turn_index": 123,
"actor": "<string>",
"confidence": 0.5,
"document_url": "<string>"
},
"content_url": "<string>",
"search_text": "<string>",
"classification": {
"domain": "<string>",
"priority": "normal",
"tags": ["<string>"],
"sensitivity": "<string>"
},
"metadata": {},
"expires_at": "2023-11-07T05:31:56Z",
"pinned": False
}
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({
content: {text: '<string>', type: 'text'},
source: {
type: '<string>',
conversation_id: '<string>',
turn_index: 123,
actor: '<string>',
confidence: 0.5,
document_url: '<string>'
},
content_url: '<string>',
search_text: '<string>',
classification: {
domain: '<string>',
priority: 'normal',
tags: ['<string>'],
sensitivity: '<string>'
},
metadata: {},
expires_at: '2023-11-07T05:31:56Z',
pinned: false
})
};
fetch('https://api.example.com/context-packs/{context_pack_name}/memories', 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.example.com/context-packs/{context_pack_name}/memories",
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([
'content' => [
'text' => '<string>',
'type' => 'text'
],
'source' => [
'type' => '<string>',
'conversation_id' => '<string>',
'turn_index' => 123,
'actor' => '<string>',
'confidence' => 0.5,
'document_url' => '<string>'
],
'content_url' => '<string>',
'search_text' => '<string>',
'classification' => [
'domain' => '<string>',
'priority' => 'normal',
'tags' => [
'<string>'
],
'sensitivity' => '<string>'
],
'metadata' => [
],
'expires_at' => '2023-11-07T05:31:56Z',
'pinned' => false
]),
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.example.com/context-packs/{context_pack_name}/memories"
payload := strings.NewReader("{\n \"content\": {\n \"text\": \"<string>\",\n \"type\": \"text\"\n },\n \"source\": {\n \"type\": \"<string>\",\n \"conversation_id\": \"<string>\",\n \"turn_index\": 123,\n \"actor\": \"<string>\",\n \"confidence\": 0.5,\n \"document_url\": \"<string>\"\n },\n \"content_url\": \"<string>\",\n \"search_text\": \"<string>\",\n \"classification\": {\n \"domain\": \"<string>\",\n \"priority\": \"normal\",\n \"tags\": [\n \"<string>\"\n ],\n \"sensitivity\": \"<string>\"\n },\n \"metadata\": {},\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"pinned\": false\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://api.example.com/context-packs/{context_pack_name}/memories")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": {\n \"text\": \"<string>\",\n \"type\": \"text\"\n },\n \"source\": {\n \"type\": \"<string>\",\n \"conversation_id\": \"<string>\",\n \"turn_index\": 123,\n \"actor\": \"<string>\",\n \"confidence\": 0.5,\n \"document_url\": \"<string>\"\n },\n \"content_url\": \"<string>\",\n \"search_text\": \"<string>\",\n \"classification\": {\n \"domain\": \"<string>\",\n \"priority\": \"normal\",\n \"tags\": [\n \"<string>\"\n ],\n \"sensitivity\": \"<string>\"\n },\n \"metadata\": {},\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"pinned\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/context-packs/{context_pack_name}/memories")
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 \"content\": {\n \"text\": \"<string>\",\n \"type\": \"text\"\n },\n \"source\": {\n \"type\": \"<string>\",\n \"conversation_id\": \"<string>\",\n \"turn_index\": 123,\n \"actor\": \"<string>\",\n \"confidence\": 0.5,\n \"document_url\": \"<string>\"\n },\n \"content_url\": \"<string>\",\n \"search_text\": \"<string>\",\n \"classification\": {\n \"domain\": \"<string>\",\n \"priority\": \"normal\",\n \"tags\": [\n \"<string>\"\n ],\n \"sensitivity\": \"<string>\"\n },\n \"metadata\": {},\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"pinned\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"context_pack_id": "<string>",
"version": 123,
"content": {},
"source": {
"type": "<string>",
"conversation_id": "<string>",
"turn_index": 123,
"actor": "<string>",
"confidence": 0.5,
"document_url": "<string>"
},
"classification": {
"domain": "<string>",
"priority": "normal",
"tags": [
"<string>"
],
"sensitivity": "<string>"
},
"metadata": {},
"quality": {
"validation_status": "unvalidated",
"confidence_score": 123,
"validated_at": "2023-11-07T05:31:56Z",
"validated_by": "<string>"
},
"access": {
"count": 123,
"success_count": 123,
"failure_count": 123,
"last_accessed": "2023-11-07T05:31:56Z",
"success_rate": 123
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"content_url": "<string>",
"search_text": "<string>",
"superseded_by": "<string>",
"archived_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"superseded_at": "2023-11-07T05:31:56Z",
"reactivated_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"pinned": false,
"pinned_at": "2023-11-07T05:31:56Z",
"unpinned_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}context-pack
Add Memory To Pack
POST
/
context-packs
/
{context_pack_name}
/
memories
Add Memory To Pack
curl --request POST \
--url https://api.example.com/context-packs/{context_pack_name}/memories \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": {
"text": "<string>",
"type": "text"
},
"source": {
"type": "<string>",
"conversation_id": "<string>",
"turn_index": 123,
"actor": "<string>",
"confidence": 0.5,
"document_url": "<string>"
},
"content_url": "<string>",
"search_text": "<string>",
"classification": {
"domain": "<string>",
"priority": "normal",
"tags": [
"<string>"
],
"sensitivity": "<string>"
},
"metadata": {},
"expires_at": "2023-11-07T05:31:56Z",
"pinned": false
}
'import requests
url = "https://api.example.com/context-packs/{context_pack_name}/memories"
payload = {
"content": {
"text": "<string>",
"type": "text"
},
"source": {
"type": "<string>",
"conversation_id": "<string>",
"turn_index": 123,
"actor": "<string>",
"confidence": 0.5,
"document_url": "<string>"
},
"content_url": "<string>",
"search_text": "<string>",
"classification": {
"domain": "<string>",
"priority": "normal",
"tags": ["<string>"],
"sensitivity": "<string>"
},
"metadata": {},
"expires_at": "2023-11-07T05:31:56Z",
"pinned": False
}
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({
content: {text: '<string>', type: 'text'},
source: {
type: '<string>',
conversation_id: '<string>',
turn_index: 123,
actor: '<string>',
confidence: 0.5,
document_url: '<string>'
},
content_url: '<string>',
search_text: '<string>',
classification: {
domain: '<string>',
priority: 'normal',
tags: ['<string>'],
sensitivity: '<string>'
},
metadata: {},
expires_at: '2023-11-07T05:31:56Z',
pinned: false
})
};
fetch('https://api.example.com/context-packs/{context_pack_name}/memories', 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.example.com/context-packs/{context_pack_name}/memories",
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([
'content' => [
'text' => '<string>',
'type' => 'text'
],
'source' => [
'type' => '<string>',
'conversation_id' => '<string>',
'turn_index' => 123,
'actor' => '<string>',
'confidence' => 0.5,
'document_url' => '<string>'
],
'content_url' => '<string>',
'search_text' => '<string>',
'classification' => [
'domain' => '<string>',
'priority' => 'normal',
'tags' => [
'<string>'
],
'sensitivity' => '<string>'
],
'metadata' => [
],
'expires_at' => '2023-11-07T05:31:56Z',
'pinned' => false
]),
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.example.com/context-packs/{context_pack_name}/memories"
payload := strings.NewReader("{\n \"content\": {\n \"text\": \"<string>\",\n \"type\": \"text\"\n },\n \"source\": {\n \"type\": \"<string>\",\n \"conversation_id\": \"<string>\",\n \"turn_index\": 123,\n \"actor\": \"<string>\",\n \"confidence\": 0.5,\n \"document_url\": \"<string>\"\n },\n \"content_url\": \"<string>\",\n \"search_text\": \"<string>\",\n \"classification\": {\n \"domain\": \"<string>\",\n \"priority\": \"normal\",\n \"tags\": [\n \"<string>\"\n ],\n \"sensitivity\": \"<string>\"\n },\n \"metadata\": {},\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"pinned\": false\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://api.example.com/context-packs/{context_pack_name}/memories")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": {\n \"text\": \"<string>\",\n \"type\": \"text\"\n },\n \"source\": {\n \"type\": \"<string>\",\n \"conversation_id\": \"<string>\",\n \"turn_index\": 123,\n \"actor\": \"<string>\",\n \"confidence\": 0.5,\n \"document_url\": \"<string>\"\n },\n \"content_url\": \"<string>\",\n \"search_text\": \"<string>\",\n \"classification\": {\n \"domain\": \"<string>\",\n \"priority\": \"normal\",\n \"tags\": [\n \"<string>\"\n ],\n \"sensitivity\": \"<string>\"\n },\n \"metadata\": {},\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"pinned\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/context-packs/{context_pack_name}/memories")
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 \"content\": {\n \"text\": \"<string>\",\n \"type\": \"text\"\n },\n \"source\": {\n \"type\": \"<string>\",\n \"conversation_id\": \"<string>\",\n \"turn_index\": 123,\n \"actor\": \"<string>\",\n \"confidence\": 0.5,\n \"document_url\": \"<string>\"\n },\n \"content_url\": \"<string>\",\n \"search_text\": \"<string>\",\n \"classification\": {\n \"domain\": \"<string>\",\n \"priority\": \"normal\",\n \"tags\": [\n \"<string>\"\n ],\n \"sensitivity\": \"<string>\"\n },\n \"metadata\": {},\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"pinned\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"context_pack_id": "<string>",
"version": 123,
"content": {},
"source": {
"type": "<string>",
"conversation_id": "<string>",
"turn_index": 123,
"actor": "<string>",
"confidence": 0.5,
"document_url": "<string>"
},
"classification": {
"domain": "<string>",
"priority": "normal",
"tags": [
"<string>"
],
"sensitivity": "<string>"
},
"metadata": {},
"quality": {
"validation_status": "unvalidated",
"confidence_score": 123,
"validated_at": "2023-11-07T05:31:56Z",
"validated_by": "<string>"
},
"access": {
"count": 123,
"success_count": 123,
"failure_count": 123,
"last_accessed": "2023-11-07T05:31:56Z",
"success_rate": 123
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"content_url": "<string>",
"search_text": "<string>",
"superseded_by": "<string>",
"archived_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"superseded_at": "2023-11-07T05:31:56Z",
"reactivated_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"pinned": false,
"pinned_at": "2023-11-07T05:31:56Z",
"unpinned_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
- TextContent
- StructuredContent
- CodeContent
- ExperienceContent
- JsonContent
Show child attributes
Show child attributes
Available options:
fact, experience, observation, instruction, preference, summary, glossary, ontology, textual_pattern, kpi, exemplar, join, numeric_pattern, policy Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Successful Response
Available options:
fact, experience, observation, instruction, preference, summary, glossary, ontology, textual_pattern, kpi, exemplar, join, numeric_pattern, policy Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
active, superseded, archived, deleted Was this page helpful?
⌘I

