Get Conversation
curl --request GET \
--url https://api.heralded.ai/v1/brands/{brand_id}/conversations/{member} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.heralded.ai/v1/brands/{brand_id}/conversations/{member}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.heralded.ai/v1/brands/{brand_id}/conversations/{member}', 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.heralded.ai/v1/brands/{brand_id}/conversations/{member}",
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.heralded.ai/v1/brands/{brand_id}/conversations/{member}"
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.heralded.ai/v1/brands/{brand_id}/conversations/{member}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.heralded.ai/v1/brands/{brand_id}/conversations/{member}")
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{
"has_older": true,
"mentioned_unread": 123,
"messages": [
{
"answer_status": "<string>",
"author": "<string>",
"body": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "person",
"member": "writer",
"mentions": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"proposals": [
{
"arguments": {},
"clicked_at": "2023-11-07T05:31:56Z",
"clicked_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content_piece_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"draft_id": "<string>",
"expected_state": "<string>",
"hidden_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "<string>",
"label": "<string>",
"note": "<string>",
"object": "<string>",
"result": {},
"scheduled_for": "2023-12-25",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"uses": [
"<string>"
],
"version": 123
}
],
"reply_to": {
"author": "<string>",
"body": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"suggestions": [
{
"arguments": {},
"clicked_at": "2023-11-07T05:31:56Z",
"clicked_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content_piece_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"draft_id": "<string>",
"expected_state": "<string>",
"hidden_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "<string>",
"label": "<string>",
"note": "<string>",
"object": "<string>",
"result": {},
"scheduled_for": "2023-12-25",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"uses": [
"<string>"
],
"version": 123
}
],
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_title": "<string>"
}
],
"unread": 123
}{
"code": "invalid_cursor",
"detail": "The cursor is invalid or belongs to a different query.",
"instance": "example-request-id",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}{
"code": "invalid_token",
"detail": "The Authorization header carries no API key Heralded knows: it is missing, mistyped, revoked or expired.",
"instance": "example-request-id",
"status": 401,
"title": "Unauthorized",
"type": "about:blank"
}{
"code": "not_found",
"detail": "Nothing here that this API key can read.",
"instance": "example-request-id",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}{
"code": "workspace_archived",
"detail": "The API key's organization is archived.",
"instance": "example-request-id",
"status": 409,
"title": "Conflict",
"type": "about:blank"
}{
"code": "invalid_request",
"detail": "The request's parameters are invalid; `errors` names each one.",
"errors": [
{
"loc": [
"query",
"limit"
],
"msg": "Input should be less than or equal to 100",
"type": "less_than_equal"
}
],
"instance": "example-request-id",
"status": 422,
"title": "Unprocessable Content",
"type": "about:blank"
}{
"code": "rate_limited",
"detail": "This caller is past its requests for the minute. Retry after the seconds in Retry-After.",
"instance": "example-request-id",
"rate_limit": {
"limit": 120,
"remaining": 0,
"reset": 60,
"window": 60
},
"status": 429,
"title": "Too Many Requests",
"type": "about:blank"
}Actions
Get Conversation
The shared conversation with the Writer, Publicist or Engineer, oldest first within the newest page. Filter by task_id or page backwards with before. Unread counts belong to the token’s issuer and cover the whole conversation. Reading never marks messages seen. Posting and suggestion clicks stay in the app.
GET
/
v1
/
brands
/
{brand_id}
/
conversations
/
{member}
Get Conversation
curl --request GET \
--url https://api.heralded.ai/v1/brands/{brand_id}/conversations/{member} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.heralded.ai/v1/brands/{brand_id}/conversations/{member}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.heralded.ai/v1/brands/{brand_id}/conversations/{member}', 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.heralded.ai/v1/brands/{brand_id}/conversations/{member}",
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.heralded.ai/v1/brands/{brand_id}/conversations/{member}"
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.heralded.ai/v1/brands/{brand_id}/conversations/{member}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.heralded.ai/v1/brands/{brand_id}/conversations/{member}")
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{
"has_older": true,
"mentioned_unread": 123,
"messages": [
{
"answer_status": "<string>",
"author": "<string>",
"body": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "person",
"member": "writer",
"mentions": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"proposals": [
{
"arguments": {},
"clicked_at": "2023-11-07T05:31:56Z",
"clicked_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content_piece_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"draft_id": "<string>",
"expected_state": "<string>",
"hidden_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "<string>",
"label": "<string>",
"note": "<string>",
"object": "<string>",
"result": {},
"scheduled_for": "2023-12-25",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"uses": [
"<string>"
],
"version": 123
}
],
"reply_to": {
"author": "<string>",
"body": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"suggestions": [
{
"arguments": {},
"clicked_at": "2023-11-07T05:31:56Z",
"clicked_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content_piece_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"draft_id": "<string>",
"expected_state": "<string>",
"hidden_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "<string>",
"label": "<string>",
"note": "<string>",
"object": "<string>",
"result": {},
"scheduled_for": "2023-12-25",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"uses": [
"<string>"
],
"version": 123
}
],
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_title": "<string>"
}
],
"unread": 123
}{
"code": "invalid_cursor",
"detail": "The cursor is invalid or belongs to a different query.",
"instance": "example-request-id",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}{
"code": "invalid_token",
"detail": "The Authorization header carries no API key Heralded knows: it is missing, mistyped, revoked or expired.",
"instance": "example-request-id",
"status": 401,
"title": "Unauthorized",
"type": "about:blank"
}{
"code": "not_found",
"detail": "Nothing here that this API key can read.",
"instance": "example-request-id",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}{
"code": "workspace_archived",
"detail": "The API key's organization is archived.",
"instance": "example-request-id",
"status": 409,
"title": "Conflict",
"type": "about:blank"
}{
"code": "invalid_request",
"detail": "The request's parameters are invalid; `errors` names each one.",
"errors": [
{
"loc": [
"query",
"limit"
],
"msg": "Input should be less than or equal to 100",
"type": "less_than_equal"
}
],
"instance": "example-request-id",
"status": 422,
"title": "Unprocessable Content",
"type": "about:blank"
}{
"code": "rate_limited",
"detail": "This caller is past its requests for the minute. Retry after the seconds in Retry-After.",
"instance": "example-request-id",
"rate_limit": {
"limit": 120,
"remaining": 0,
"reset": 60,
"window": 60
},
"status": 429,
"title": "Too Many Requests",
"type": "about:blank"
}Authorizations
An API key, sent as Authorization: Bearer hrld_....
Path Parameters
Available options:
writer, publicist, engineer Query Parameters
Required range:
1 <= x <= 100