Create Memory Source
curl --request POST \
--url https://api.boostgpt.co/v1/bot/source/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>",
"bot_id": "<string>",
"title": "<string>",
"type": "<string>",
"source": "<string>",
"description": "<string>",
"tags": [
"<string>"
]
}
'import requests
url = "https://api.boostgpt.co/v1/bot/source/create"
payload = {
"project_id": "<string>",
"bot_id": "<string>",
"title": "<string>",
"type": "<string>",
"source": "<string>",
"description": "<string>",
"tags": ["<string>"]
}
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({
project_id: '<string>',
bot_id: '<string>',
title: '<string>',
type: '<string>',
source: '<string>',
description: '<string>',
tags: ['<string>']
})
};
fetch('https://api.boostgpt.co/v1/bot/source/create', 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.boostgpt.co/v1/bot/source/create",
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([
'project_id' => '<string>',
'bot_id' => '<string>',
'title' => '<string>',
'type' => '<string>',
'source' => '<string>',
'description' => '<string>',
'tags' => [
'<string>'
]
]),
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.boostgpt.co/v1/bot/source/create"
payload := strings.NewReader("{\n \"project_id\": \"<string>\",\n \"bot_id\": \"<string>\",\n \"title\": \"<string>\",\n \"type\": \"<string>\",\n \"source\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\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.boostgpt.co/v1/bot/source/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"<string>\",\n \"bot_id\": \"<string>\",\n \"title\": \"<string>\",\n \"type\": \"<string>\",\n \"source\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.boostgpt.co/v1/bot/source/create")
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 \"project_id\": \"<string>\",\n \"bot_id\": \"<string>\",\n \"title\": \"<string>\",\n \"type\": \"<string>\",\n \"source\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"source": {
"id": "<string>",
"uuid": "<string>",
"title": "<string>",
"description": "<string>",
"source": "<string>",
"content": "<string>",
"type": "<string>",
"forget_after": "<string>",
"sync_frequency": "<string>",
"links": [
{
"url": "<string>",
"title": "<string>",
"tokens": 123,
"favicon": "<string>"
}
],
"tags": [
"<string>"
],
"tokens": 123,
"status": "<string>",
"synced_at": "2023-11-07T05:31:56Z",
"forget_after_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Memory
Create Memory Source
Create a new memory source for an agent
POST
/
v1
/
bot
/
source
/
create
Create Memory Source
curl --request POST \
--url https://api.boostgpt.co/v1/bot/source/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>",
"bot_id": "<string>",
"title": "<string>",
"type": "<string>",
"source": "<string>",
"description": "<string>",
"tags": [
"<string>"
]
}
'import requests
url = "https://api.boostgpt.co/v1/bot/source/create"
payload = {
"project_id": "<string>",
"bot_id": "<string>",
"title": "<string>",
"type": "<string>",
"source": "<string>",
"description": "<string>",
"tags": ["<string>"]
}
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({
project_id: '<string>',
bot_id: '<string>',
title: '<string>',
type: '<string>',
source: '<string>',
description: '<string>',
tags: ['<string>']
})
};
fetch('https://api.boostgpt.co/v1/bot/source/create', 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.boostgpt.co/v1/bot/source/create",
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([
'project_id' => '<string>',
'bot_id' => '<string>',
'title' => '<string>',
'type' => '<string>',
'source' => '<string>',
'description' => '<string>',
'tags' => [
'<string>'
]
]),
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.boostgpt.co/v1/bot/source/create"
payload := strings.NewReader("{\n \"project_id\": \"<string>\",\n \"bot_id\": \"<string>\",\n \"title\": \"<string>\",\n \"type\": \"<string>\",\n \"source\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\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.boostgpt.co/v1/bot/source/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"<string>\",\n \"bot_id\": \"<string>\",\n \"title\": \"<string>\",\n \"type\": \"<string>\",\n \"source\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.boostgpt.co/v1/bot/source/create")
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 \"project_id\": \"<string>\",\n \"bot_id\": \"<string>\",\n \"title\": \"<string>\",\n \"type\": \"<string>\",\n \"source\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"source": {
"id": "<string>",
"uuid": "<string>",
"title": "<string>",
"description": "<string>",
"source": "<string>",
"content": "<string>",
"type": "<string>",
"forget_after": "<string>",
"sync_frequency": "<string>",
"links": [
{
"url": "<string>",
"title": "<string>",
"tokens": 123,
"favicon": "<string>"
}
],
"tags": [
"<string>"
],
"tokens": 123,
"status": "<string>",
"synced_at": "2023-11-07T05:31:56Z",
"forget_after_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
Enter your API key
Body
application/json
The project ID
The agent ID
Title of the memory source
Type of memory source (e.g., 'document', 'url', 'text')
The actual source content or URL
Description of the memory source
Tags for categorizing the memory source
Time duration after which to forget this source
Available options:
1 day, 1 week, 2 weeks, 1 month, 3 months, 6 months, 1 year, never How often to sync this source
Available options:
never, weekly, monthly Response
Memory source created successfully
Memory source details
Show child attributes
Show child attributes
Was this page helpful?
⌘I