curl --request POST \
--url https://api.parley.so/v1/notes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"content": "<string>",
"projectId": "<string>",
"accountId": "<string>",
"contactId": "<string>"
}
'import requests
url = "https://api.parley.so/v1/notes"
payload = {
"name": "<string>",
"content": "<string>",
"projectId": "<string>",
"accountId": "<string>",
"contactId": "<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({
name: '<string>',
content: '<string>',
projectId: '<string>',
accountId: '<string>',
contactId: '<string>'
})
};
fetch('https://api.parley.so/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.parley.so/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([
'name' => '<string>',
'content' => '<string>',
'projectId' => '<string>',
'accountId' => '<string>',
'contactId' => '<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.parley.so/v1/notes"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"content\": \"<string>\",\n \"projectId\": \"<string>\",\n \"accountId\": \"<string>\",\n \"contactId\": \"<string>\"\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.parley.so/v1/notes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"content\": \"<string>\",\n \"projectId\": \"<string>\",\n \"accountId\": \"<string>\",\n \"contactId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parley.so/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 \"name\": \"<string>\",\n \"content\": \"<string>\",\n \"projectId\": \"<string>\",\n \"accountId\": \"<string>\",\n \"contactId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"location": {
"type": "project",
"id": "<string>",
"name": "<string>"
},
"version": 4503599627370496,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "The request is invalid.",
"details": {
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid credentials."
}
}{
"error": {
"code": "FORBIDDEN",
"message": "You don't have permission to do this."
}
}{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Too many requests."
}
}Create a note
Create a markdown note on a project, account, or contact: pass exactly one of projectId, accountId, or contactId. Put a note on the most specific record it is about.
curl --request POST \
--url https://api.parley.so/v1/notes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"content": "<string>",
"projectId": "<string>",
"accountId": "<string>",
"contactId": "<string>"
}
'import requests
url = "https://api.parley.so/v1/notes"
payload = {
"name": "<string>",
"content": "<string>",
"projectId": "<string>",
"accountId": "<string>",
"contactId": "<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({
name: '<string>',
content: '<string>',
projectId: '<string>',
accountId: '<string>',
contactId: '<string>'
})
};
fetch('https://api.parley.so/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.parley.so/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([
'name' => '<string>',
'content' => '<string>',
'projectId' => '<string>',
'accountId' => '<string>',
'contactId' => '<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.parley.so/v1/notes"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"content\": \"<string>\",\n \"projectId\": \"<string>\",\n \"accountId\": \"<string>\",\n \"contactId\": \"<string>\"\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.parley.so/v1/notes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"content\": \"<string>\",\n \"projectId\": \"<string>\",\n \"accountId\": \"<string>\",\n \"contactId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parley.so/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 \"name\": \"<string>\",\n \"content\": \"<string>\",\n \"projectId\": \"<string>\",\n \"accountId\": \"<string>\",\n \"contactId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"location": {
"type": "project",
"id": "<string>",
"name": "<string>"
},
"version": 4503599627370496,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "The request is invalid.",
"details": {
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid credentials."
}
}{
"error": {
"code": "FORBIDDEN",
"message": "You don't have permission to do this."
}
}{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Too many requests."
}
}Authorizations
A Parley API key.
Body
The note title.
1 - 255The note's markdown. Refer to a file with @name [blocked] and a folder with @name/ [blocked]: these render as links and survive renames. Keep existing references exactly as they are when editing.
Put the note on this project. Pass exactly one of projectId, accountId, or contactId.
1Put the note on this account. Pass exactly one of projectId, accountId, or contactId.
1Put the note on this contact. Pass exactly one of projectId, accountId, or contactId.
1Response
Created.
The note ID.
1The note title.
The project, account, or contact the note is on.
Show child attributes
Show child attributes
Goes up by one each time the content changes or the note is renamed through the API. Pass it as expectedVersion when updating the note.
1 <= x <= 9007199254740991When the note was created.
When the note was last changed, including renames.
Was this page helpful?
