Skip to content
ProspectAPIs

API reference / Messaging reads

Remaining message credits

Written and maintained by The ProspectAPIs team

GET/v1/messages/inmail-credits

GET /v1/messages/inmail-credits is the ProspectAPIs operation getMessageCredits, in the Messaging reads group of the REST API. Your connected account's remaining credits for messages to people outside its network (credits_remaining), the credits POST /v1/messages with inmail: true spends. Free. Until this read is switched on it answers 503 temporarily_unavailable (GET /pricing lists it nowhere, as it has no price). Cost: free; your connected account's remaining credits for messages outside its network. 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

This operation takes no path or query parameters.

Responses

Response codes of GET /v1/messages/inmail-credits
StatusMeaning
200The remaining credits.
400The request was invalid (e.g. a bad filter or input); nothing was charged.
401The API key is missing or invalid.
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 remaining credits. 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 https://api.prospectapis.com/v1/messages/inmail-credits \
  -H "Authorization: Bearer $PROSPECTAPIS_KEY"
JavaScript (fetch)
const res = await fetch("https://api.prospectapis.com/v1/messages/inmail-credits", {
  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/inmail-credits",
    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: your connected account's remaining credits for messages outside its network. 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: Send a direct message. Next operation: React to a message. 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?