Create Snippet
curl --request POST \
--url https://api.attention.tech/v2/snippets \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"user_uuid": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"conversation_id": "conv-uuid-123",
"internal": false,
"notify_views": true,
"title": "Key Discovery Moment",
"notes": "Customer mentioned budget constraints",
"in_library": true,
"video": {
"start_time": 120.5,
"end_time": 180,
"duration": 59.5
},
"reference": {
"characters": {
"start_idx": "100",
"end_idx": "250"
},
"speakers": {
"start_idx": "2",
"end_idx": "5"
},
"transcript_version": "V1"
}
}
'import requests
url = "https://api.attention.tech/v2/snippets"
payload = {
"user_uuid": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"conversation_id": "conv-uuid-123",
"internal": False,
"notify_views": True,
"title": "Key Discovery Moment",
"notes": "Customer mentioned budget constraints",
"in_library": True,
"video": {
"start_time": 120.5,
"end_time": 180,
"duration": 59.5
},
"reference": {
"characters": {
"start_idx": "100",
"end_idx": "250"
},
"speakers": {
"start_idx": "2",
"end_idx": "5"
},
"transcript_version": "V1"
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_uuid: 'a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6',
conversation_id: 'conv-uuid-123',
internal: false,
notify_views: true,
title: 'Key Discovery Moment',
notes: 'Customer mentioned budget constraints',
in_library: true,
video: {start_time: 120.5, end_time: 180, duration: 59.5},
reference: {
characters: {start_idx: '100', end_idx: '250'},
speakers: {start_idx: '2', end_idx: '5'},
transcript_version: 'V1'
}
})
};
fetch('https://api.attention.tech/v2/snippets', 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.attention.tech/v2/snippets",
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([
'user_uuid' => 'a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6',
'conversation_id' => 'conv-uuid-123',
'internal' => false,
'notify_views' => true,
'title' => 'Key Discovery Moment',
'notes' => 'Customer mentioned budget constraints',
'in_library' => true,
'video' => [
'start_time' => 120.5,
'end_time' => 180,
'duration' => 59.5
],
'reference' => [
'characters' => [
'start_idx' => '100',
'end_idx' => '250'
],
'speakers' => [
'start_idx' => '2',
'end_idx' => '5'
],
'transcript_version' => 'V1'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.attention.tech/v2/snippets"
payload := strings.NewReader("{\n \"user_uuid\": \"a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6\",\n \"conversation_id\": \"conv-uuid-123\",\n \"internal\": false,\n \"notify_views\": true,\n \"title\": \"Key Discovery Moment\",\n \"notes\": \"Customer mentioned budget constraints\",\n \"in_library\": true,\n \"video\": {\n \"start_time\": 120.5,\n \"end_time\": 180,\n \"duration\": 59.5\n },\n \"reference\": {\n \"characters\": {\n \"start_idx\": \"100\",\n \"end_idx\": \"250\"\n },\n \"speakers\": {\n \"start_idx\": \"2\",\n \"end_idx\": \"5\"\n },\n \"transcript_version\": \"V1\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.attention.tech/v2/snippets")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user_uuid\": \"a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6\",\n \"conversation_id\": \"conv-uuid-123\",\n \"internal\": false,\n \"notify_views\": true,\n \"title\": \"Key Discovery Moment\",\n \"notes\": \"Customer mentioned budget constraints\",\n \"in_library\": true,\n \"video\": {\n \"start_time\": 120.5,\n \"end_time\": 180,\n \"duration\": 59.5\n },\n \"reference\": {\n \"characters\": {\n \"start_idx\": \"100\",\n \"end_idx\": \"250\"\n },\n \"speakers\": {\n \"start_idx\": \"2\",\n \"end_idx\": \"5\"\n },\n \"transcript_version\": \"V1\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attention.tech/v2/snippets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_uuid\": \"a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6\",\n \"conversation_id\": \"conv-uuid-123\",\n \"internal\": false,\n \"notify_views\": true,\n \"title\": \"Key Discovery Moment\",\n \"notes\": \"Customer mentioned budget constraints\",\n \"in_library\": true,\n \"video\": {\n \"start_time\": 120.5,\n \"end_time\": 180,\n \"duration\": 59.5\n },\n \"reference\": {\n \"characters\": {\n \"start_idx\": \"100\",\n \"end_idx\": \"250\"\n },\n \"speakers\": {\n \"start_idx\": \"2\",\n \"end_idx\": \"5\"\n },\n \"transcript_version\": \"V1\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "snp-uuid-789",
"url": "https://app.attention.tech/snippets/snp-uuid-789",
"share_code": "abc123def"
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}Tool
Create Snippet
Creates a new conversation snippet that can be used for reference, analysis, or sharing. This endpoint allows you to capture and store important parts of conversations for future use.
POST
/
snippets
Create Snippet
curl --request POST \
--url https://api.attention.tech/v2/snippets \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"user_uuid": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"conversation_id": "conv-uuid-123",
"internal": false,
"notify_views": true,
"title": "Key Discovery Moment",
"notes": "Customer mentioned budget constraints",
"in_library": true,
"video": {
"start_time": 120.5,
"end_time": 180,
"duration": 59.5
},
"reference": {
"characters": {
"start_idx": "100",
"end_idx": "250"
},
"speakers": {
"start_idx": "2",
"end_idx": "5"
},
"transcript_version": "V1"
}
}
'import requests
url = "https://api.attention.tech/v2/snippets"
payload = {
"user_uuid": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"conversation_id": "conv-uuid-123",
"internal": False,
"notify_views": True,
"title": "Key Discovery Moment",
"notes": "Customer mentioned budget constraints",
"in_library": True,
"video": {
"start_time": 120.5,
"end_time": 180,
"duration": 59.5
},
"reference": {
"characters": {
"start_idx": "100",
"end_idx": "250"
},
"speakers": {
"start_idx": "2",
"end_idx": "5"
},
"transcript_version": "V1"
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_uuid: 'a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6',
conversation_id: 'conv-uuid-123',
internal: false,
notify_views: true,
title: 'Key Discovery Moment',
notes: 'Customer mentioned budget constraints',
in_library: true,
video: {start_time: 120.5, end_time: 180, duration: 59.5},
reference: {
characters: {start_idx: '100', end_idx: '250'},
speakers: {start_idx: '2', end_idx: '5'},
transcript_version: 'V1'
}
})
};
fetch('https://api.attention.tech/v2/snippets', 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.attention.tech/v2/snippets",
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([
'user_uuid' => 'a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6',
'conversation_id' => 'conv-uuid-123',
'internal' => false,
'notify_views' => true,
'title' => 'Key Discovery Moment',
'notes' => 'Customer mentioned budget constraints',
'in_library' => true,
'video' => [
'start_time' => 120.5,
'end_time' => 180,
'duration' => 59.5
],
'reference' => [
'characters' => [
'start_idx' => '100',
'end_idx' => '250'
],
'speakers' => [
'start_idx' => '2',
'end_idx' => '5'
],
'transcript_version' => 'V1'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.attention.tech/v2/snippets"
payload := strings.NewReader("{\n \"user_uuid\": \"a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6\",\n \"conversation_id\": \"conv-uuid-123\",\n \"internal\": false,\n \"notify_views\": true,\n \"title\": \"Key Discovery Moment\",\n \"notes\": \"Customer mentioned budget constraints\",\n \"in_library\": true,\n \"video\": {\n \"start_time\": 120.5,\n \"end_time\": 180,\n \"duration\": 59.5\n },\n \"reference\": {\n \"characters\": {\n \"start_idx\": \"100\",\n \"end_idx\": \"250\"\n },\n \"speakers\": {\n \"start_idx\": \"2\",\n \"end_idx\": \"5\"\n },\n \"transcript_version\": \"V1\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.attention.tech/v2/snippets")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user_uuid\": \"a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6\",\n \"conversation_id\": \"conv-uuid-123\",\n \"internal\": false,\n \"notify_views\": true,\n \"title\": \"Key Discovery Moment\",\n \"notes\": \"Customer mentioned budget constraints\",\n \"in_library\": true,\n \"video\": {\n \"start_time\": 120.5,\n \"end_time\": 180,\n \"duration\": 59.5\n },\n \"reference\": {\n \"characters\": {\n \"start_idx\": \"100\",\n \"end_idx\": \"250\"\n },\n \"speakers\": {\n \"start_idx\": \"2\",\n \"end_idx\": \"5\"\n },\n \"transcript_version\": \"V1\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attention.tech/v2/snippets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_uuid\": \"a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6\",\n \"conversation_id\": \"conv-uuid-123\",\n \"internal\": false,\n \"notify_views\": true,\n \"title\": \"Key Discovery Moment\",\n \"notes\": \"Customer mentioned budget constraints\",\n \"in_library\": true,\n \"video\": {\n \"start_time\": 120.5,\n \"end_time\": 180,\n \"duration\": 59.5\n },\n \"reference\": {\n \"characters\": {\n \"start_idx\": \"100\",\n \"end_idx\": \"250\"\n },\n \"speakers\": {\n \"start_idx\": \"2\",\n \"end_idx\": \"5\"\n },\n \"transcript_version\": \"V1\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "snp-uuid-789",
"url": "https://app.attention.tech/snippets/snp-uuid-789",
"share_code": "abc123def"
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}Authorizations
Body
application/jsonapplication/vnd.api+json
Snippet creation request containing the conversation content and metadata
Show child attributes
Show child attributes
Example:
{
"start_time": 120.5,
"end_time": 180.75,
"duration": 60.25
}
Show child attributes
Show child attributes
Example:
{
"characters": { "start_idx": "0", "end_idx": "150" },
"speakers": { "start_idx": "0", "end_idx": "50" },
"transcript_version": "V2"
}
Indicates whether the snippet should be added to the library or not
Show child attributes
Show child attributes
Example:
{
"my_library": true,
"folder_path": "/sales/meetings"
}
Was this page helpful?
⌘I