Update an account note
curl --request PUT \
--url https://platform.thena.ai/v1/accounts/notes/{noteId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"content": "This is a note",
"type": "T123",
"visibility": "private",
"attachmentUrls": [
"https://example.com/attachment1.jpg",
"https://example.com/attachment2.jpg"
],
"metadata": {}
}
'import requests
url = "https://platform.thena.ai/v1/accounts/notes/{noteId}"
payload = {
"content": "This is a note",
"type": "T123",
"visibility": "private",
"attachmentUrls": ["https://example.com/attachment1.jpg", "https://example.com/attachment2.jpg"],
"metadata": {}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: 'This is a note',
type: 'T123',
visibility: 'private',
attachmentUrls: ['https://example.com/attachment1.jpg', 'https://example.com/attachment2.jpg'],
metadata: {}
})
};
fetch('https://platform.thena.ai/v1/accounts/notes/{noteId}', 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://platform.thena.ai/v1/accounts/notes/{noteId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'content' => 'This is a note',
'type' => 'T123',
'visibility' => 'private',
'attachmentUrls' => [
'https://example.com/attachment1.jpg',
'https://example.com/attachment2.jpg'
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://platform.thena.ai/v1/accounts/notes/{noteId}"
payload := strings.NewReader("{\n \"content\": \"This is a note\",\n \"type\": \"T123\",\n \"visibility\": \"private\",\n \"attachmentUrls\": [\n \"https://example.com/attachment1.jpg\",\n \"https://example.com/attachment2.jpg\"\n ],\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<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.put("https://platform.thena.ai/v1/accounts/notes/{noteId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"This is a note\",\n \"type\": \"T123\",\n \"visibility\": \"private\",\n \"attachmentUrls\": [\n \"https://example.com/attachment1.jpg\",\n \"https://example.com/attachment2.jpg\"\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.thena.ai/v1/accounts/notes/{noteId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"This is a note\",\n \"type\": \"T123\",\n \"visibility\": \"private\",\n \"attachmentUrls\": [\n \"https://example.com/attachment1.jpg\",\n \"https://example.com/attachment2.jpg\"\n ],\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"accountId": "<string>",
"account": "<string>",
"content": "<string>",
"type": "<string>",
"typeId": "<string>",
"typeConfiguration": {},
"visibility": "<string>",
"attachments": [
"<string>"
],
"author": "<string>",
"authorId": "<string>",
"authorEmail": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"metadata": {}
}{
"statusCode": 400,
"message": "Note ID is required!",
"error": "Bad Request"
}{
"statusCode": 404,
"message": "Account note not found",
"error": "Not Found"
}{
"statusCode": 500,
"message": "Something went wrong!",
"error": "Internal Server Error"
}Accounts
Updates an account note
PUT
/
v1
/
accounts
/
notes
/
{noteId}
Update an account note
curl --request PUT \
--url https://platform.thena.ai/v1/accounts/notes/{noteId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"content": "This is a note",
"type": "T123",
"visibility": "private",
"attachmentUrls": [
"https://example.com/attachment1.jpg",
"https://example.com/attachment2.jpg"
],
"metadata": {}
}
'import requests
url = "https://platform.thena.ai/v1/accounts/notes/{noteId}"
payload = {
"content": "This is a note",
"type": "T123",
"visibility": "private",
"attachmentUrls": ["https://example.com/attachment1.jpg", "https://example.com/attachment2.jpg"],
"metadata": {}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: 'This is a note',
type: 'T123',
visibility: 'private',
attachmentUrls: ['https://example.com/attachment1.jpg', 'https://example.com/attachment2.jpg'],
metadata: {}
})
};
fetch('https://platform.thena.ai/v1/accounts/notes/{noteId}', 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://platform.thena.ai/v1/accounts/notes/{noteId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'content' => 'This is a note',
'type' => 'T123',
'visibility' => 'private',
'attachmentUrls' => [
'https://example.com/attachment1.jpg',
'https://example.com/attachment2.jpg'
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://platform.thena.ai/v1/accounts/notes/{noteId}"
payload := strings.NewReader("{\n \"content\": \"This is a note\",\n \"type\": \"T123\",\n \"visibility\": \"private\",\n \"attachmentUrls\": [\n \"https://example.com/attachment1.jpg\",\n \"https://example.com/attachment2.jpg\"\n ],\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<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.put("https://platform.thena.ai/v1/accounts/notes/{noteId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"This is a note\",\n \"type\": \"T123\",\n \"visibility\": \"private\",\n \"attachmentUrls\": [\n \"https://example.com/attachment1.jpg\",\n \"https://example.com/attachment2.jpg\"\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.thena.ai/v1/accounts/notes/{noteId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"This is a note\",\n \"type\": \"T123\",\n \"visibility\": \"private\",\n \"attachmentUrls\": [\n \"https://example.com/attachment1.jpg\",\n \"https://example.com/attachment2.jpg\"\n ],\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"accountId": "<string>",
"account": "<string>",
"content": "<string>",
"type": "<string>",
"typeId": "<string>",
"typeConfiguration": {},
"visibility": "<string>",
"attachments": [
"<string>"
],
"author": "<string>",
"authorId": "<string>",
"authorEmail": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"metadata": {}
}{
"statusCode": 400,
"message": "Note ID is required!",
"error": "Bad Request"
}{
"statusCode": 404,
"message": "Account note not found",
"error": "Not Found"
}{
"statusCode": 500,
"message": "Something went wrong!",
"error": "Internal Server Error"
}Authorizations
Enter your API key
Path Parameters
Body
application/json
The content of the note
Example:
"This is a note"
The identifier / value of the type attribute of the note
Example:
"T123"
The visibility of the note
Example:
"private"
The URLs of the attachments to attach to the note
Example:
[
"https://example.com/attachment1.jpg",
"https://example.com/attachment2.jpg"
]
The metadata of the note
Example:
{}
Response
Operation successful
The identifier of the activity
The identifier of the account
The name of the account
The content of the note
The type of the note
The identifier of the type attribute
The configuration of the type
The visibility of the note
The attachments of the note
The name of the author
The identifier of the author
The email of the author
The timestamp of the note
The last updated timestamp of the note
The metadata of the note
⌘I