Skip to content
ProspectAPIs

API reference / People writes

Cancel a queued write

Written and maintained by The ProspectAPIs team

DELETE/v1/writes/queued/:id

DELETE /v1/writes/queued/:id is the ProspectAPIs operation cancelQueuedWrite, in the People writes group of the REST API. Cancel a write that is still queued, so it is never sent. Free. Cost: free; cancel a queued write. 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 DELETE /v1/writes/queued/:id
NameInTypeDescription
id requiredpathstringThe queued_id from the 202 answer or the list.

Responses

Response codes of DELETE /v1/writes/queued/:id
StatusMeaning
200Cancelled.
401The API key is missing or invalid.
404No queued write with this id on your account.
409Already sent, expired or cancelled.
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

Cancelled. The body is a QueuedWrite.

Fields of the 200 response
FieldTypeDescription
queued_id requiredstring (uuid)
op requiredstringThe write, e.g. message or invite.
route requiredstringThe write route, e.g. POST /v1/people/invite.
status requiredstring: queued, sending, sent, failed, expired, cancelled
reason requiredstring: session_logged_out, account_not_connected, account_reconnect_requiredWhy it was held.
created_at requiredstring (date-time)
expires_at requiredstring (date-time)
finished_at requiredstring (date-time) or null
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.
outcome.codestring
outcome.statusinteger or null
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 -X DELETE https://api.prospectapis.com/v1/writes/queued/id \
  -H "Authorization: Bearer $PROSPECTAPIS_KEY"
JavaScript (fetch)
const res = await fetch("https://api.prospectapis.com/v1/writes/queued/id", {
  method: "DELETE",
  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.delete(
    "https://api.prospectapis.com/v1/writes/queued/id",
    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: cancel a queued write. 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: List queued writes. Next operation: List connected accounts. 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 (this call acts for real, so use real inputs).

Was this page helpful?