curl --request GET \
--url https://api.aisa.one/apis/v1/social/inbox/conversations/{conversationId}/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/social/inbox/conversations/{conversationId}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/social/inbox/conversations/{conversationId}/messages', 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.aisa.one/apis/v1/social/inbox/conversations/{conversationId}/messages",
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.aisa.one/apis/v1/social/inbox/conversations/{conversationId}/messages"
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.aisa.one/apis/v1/social/inbox/conversations/{conversationId}/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/social/inbox/conversations/{conversationId}/messages")
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{
"lastUpdated": "2023-11-07T05:31:56Z",
"messages": [
{
"accountId": "<string>",
"attachments": [
{
"filename": "<string>",
"id": "<string>",
"mimeType": "<string>",
"originalType": "<string>",
"payload": {},
"previewUrl": "<string>",
"refreshUrl": "<string>",
"type": "image",
"url": "<string>"
}
],
"conversationId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"deliveredAt": "2023-11-07T05:31:56Z",
"deliveryError": {
"code": 123,
"details": "<string>",
"href": "<string>",
"message": "<string>",
"title": "<string>"
},
"deliveryStatus": "sent",
"direction": "incoming",
"editCount": 123,
"editHistory": [
{
"attachments": [
{
"payload": {},
"type": "<string>",
"url": "<string>"
}
],
"editedAt": "2023-11-07T05:31:56Z",
"text": "<string>"
}
],
"editedAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"isDeleted": true,
"isEdited": true,
"isStoryMention": true,
"message": "<string>",
"metadata": {},
"noRenderableContent": true,
"platform": "<string>",
"reactions": [
{
"emoji": "<string>",
"fromMe": true,
"reactedAt": "2023-11-07T05:31:56Z"
}
],
"readAt": "2023-11-07T05:31:56Z",
"senderId": "<string>",
"senderName": "<string>",
"senderVerifiedType": "blue",
"sentAt": "2023-11-07T05:31:56Z",
"sentVia": "human",
"storyReply": {
"storyId": "<string>",
"storyUrl": "<string>"
},
"subject": "<string>"
}
],
"pagination": {
"hasMore": true,
"nextCursor": "<string>"
},
"sortOrderApplied": "asc",
"status": "<string>"
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "never",
"retryable": true,
"type": "<string>"
}
}List messages
Inbox. Read only; needs social:read. Ids are yours: accounts acc_…, profiles prf_…, posts pst_…; every other object id is checked against your accounts before the call.
Fetch messages for a specific conversation, with cursor-based pagination and ordering control.
Pagination
Pass pagination.nextCursor from a prior response back as the cursor query param to fetch the next page. The cursor is opaque; do not parse or construct it client-side.
Sort order
Defaults to asc (oldest first, chat style). For the “show me the latest messages” pattern, pass ?sortOrder=desc&limit=N.
- X, Instagram, Telegram, WhatsApp and Reddit honor the requested order from the local message store.
- Facebook and Bluesky upstream APIs only return newest-first and have no order parameter. Sort order is best-effort and only reverses items within a single page (pages still walk newest→oldest).
The response field sortOrderApplied tells you what was actually applied.
Platform limits
- Reddit: threads are paginated client-side because Reddit’s API has no per-thread cursor. Very long threads may be upstream-truncated by Reddit’s inbox/sent windows (~100 most-recent items each); this is a Reddit platform limitation.
- Instagram and Facebook: conversations include history from before the account was connected, replayed from Meta. See below.
- X: X’s encrypted “X Chat” messages are not accessible via the API. Conversations where the other participant uses encrypted X Chat may only show your outgoing messages. See the list conversations endpoint for more details.
The Meta replay covers the 500 most recent messages per conversation: a longer thread keeps its newest 500 and older messages are not retrievable. Messages that arrived after the account was connected are unaffected. Replayed messages are stored as already read and emit no webhooks.
Read state
This endpoint is read-only and does NOT mark messages as read or send read receipts. To mark a conversation read (and send WhatsApp blue ticks on eligible accounts), call POST /apis/v1/social/inbox/conversations/{conversationId}/read.
curl --request GET \
--url https://api.aisa.one/apis/v1/social/inbox/conversations/{conversationId}/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/social/inbox/conversations/{conversationId}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/social/inbox/conversations/{conversationId}/messages', 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.aisa.one/apis/v1/social/inbox/conversations/{conversationId}/messages",
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.aisa.one/apis/v1/social/inbox/conversations/{conversationId}/messages"
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.aisa.one/apis/v1/social/inbox/conversations/{conversationId}/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/social/inbox/conversations/{conversationId}/messages")
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{
"lastUpdated": "2023-11-07T05:31:56Z",
"messages": [
{
"accountId": "<string>",
"attachments": [
{
"filename": "<string>",
"id": "<string>",
"mimeType": "<string>",
"originalType": "<string>",
"payload": {},
"previewUrl": "<string>",
"refreshUrl": "<string>",
"type": "image",
"url": "<string>"
}
],
"conversationId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"deliveredAt": "2023-11-07T05:31:56Z",
"deliveryError": {
"code": 123,
"details": "<string>",
"href": "<string>",
"message": "<string>",
"title": "<string>"
},
"deliveryStatus": "sent",
"direction": "incoming",
"editCount": 123,
"editHistory": [
{
"attachments": [
{
"payload": {},
"type": "<string>",
"url": "<string>"
}
],
"editedAt": "2023-11-07T05:31:56Z",
"text": "<string>"
}
],
"editedAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"isDeleted": true,
"isEdited": true,
"isStoryMention": true,
"message": "<string>",
"metadata": {},
"noRenderableContent": true,
"platform": "<string>",
"reactions": [
{
"emoji": "<string>",
"fromMe": true,
"reactedAt": "2023-11-07T05:31:56Z"
}
],
"readAt": "2023-11-07T05:31:56Z",
"senderId": "<string>",
"senderName": "<string>",
"senderVerifiedType": "blue",
"sentAt": "2023-11-07T05:31:56Z",
"sentVia": "human",
"storyReply": {
"storyId": "<string>",
"storyUrl": "<string>"
},
"subject": "<string>"
}
],
"pagination": {
"hasMore": true,
"nextCursor": "<string>"
},
"sortOrderApplied": "asc",
"status": "<string>"
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "never",
"retryable": true,
"type": "<string>"
}
}请求规范
- 方法与路径: GET /apis/v1/social/inbox/conversations/{conversationId}/messages
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/social/inbox/conversations/{conversationId}/messages - conversationId: path; 必填
- accountId: query; 必填
- limit: query; 可选
- cursor: query; 可选
- sortOrder: query; 可选
{
"operationId": "get_aisa_social_apis_v1_social_inbox_conversation_3ceefe",
"method": "GET",
"path": "/apis/v1/social/inbox/conversations/{conversationId}/messages",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "Opaque conversation identifier, accepted verbatim from the list endpoint or from the conversationId on inbox webhooks. Format not to be assumed.",
"in": "path",
"name": "conversationId",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "One of your social accounts (acc_...).",
"in": "query",
"name": "accountId",
"required": true,
"schema": {
"pattern": "^acc_[0-9A-Za-z]{22}$",
"type": "string"
}
},
{
"description": "Number of messages to return per page. Default 100, max 100.",
"in": "query",
"name": "limit",
"required": false,
"schema": {
"default": 100,
"maximum": 100,
"minimum": 1,
"type": "integer"
}
},
{
"description": "Opaque pagination cursor. Pass `pagination.nextCursor` from a prior response verbatim: a cursor we cannot parse returns 400 rather than silently restarting from the first page.",
"in": "query",
"name": "cursor",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Order of returned messages. Default `asc` (oldest first, chat style).\nX, Instagram, Telegram, WhatsApp and Reddit honor this order\nacross cursor pages. For Facebook and Bluesky, only intra-page\nordering is affected. Pages always walk newest→oldest. See\n`sortOrderApplied` in the response.",
"in": "query",
"name": "sortOrder",
"required": false,
"schema": {
"default": "asc",
"enum": [
"asc",
"desc"
],
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
此操作不另收费。授权
路径参数
查询参数
Order of returned messages. Default asc (oldest first, chat style).
X, Instagram, Telegram, WhatsApp and Reddit honor this order
across cursor pages. For Facebook and Bluesky, only intra-page
ordering is affected. Pages always walk newest→oldest. See
sortOrderApplied in the response.
asc, desc 响应
Messages in conversation