Create notes
curl --request POST \
--url https://api.standardmetrics.io/v1/notes/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"note": "Note content",
"company_id": "a7Rt",
"company_slug": "company-name",
"author_id": "a7Rt"
}
]
'import requests
url = "https://api.standardmetrics.io/v1/notes/"
payload = [
{
"note": "Note content",
"company_id": "a7Rt",
"company_slug": "company-name",
"author_id": "a7Rt"
}
]
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([
{
note: 'Note content',
company_id: 'a7Rt',
company_slug: 'company-name',
author_id: 'a7Rt'
}
])
};
fetch('https://api.standardmetrics.io/v1/notes/', 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.standardmetrics.io/v1/notes/",
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([
[
'note' => 'Note content',
'company_id' => 'a7Rt',
'company_slug' => 'company-name',
'author_id' => 'a7Rt'
]
]),
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.standardmetrics.io/v1/notes/"
payload := strings.NewReader("[\n {\n \"note\": \"Note content\",\n \"company_id\": \"a7Rt\",\n \"company_slug\": \"company-name\",\n \"author_id\": \"a7Rt\"\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.standardmetrics.io/v1/notes/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"note\": \"Note content\",\n \"company_id\": \"a7Rt\",\n \"company_slug\": \"company-name\",\n \"author_id\": \"a7Rt\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.standardmetrics.io/v1/notes/")
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 {\n \"note\": \"Note content\",\n \"company_id\": \"a7Rt\",\n \"company_slug\": \"company-name\",\n \"author_id\": \"a7Rt\"\n }\n]"
response = http.request(request)
puts response.read_body{
"note": "<string>",
"author_id": "<string>",
"author": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"email": "<string>",
"id": "<string>",
"company_id": "<string>"
}Notes
Create notes
Create new notes for a company. Supports creating multiple notes in a single request.
Notes::
- All notes created must be for the same company.
noteandauthor_idfields are required.- Either
company_idorcompany_slugis required.
Permissions:
- User must be authenticated via OAuth.
- User must have access to the company.
- User must have ADMIN or EDITOR role.
POST
/
notes
/
Create notes
curl --request POST \
--url https://api.standardmetrics.io/v1/notes/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"note": "Note content",
"company_id": "a7Rt",
"company_slug": "company-name",
"author_id": "a7Rt"
}
]
'import requests
url = "https://api.standardmetrics.io/v1/notes/"
payload = [
{
"note": "Note content",
"company_id": "a7Rt",
"company_slug": "company-name",
"author_id": "a7Rt"
}
]
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([
{
note: 'Note content',
company_id: 'a7Rt',
company_slug: 'company-name',
author_id: 'a7Rt'
}
])
};
fetch('https://api.standardmetrics.io/v1/notes/', 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.standardmetrics.io/v1/notes/",
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([
[
'note' => 'Note content',
'company_id' => 'a7Rt',
'company_slug' => 'company-name',
'author_id' => 'a7Rt'
]
]),
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.standardmetrics.io/v1/notes/"
payload := strings.NewReader("[\n {\n \"note\": \"Note content\",\n \"company_id\": \"a7Rt\",\n \"company_slug\": \"company-name\",\n \"author_id\": \"a7Rt\"\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.standardmetrics.io/v1/notes/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"note\": \"Note content\",\n \"company_id\": \"a7Rt\",\n \"company_slug\": \"company-name\",\n \"author_id\": \"a7Rt\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.standardmetrics.io/v1/notes/")
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 {\n \"note\": \"Note content\",\n \"company_id\": \"a7Rt\",\n \"company_slug\": \"company-name\",\n \"author_id\": \"a7Rt\"\n }\n]"
response = http.request(request)
puts response.read_body{
"note": "<string>",
"author_id": "<string>",
"author": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"email": "<string>",
"id": "<string>",
"company_id": "<string>"
}Authorizations
Your valid bearer token. All Auth tokens persist for all requests. Make sure to replace Client Credential Basic tokens with Bearer tokens after retrieving your bearer token. Go to the API Reference/Setup, User Guides/Initial Setup, or API Reference/Get API Access Token page to get your token.
Body
application/json