Get replies for a Note
curl --request GET \
--url https://api.affinity.co/v2/notes/{noteId}/replies \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.affinity.co/v2/notes/{noteId}/replies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.affinity.co/v2/notes/{noteId}/replies', 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.affinity.co/v2/notes/{noteId}/replies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.affinity.co/v2/notes/{noteId}/replies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.affinity.co/v2/notes/{noteId}/replies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.affinity.co/v2/notes/{noteId}/replies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 2,
"type": "user-reply",
"content": {
"html": "<p> This is a user reply note. <span data-type=\"note-mention\" data-note-mention-type=\"person\" data-note-mention-person-id=\"1\"> Michael Torres </span> was mentioned. </p>"
},
"creator": {
"id": 1,
"firstName": "Jane",
"lastName": "Smith",
"primaryEmailAddress": "jane.smith@northpointvc.com",
"type": "internal"
},
"mentions": [
{
"id": 1,
"type": "person",
"person": {
"id": 1,
"firstName": "Michael",
"lastName": "Torres",
"primaryEmailAddress": "m.torres@northpointvc.com",
"type": "internal"
}
}
],
"parent": {
"id": 1
},
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": "2023-02-01T00:00:00Z"
},
{
"id": 3,
"type": "user-reply",
"content": {
"html": "<p>This is another user reply note.</p>"
},
"creator": {
"id": 2,
"firstName": "Michael",
"lastName": "Torres",
"primaryEmailAddress": "m.torres@northpointvc.com",
"type": "internal"
},
"mentions": [],
"parent": {
"id": 1
},
"createdAt": "2023-02-01T00:00:00Z",
"updatedAt": "2023-03-01T00:00:00Z"
}
],
"pagination": {
"prevUrl": "https://api.affinity.co/v2/notes/1/replies?cursor=ICAgICAgYmVmb3JlOjo6Nw",
"nextUrl": "https://api.affinity.co/v2/notes/1/notes?cursor=ICAgICAgIGFmdGVyOjo6NA"
}
}Notes
Get replies for a Note
This endpoint returns reply notes for a given note id.
You can filter replies using the filter query parameter. The filter parameter is a string that you can specify conditions based on the following properties.
| Property Name | Type | Allowed Operators | Examples |
|---|---|---|---|
creator.id | int32 | = | creator.id=1 |
createdAt | datetime | >, <, >=, <= | createdAt<2025-02-04T10:48:24Z |
updatedAt | datetime | >, <, >=, <= | updatedAt>=2025-02-03T10:48:24Z |
GET
/
v2
/
notes
/
{noteId}
/
replies
Get replies for a Note
curl --request GET \
--url https://api.affinity.co/v2/notes/{noteId}/replies \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.affinity.co/v2/notes/{noteId}/replies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.affinity.co/v2/notes/{noteId}/replies', 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.affinity.co/v2/notes/{noteId}/replies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.affinity.co/v2/notes/{noteId}/replies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.affinity.co/v2/notes/{noteId}/replies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.affinity.co/v2/notes/{noteId}/replies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 2,
"type": "user-reply",
"content": {
"html": "<p> This is a user reply note. <span data-type=\"note-mention\" data-note-mention-type=\"person\" data-note-mention-person-id=\"1\"> Michael Torres </span> was mentioned. </p>"
},
"creator": {
"id": 1,
"firstName": "Jane",
"lastName": "Smith",
"primaryEmailAddress": "jane.smith@northpointvc.com",
"type": "internal"
},
"mentions": [
{
"id": 1,
"type": "person",
"person": {
"id": 1,
"firstName": "Michael",
"lastName": "Torres",
"primaryEmailAddress": "m.torres@northpointvc.com",
"type": "internal"
}
}
],
"parent": {
"id": 1
},
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": "2023-02-01T00:00:00Z"
},
{
"id": 3,
"type": "user-reply",
"content": {
"html": "<p>This is another user reply note.</p>"
},
"creator": {
"id": 2,
"firstName": "Michael",
"lastName": "Torres",
"primaryEmailAddress": "m.torres@northpointvc.com",
"type": "internal"
},
"mentions": [],
"parent": {
"id": 1
},
"createdAt": "2023-02-01T00:00:00Z",
"updatedAt": "2023-03-01T00:00:00Z"
}
],
"pagination": {
"prevUrl": "https://api.affinity.co/v2/notes/1/replies?cursor=ICAgICAgYmVmb3JlOjo6Nw",
"nextUrl": "https://api.affinity.co/v2/notes/1/notes?cursor=ICAgICAgIGFmdGVyOjo6NA"
}
}Authorizations
A static Affinity API key, presented as a bearer token.
Path Parameters
Note ID
Required range:
1 <= x <= 2147483647Query Parameters
Filter options
Cursor for the next or previous page
Number of items to include in the page
Required range:
0 <= x <= 100Include total count of the collection in the pagination response
Response
OK
Replies for a Note
A page of Note Replies
Maximum array length:
100A reply to a note created by a user
- notes.UserReplyNote
- notes.AiNotetakerReplyNote
Show child attributes
Show child attributes
Example:
{
"id": 2,
"type": "user-reply",
"content": {
"html": "<p>This is a user reply note!</p>"
},
"creator": {
"id": 1,
"firstName": "Jane",
"lastName": "Smith",
"primaryEmailAddress": "jane.smith@northpointvc.com",
"type": "internal"
},
"mentions": [],
"parent": { "id": 1 },
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": "2023-01-21T00:00:00Z"
}
Show child attributes
Show child attributes
Was this page helpful?