Automatically add contacts to a project with the Alpharun API
The Alpharun API allows you to programmatically add contacts to a project, which will trigger email outreach to that contact to conduct an interview. Example use cases:
When a deal is lost in your CRM, automatically add the primary contact to a "Lost Deal Interviews" Alpharun project. Alpharun will begin email outreach to that contact to conduct an interview.
When a customer churns, automatically add the primary contact to a "Churn Interviews" Alpharun project so we can interview them about why they churned.
Setup takes just a few steps:
1. Create an API Key
An API key is required to use the Alpharun API. To create an API key, go to Developer Settings, and then click "Create API Key". Store the key you created in a safe place like a password manager.
2. Get your Project ID
Open the Project you want to add contacts to, click the three dot menu on the top right corner, and select "Copy Project ID"
3. Make an API request to add contacts to a project
Option 1: with code
Make a POST request to the following endpoint:
POST https://api.alpharun.com/api/v1/projects/{PROJECT_ID}/contacts
Be sure to replace "{PROJECT_ID}" with the project ID you copied in step 2.
In the request body, supply an array of 1 or more contact objects:
Contact Properties:
- email (required): The contact's email address.
- first_name (optional): The contact's first name.
- last_name (optional): The contact's last name.
Example request:
curl --request POST \
--url https://api.alpharun.com/api/v1/projects/ \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
[
{
"email": "johndoe@example.com",
"first_name": "John",
"last_name": "Doe"
},
{
"email": "amysmith@example.com",
"first_name": "Amy",
"last_name": "Smith"
}
]
Option 2: use a no-code automation solution like Zapier
Get started with this Zapier template. To trigger an interview in Alpharun, you'll need to choose the "Webhooks by Zapier" action and then follow these steps:
For "Event" choose "Custom Request"
Then update the action with the following properties:
Method | POST |
URL | https://api.alpharun.com/api/v1/projects/PROJECT_ID/contacts Be sure to replace PROJECT_ID with your project ID from Step 2 above) |
Data | [{ "email": "{Contact Email Variable}", "first_name": "{Contact First Name Variable}", "last_name": "{Contact Last Name Variable}" }] Make sure to omit the {} brackets when filling in variables. |
Headers | Add the following two headers: Name: Authorization Value: Bearer {YOUR_API_KEY} Name: content-type Value: application/json |
Here's how your Zapier action should look:
From there, you can test your Zap and should see a contact get added to your project in Alpharun. If your Alpharun project is launched, Alpharun will begin outreach to that contact to conduct an interview.
Questions? Reach out to us at support@alpharun.com.