Skip to content
ProspectAPIs

API reference / Messaging reads

Read a conversation thread (live)

Written and maintained by The ProspectAPIs team

GET/v1/messages/thread

GET /v1/messages/thread is the ProspectAPIs operation readMessageThread, in the Messaging reads group of the REST API. Read the messages of one conversation thread, incremental by since/cursor. $0.01 per read. Billed per call once the messaging reads are live; while they are not yet on sale the call is free (GET /pricing reports messaging_reads.available). Cost: Launching soon. Send your API key as a Bearer token in the Authorization header.

The quickstart shows this call in context, next to the first requests most integrations make.

Parameters

Parameters of GET /v1/messages/thread
NameInTypeDescription
thread_id requiredquerystringThe thread id from GET /v1/messages.
sincequerystringRead only what changed after this value from a previous read.
cursorquerystringOpaque cursor from the previous page.
countqueryintegerMessages per page, 1 to 50.

An unknown query parameter is refused with a 400 rather than ignored, so a typo never widens a search you pay for.

Responses

Response codes of GET /v1/messages/thread
StatusMeaning
200The thread's messages, read fresh, with coverage.
400The request was invalid (e.g. a bad filter or input); nothing was charged.
401The API key is missing or invalid.
402Out of credits. The body carries top_up_url; nothing was charged.
429Too many requests; retry after the window.
503This read is temporarily unavailable. Nothing was charged.

Every error answers with the same JSON body, an error string and sometimes a code; the errors page lists each status and when it happens. A per-key 429 carries Retry-After; see rate limits.

200 response fields

The thread's messages, read fresh, with coverage. The body is a PeopleReadResult.

Fields of the 200 response
FieldTypeDescription
data requiredobjectThe read result. For search, posts, engagers and followers this is { items, page }; for a profile it is the profile object.
coverage requiredobjectHow complete the source was.
coverage.filledinteger
coverage.ofinteger
Response headers
HeaderMeaning
RateLimit-LimitRequests this API key may make per minute.
RateLimit-RemainingRequests left in the current one-minute window.
RateLimit-ResetSeconds until the current window resets.

Code samples

Each sample sends the same request. Set PROSPECTAPIS_KEY in your environment first. Values come from the spec's examples; replace them with your own.

curl
curl -G https://api.prospectapis.com/v1/messages/thread \
  -H "Authorization: Bearer $PROSPECTAPIS_KEY" \
  --data-urlencode "thread_id=thread id"
JavaScript (fetch)
const params = new URLSearchParams({ thread_id: "thread id" });
const res = await fetch(`https://api.prospectapis.com/v1/messages/thread?${params}`, {
  headers: { Authorization: `Bearer ${process.env.PROSPECTAPIS_KEY}` },
});
if (!res.ok) throw new Error(`${res.status}: ${(await res.json().catch(() => ({}))).error ?? res.statusText}`);
const data = await res.json();
console.log(data);
Python (requests)
import os, requests

res = requests.get(
    "https://api.prospectapis.com/v1/messages/thread",
    headers={"Authorization": f"Bearer {os.environ['PROSPECTAPIS_KEY']}"},
    params={"thread_id": "thread id"},
    timeout=30,
)
res.raise_for_status()
data = res.json()
print(data)

Billing

Billing reserves before it serves: the call holds what it may cost, serves at most what that hold covers, and refunds the rest when the response closes. Any non-2xx answer refunds the whole hold, so a failed call costs nothing. The response reports your balance in X-Credits-Remaining.

Previous operation: Start a conversation. Next operation: List your connections (live). Every operation, grouped by area, is on the API reference index.

Create a free account to get a key, then run the samples above with your own values.

Was this page helpful?