Create a reply
curl --request POST \
--url https://api.reintersect.com/v0/replies \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reintersect.com/v0/replies"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reintersect.com/v0/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.reintersect.com/v0/replies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.reintersect.com/v0/replies"
req, _ := http.NewRequest("POST", 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.post("https://api.reintersect.com/v0/replies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reintersect.com/v0/replies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyReplies, streams and notifications
Create a reply
Post a message authored by your app: in a conversation, as a reply, or in a circle’s chat.
POST
/
v0
/
replies
Create a reply
curl --request POST \
--url https://api.reintersect.com/v0/replies \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reintersect.com/v0/replies"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reintersect.com/v0/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.reintersect.com/v0/replies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.reintersect.com/v0/replies"
req, _ := http.NewRequest("POST", 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.post("https://api.reintersect.com/v0/replies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reintersect.com/v0/replies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body
Posts a message as your app in a conversation, as a reply to a message, or, in circles that use chat,
straight into the circle’s chat. See Writing to circles.
Authenticate with an install token that has the
With the SDK, call
replies:write scope. The target must be within the install’s
reach.
Body
Send exactly one ofconversationId, replyTo and circleId.
| Field | Type | Required | Description |
|---|---|---|---|
conversationId | string | One of | Post in this conversation. In a circle that uses chat, the message also shows in the chat. |
replyTo | string | One of | Reply to this message. In chat it’s an inline reply; on a board, a reply under that reply. |
circleId | string | One of | Post in this circle’s chat. Only for circles that use chat; Reintersect may file the message into a conversation later. |
content | Document | Yes | A structured document, such as the output of renderPayload. Links, references, member mentions, and mentions of circles and conversations your app can reach are allowed; files and images aren’t. |
Response
The created message:| Field | Type | Description |
|---|---|---|
id | string | The message id. |
circleId | string | The circle it’s in. |
conversationId | string | null | The conversation it’s filed in, or null for a chat message not filed in one. |
parentReplyId | string | null | The reply it answers on a board, or null. |
content | Document | The stored content. |
author | Author | Your app. |
createdAt, updatedAt | string | ISO 8601 timestamps. |
Errors
_tag | Status | Cause |
|---|---|---|
ReintersectAppScopeMissingError | 403 | The install lacks replies:write. |
ReintersectApiConversationNotFoundError | 404 | No such conversation in the install’s reach. |
ReintersectApiReplyNotFoundError | 404 | No such message in the install’s reach. |
ReintersectAppCircleNotFoundError | 404 | No such circle in the install’s reach, or the circle doesn’t use chat. circleIds holds the circle id you sent. |
ReintersectApiReplyNestingLimitError | 422 | On a board, the reply is already nested as deep as replies go. |
ReintersectApiMentionUnavailableError | 422 | A mention names a member, circle or conversation that doesn’t exist or that your app can’t reach. |
ReintersectApiCircleMentionUnavailableError | 422 | A circle mentioned by slug doesn’t exist or your app can’t reach it. |
ReintersectApiInvalidDocumentError | 422 | The content isn’t a valid document. |
ReintersectApiUnsafeLinkError | 422 | A link uses a scheme Reintersect doesn’t allow. |
ReintersectApiInvalidEmojiNameError, ReintersectApiInvalidAssetReferenceError | 422 | An unknown emoji name or asset reference in the content. |
reintersect.replies.create({ conversationId, content: <Paragraph>Done.</Paragraph> }),
or pass replyTo or circleId instead of conversationId.