List contacts
curl --request GET \
--url https://api.mailbeast.ai/v1/contacts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mailbeast.ai/v1/contacts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mailbeast.ai/v1/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mailbeast.ai/v1/contacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mailbeast.ai/v1/contacts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.mailbeast.ai/v1/contacts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mailbeast.ai/v1/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "019a7c3e-5b21-7d40-9e1f-2a3b4c5d6e7f",
"email": "[email protected]",
"tags": [
"vip"
],
"customFields": {
"industry": "SaaS"
},
"doNotContact": true,
"inSequence": true,
"verification": {
"status": "valid",
"subStatus": "<string>",
"verifiedAt": "2023-11-07T05:31:56Z"
},
"provider": "google",
"emailsSent": 3,
"campaigns": [
{
"campaignId": "a7d4e2f1-08b3-4c65-9e7a-1b2c3d4e5f60",
"campaignName": "Q4 Product Launch Outreach",
"leadId": "c9e5b1a3-7f24-4d80-a6b9-2e4f8c0d1a37",
"leadStatus": "email_sent",
"inSequence": true
}
],
"version": 2,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"firstName": "Anna",
"lastName": "Berg",
"companyName": "Northwind",
"jobTitle": "Head of Sales",
"website": "northwind.io",
"linkedinProfile": "<string>",
"location": "Berlin",
"status": "not_contacted",
"repliedAt": "2023-11-07T05:31:56Z"
}
],
"meta": {
"hasMore": true,
"nextCursor": "eyJ0cyI6IjIwMjYtMDctMDJUMDA6MDA6MDAuMDAwWiIsImlkIjoiM2YxYzJiN2UtOWE0ZC00ZTE4LWIyYzEtNmQ4ZjVhMGU3YzkzIn0"
}
}{
"error": {
"type": "invalid_request_error",
"code": "validation_failed",
"message": "One or more fields are invalid.",
"status": 400,
"requestId": "e4f1c0b2-6a3d-4b8e-9f21-0a1b2c3d4e5f",
"details": [
"name should not be empty"
]
}
}{
"error": {
"type": "authentication_error",
"code": "unauthenticated",
"message": "Missing or invalid API key.",
"status": 401,
"requestId": "e4f1c0b2-6a3d-4b8e-9f21-0a1b2c3d4e5f"
}
}{
"error": {
"type": "authorization_error",
"code": "permission_denied",
"message": "This API key is missing the required scope.",
"status": 403,
"requestId": "e4f1c0b2-6a3d-4b8e-9f21-0a1b2c3d4e5f"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Too many requests. Retry after the interval in the Retry-After header.",
"status": 429,
"requestId": "e4f1c0b2-6a3d-4b8e-9f21-0a1b2c3d4e5f",
"retryAfter": 30
}
}Contacts
List contacts
Page through the people of the workspace, newest first, with their profile, status and campaigns. Filter by search, status, campaign or email domain.
Requires one of the following scopes: contacts:read, contacts:all, all:read, all:all.
GET
/
v1
/
contacts
List contacts
curl --request GET \
--url https://api.mailbeast.ai/v1/contacts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mailbeast.ai/v1/contacts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mailbeast.ai/v1/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mailbeast.ai/v1/contacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mailbeast.ai/v1/contacts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.mailbeast.ai/v1/contacts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mailbeast.ai/v1/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "019a7c3e-5b21-7d40-9e1f-2a3b4c5d6e7f",
"email": "[email protected]",
"tags": [
"vip"
],
"customFields": {
"industry": "SaaS"
},
"doNotContact": true,
"inSequence": true,
"verification": {
"status": "valid",
"subStatus": "<string>",
"verifiedAt": "2023-11-07T05:31:56Z"
},
"provider": "google",
"emailsSent": 3,
"campaigns": [
{
"campaignId": "a7d4e2f1-08b3-4c65-9e7a-1b2c3d4e5f60",
"campaignName": "Q4 Product Launch Outreach",
"leadId": "c9e5b1a3-7f24-4d80-a6b9-2e4f8c0d1a37",
"leadStatus": "email_sent",
"inSequence": true
}
],
"version": 2,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"firstName": "Anna",
"lastName": "Berg",
"companyName": "Northwind",
"jobTitle": "Head of Sales",
"website": "northwind.io",
"linkedinProfile": "<string>",
"location": "Berlin",
"status": "not_contacted",
"repliedAt": "2023-11-07T05:31:56Z"
}
],
"meta": {
"hasMore": true,
"nextCursor": "eyJ0cyI6IjIwMjYtMDctMDJUMDA6MDA6MDAuMDAwWiIsImlkIjoiM2YxYzJiN2UtOWE0ZC00ZTE4LWIyYzEtNmQ4ZjVhMGU3YzkzIn0"
}
}{
"error": {
"type": "invalid_request_error",
"code": "validation_failed",
"message": "One or more fields are invalid.",
"status": 400,
"requestId": "e4f1c0b2-6a3d-4b8e-9f21-0a1b2c3d4e5f",
"details": [
"name should not be empty"
]
}
}{
"error": {
"type": "authentication_error",
"code": "unauthenticated",
"message": "Missing or invalid API key.",
"status": 401,
"requestId": "e4f1c0b2-6a3d-4b8e-9f21-0a1b2c3d4e5f"
}
}{
"error": {
"type": "authorization_error",
"code": "permission_denied",
"message": "This API key is missing the required scope.",
"status": 403,
"requestId": "e4f1c0b2-6a3d-4b8e-9f21-0a1b2c3d4e5f"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Too many requests. Retry after the interval in the Retry-After header.",
"status": 429,
"requestId": "e4f1c0b2-6a3d-4b8e-9f21-0a1b2c3d4e5f",
"retryAfter": 30
}
}Authorizations
Query Parameters
Contact status: the furthest status of the person across their campaigns.
Available options:
not_contacted, scheduled, email_sent, failed, skipped, lead_replied_interested, lead_replied_meeting_request, lead_replied_out_of_office, lead_replied_bounce, lead_replied_wrong_person, lead_replied_not_interested, lead_replied_unsubscribed, lead_replied_uncategorized, lead_converted, lead_lost, blacklisted