Docs / Account
get_usage
Read how many of each LinkedIn action your account used today, and each daily limit.
This action only reads. It changes nothing, so it is safe to try.
What you give it
| Input | What it is | Where to get it |
|---|---|---|
connectionIdoptional | A connection id. Which of your LinkedIn accounts to act from (its id from list_linkedin_accounts). Omit to use your first live one. | Run list_linkedin_accounts and use accounts[].id from its answer.15 more places to get it
|
Call it
curl -X POST https://api.heyreagent.com/v1/actions/get_usage \
-H "Authorization: Bearer YOUR_KEY" \
-H "content-type: application/json" \
-d '{}'The same call in JavaScript
const response = await fetch("https://api.heyreagent.com/v1/actions/get_usage", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_KEY",
"content-type": "application/json",
},
body: JSON.stringify({}),
});
const answer = await response.json();
console.log(answer);The same call in Python
import requests
response = requests.post(
"https://api.heyreagent.com/v1/actions/get_usage",
headers={"Authorization": "Bearer YOUR_KEY"},
json={},
)
print(response.json())The same call in n8n
Add an HTTP Request node and fill it in like this:
| Method | POST |
| URL | https://api.heyreagent.com/v1/actions/get_usage |
| Send Headers | On. Name Authorization, Value Bearer YOUR_KEY |
| Send Body | On. Body Content Type JSON, Specify Body Using JSON, then paste the body below |
{}Put your own key where it says YOUR_KEY. New here? Start with your first call.
What you get back
When it worked, the answer is { "ok": true, "result": { … } }. Inside result:
account | |
connectionId | A connection id. Other actions take it. |
resetAt | |
actions | |
invitations |
A field that does not apply to an answer is left out, or is null.
When it did not work, the answer is { "ok": false, "error": "…", "message": "…" }. What each error means.
Good to know
- invitations holds what a day's count does not: whether the account counts as paid or free, the invitations of the last 7 days against the weekly limit, on a free account the ones with a note in the last 30 days, and how long a note can be.
- To tell a paid account from a free one, the account's own profile is read, at most once in six hours. An account that cannot be read counts as free.
Guides that use it
- How to edit or unsend a LinkedIn message from your AI app
- How to invite the people who reacted to a LinkedIn post
- HeyReach, Apify and Claude: check who is active before you invite
- How to work your LinkedIn Recruiter pipeline from your AI app
- LinkedIn message automation, one person at a time
- How to send and read LinkedIn InMail from your AI app
- How to post a LinkedIn job and read applicants from your AI app
- How to comment on someone's LinkedIn posts from your AI app
- How to accept or decline LinkedIn invitations from your AI app
- An AI agent that answers your LinkedIn messages
- How to send LinkedIn invitations from Claude
- How to withdraw LinkedIn invitations nobody answered
In Claude or ChatGPT
Once connected, ask in your own words. The assistant sees this action as a tool with the same name, get_usage, and the same inputs.
More in Account
connect_linkedinConnect a LinkedIn accountupdate_linkedin_connectionFix or update a LinkedIn connectionlist_linkedin_accountsList connected LinkedIn accounts