Docs / Recipes
Recipes
One action does one thing. To get something done you run a few, one after the other: the answer of one gives you what the next one needs. Here are the common ones, step by step.
Every step is one call, made the usual way: a POST with your key in the Authorization header and the body shown.
- Find people and invite them
- Take back an invitation nobody answered
- Read a conversation and reply
- Answer the invitations you received
- Invite the people who reacted to a post
- Search with a LinkedIn filter (for example, a city)
- Comment on someone's latest post
Find people and invite them
Search for the kind of person you want to meet, then send each one an invitation.
Step 1. Search. Each person in the answer has a profileUrl.
POST https://api.heyreagent.com/v1/actions/search_people { "keywords": "head of sales", "location": "Berlin" }Everything about this action:
search_peopleStep 2. Send one invitation per person. Keep the invitationId from the answer if you may want to take it back.
POST https://api.heyreagent.com/v1/actions/send_invitation { "note": "Hello, I would like to connect.", "profileUrl": "FROM_STEP_1" }FROM_STEP_1ispeople[].profileUrlfrom the answer of step 1. It goes inprofileUrl.Everything about this action:
send_invitation
Take back an invitation nobody answered
See which invitations are still waiting, and withdraw one.
Step 1. List the invitations you sent that are still unanswered.
POST https://api.heyreagent.com/v1/actions/list_sent_invitations {}Everything about this action:
list_sent_invitationsStep 2. Withdraw one. This cannot be undone.
POST https://api.heyreagent.com/v1/actions/withdraw_invitation { "invitationId": "FROM_STEP_1" }FROM_STEP_1ispendingInvitations[].invitationIdfrom the answer of step 1. It goes ininvitationId.Everything about this action:
withdraw_invitation
Read a conversation and reply
Open your inbox, read one conversation, and answer in it.
Step 1. List your unread conversations. Each one has an id.
POST https://api.heyreagent.com/v1/actions/list_chats { "unread": true }Everything about this action:
list_chatsStep 2. Read the messages of one conversation.
POST https://api.heyreagent.com/v1/actions/list_chat_messages { "chatId": "FROM_STEP_1" }FROM_STEP_1ischats[].idfrom the answer of step 1. It goes inchatId.Everything about this action:
list_chat_messagesStep 3. Reply in that same conversation.
POST https://api.heyreagent.com/v1/actions/send_chat_message { "text": "Thanks for your message!", "chatId": "FROM_STEP_1" }FROM_STEP_1ischats[].idfrom the answer of step 1. It goes inchatId.Everything about this action:
send_chat_message
Answer the invitations you received
See who wants to connect with you, and accept or decline.
Step 1. List the invitations waiting for your answer.
POST https://api.heyreagent.com/v1/actions/list_received_invitations {}Everything about this action:
list_received_invitationsStep 2. Accept (or use "decline").
POST https://api.heyreagent.com/v1/actions/respond_to_invitation { "action": "accept", "invitationId": "FROM_STEP_1" }FROM_STEP_1isinvitations[].invitationIdfrom the answer of step 1. It goes ininvitationId.Everything about this action:
respond_to_invitation
Invite the people who reacted to a post
Turn the people who liked a post into new connections.
Step 1. Paste the link of the post. The answer lists who reacted and who commented.
POST https://api.heyreagent.com/v1/actions/get_post_engagers { "postUrl": "PASTE_POST_LINK_HERE" }PASTE_POST_LINK_HERE: On LinkedIn, click the More icon (the three dots) at the top right of the post, then "Copy link to post".Everything about this action:
get_post_engagersStep 2. Send one invitation per person.
POST https://api.heyreagent.com/v1/actions/send_invitation { "profileUrl": "FROM_STEP_1" }FROM_STEP_1isreactors[].linkedinUrlfrom the answer of step 1. It goes inprofileUrl.Everything about this action:
send_invitation
Search with a LinkedIn filter (for example, a city)
LinkedIn filters take its own ids, not names. First look the id up, then search with it.
Step 1. Look up the id of the place.
POST https://api.heyreagent.com/v1/actions/lookup_search_ids { "type": "LOCATION", "keywords": "Berlin" }Everything about this action:
lookup_search_idsStep 2. Search with that id as the location filter.
POST https://api.heyreagent.com/v1/actions/search_linkedin_people { "keywords": "head of sales", "location": [ "FROM_STEP_1" ] }FROM_STEP_1ismatches[].idfrom the answer of step 1. It goes inlocation.Everything about this action:
search_linkedin_peopleStep 3. Read one person from the results in full.
POST https://api.heyreagent.com/v1/actions/get_profile_details { "person": "FROM_STEP_2" }FROM_STEP_2isresults[].publicProfileUrlfrom the answer of step 2. It goes inperson.Everything about this action:
get_profile_details
Comment on someone's latest post
Find what a person posted, and leave a comment.
Step 1. List the person's posts, newest first.
POST https://api.heyreagent.com/v1/actions/list_posts_by_author { "author": "PASTE_PROFILE_LINK_HERE" }PASTE_PROFILE_LINK_HERE: Open the person's profile on LinkedIn and copy the address from your browser. It looks like https://www.linkedin.com/in/their-nameEverything about this action:
list_posts_by_authorStep 2. Comment on one of them.
POST https://api.heyreagent.com/v1/actions/comment_on_post { "text": "Great post!", "postUrl": "FROM_STEP_1" }FROM_STEP_1isposts[].socialIdfrom the answer of step 1. It goes inpostUrl.Everything about this action:
comment_on_post