Skip to content
ProspectAPIs

API reference / People writes

List queued writes

Written and maintained by The ProspectAPIs team

GET/v1/writes/queued

GET /v1/writes/queued is the ProspectAPIs operation listQueuedWrites, in the People writes group of the REST API. Writes sent while your connected account was signed out answer 202 queued and wait here; each is sent, through the same pacing, once the account is connected again, and charged only then. At most 50 wait per account and each expires after 72 hours. Free. Cost: free; the writes waiting for your account to reconnect. 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/writes/queued
NameInTypeDescription
statusquerystring: queued, sending, sent, failed, expired, cancelledOnly writes in this state.
limitqueryintegerHow many to return, 1 to 100.

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/writes/queued
StatusMeaning
200The queued writes, newest first.
401The API key is missing or invalid.
503Temporarily unavailable. Try again shortly.

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.

200 response fields

The queued writes, newest first.

Fields of the 200 response
FieldTypeDescription
dataarray of QueuedWrite
data[].queued_id requiredstring (uuid)
data[].op requiredstringThe write, e.g. message or invite.
data[].route requiredstringThe write route, e.g. POST /v1/people/invite.
data[].status requiredstring: queued, sending, sent, failed, expired, cancelled
data[].reason requiredstring: session_logged_out, account_not_connected, account_reconnect_requiredWhy it was held.
data[].created_at requiredstring (date-time)
data[].expires_at requiredstring (date-time)
data[].finished_at requiredstring (date-time) or null
data[].outcome requiredobject or nullSet once the write is finished. code is sent, expired, or why it was not sent: account_changed (a different account is connected now), account_disconnected (the account was disconnected), key_revoked, key_scope, key_cap_reached, insufficient_credits, duplicate, or a write error code. outcome_unknown means the send may have reached the platform but its answer was lost: it is never sent again, so check the account before sending it yourself.
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 https://api.prospectapis.com/v1/writes/queued \
  -H "Authorization: Bearer $PROSPECTAPIS_KEY"
JavaScript (fetch)
const res = await fetch("https://api.prospectapis.com/v1/writes/queued", {
  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/writes/queued",
    headers={"Authorization": f"Bearer {os.environ['PROSPECTAPIS_KEY']}"},
    timeout=30,
)
res.raise_for_status()
data = res.json()
print(data)

Billing

The call itself is free, and what it sets up is billed as it runs: the writes waiting for your account to reconnect. Metered spend on the same key is reported after each response in X-Credits-Remaining, and GET /v1/account shows the balance at any time.

Previous operation: Get one ad. Next operation: Cancel a queued write. 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?