B2B Person Profile to Email
Provide a B2B person profile and get back the work email of the person.
POST
/
v1
/
people
/
b2b-profile-email
B2B Person Profile to Email
curl --request POST \
--url https://api.leadmagic.io/v1/people/b2b-profile-email \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"profile_url": "alex-rivera"
}
'import requests
url = "https://api.leadmagic.io/v1/people/b2b-profile-email"
payload = { "profile_url": "alex-rivera" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({profile_url: 'alex-rivera'})
};
fetch('https://api.leadmagic.io/v1/people/b2b-profile-email', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leadmagic.io/v1/people/b2b-profile-email"
payload := strings.NewReader("{\n \"profile_url\": \"alex-rivera\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadmagic.io/v1/people/b2b-profile-email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'profile_url' => 'alex-rivera'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"profile_url": "alex-rivera",
"credits_consumed": 5,
"message": "Email Found.",
"email": "alex.rivera@example.com"
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/validation_error",
"title": "Request validation failed. Check your input parameters.",
"status": 400,
"code": "validation_error",
"param": [
"email"
],
"detail": "Email format is invalid. Expected format: user@domain.com",
"action": "Provide a valid email address in the 'email' field.",
"docs": "https://leadmagic.io/docs/api-reference/errors"
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/missing_authentication",
"title": "Authentication required. Provide a valid API key in the X-API-Key header (case-insensitive).",
"status": 401,
"code": "missing_authentication",
"docs": "https://leadmagic.io/docs/api-reference/authentication"
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/insufficient_credits",
"title": "Insufficient credits: need 5, have 2.50. Add credits to continue.",
"status": 402,
"code": "insufficient_credits",
"detail": "This request requires 5 credit(s) but your account only has 2.50 credits remaining.",
"action": "Add credits to your account at https://app.leadmagic.io/billing or contact support@leadmagic.io for enterprise plans.",
"docs": "https://leadmagic.io/docs/api-reference/credits",
"context": {
"credits_required": 5,
"credits_available": 2.5,
"credits_needed": 2.5
}
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/resource_not_found",
"title": "Resource not found.",
"status": 404,
"code": "resource_not_found",
"docs": "https://leadmagic.io/docs/api-reference/errors"
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/rate_limit_exceeded",
"title": "Rate limit exceeded: 300 requests per 1 minute. Wait and try again.",
"status": 429,
"code": "rate_limit_exceeded",
"detail": "You have exceeded the maximum allowed request rate. Please wait before making additional requests.",
"action": "Wait 42 seconds before retrying. Consider implementing exponential backoff.",
"docs": "https://leadmagic.io/docs/api-reference/rate-limits",
"context": {
"limit": 300,
"window": "1 minute",
"remaining": 0,
"reset_at": 1706745642,
"retry_after_seconds": 42
}
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/INTERNAL_ERROR",
"title": "Something went wrong on our end. Our team has been notified and is investigating.",
"status": 500,
"code": "INTERNAL_ERROR",
"detail": "This is a temporary server error. The issue has been automatically reported to our team.",
"action": "Wait 30 seconds and retry your request. If the problem persists, contact support@leadmagic.io",
"docs": "https://leadmagic.io/docs/api-reference/errors"
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}B2B Person Profile to Email
Convert a B2B person profile into a verified work email address. The reverse of Email to B2B Person Profile.Endpoint Details
- Pricing
- Rate Limits
| Metric | Value |
|---|---|
| Cost | 5 credits per email found |
| No Results | FREE if no email found |
Every email found is automatically validated for deliverability.
Per-Endpoint Limit
| Metric | Value |
|---|---|
| Requests/Minute | 300 |
| Burst Capacity | ~5 requests/second |
Rate limits are subject to change. Custom rate limits are available on enterprise plans — contact us.
Quick Example
curl -X POST 'https://api.leadmagic.io/v1/people/b2b-profile-email' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"profile_url": "linkedin.com/in/alex-rivera"}'
const response = await fetch('https://api.leadmagic.io/v1/people/b2b-profile-email', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({ profile_url: 'linkedin.com/in/alex-rivera' })
});
const data = await response.json();
if (data.email) {
console.log(`Email: ${data.email}`);
}
import requests
response = requests.post(
'https://api.leadmagic.io/v1/people/b2b-profile-email',
headers={'X-API-Key': 'YOUR_API_KEY'},
json={'profile_url': 'linkedin.com/in/alex-rivera'}
)
data = response.json()
print(f"Email: {data.get('email', 'Not found')}")
Request Parameters
string
required
B2B person profile URL or slug.
Response
string
Work email address found (null if not found)
string
required
The B2B person profile used for lookup
number
required
Credits used (5 if found, 0 if not)
string
required
Human-readable status message
Example Response
{
"email": "alex.rivera@example.com",
"profile_url": "linkedin.com/in/alex-rivera",
"credits_consumed": 5,
"message": "Email found."
}
Success Messages
| Message | Meaning | Cost |
|---|---|---|
Email found. | Work email successfully retrieved | 5 credits |
No email found for this profile. | No work email available | FREE |
Best Practices
Clean profile URLs
Clean profile URLs
Remove tracking parameters from profile URLs for best results. Just the base URL works.
Just the username works
Just the username works
You can pass just
alex-rivera and we’ll resolve it to the full profile.Compare with Email Finder
Compare with Email Finder
If you have the person’s name and company, Email Finder (1 credit) may be more cost-effective than this endpoint (5 credits).
Use Cases
Profile Prospecting
Found someone’s B2B person profile? Get their work email instantly.
B2B Profile Export
Convert exported B2B profile lists into actionable email lists.
Event Follow-up
Got connections at an event? Get their emails.
Inbound Lead Enrichment
Visitor shared their profile? Get their work contact.
Authorizations
Your LeadMagic API key. Header name is case-insensitive (X-API-Key, X-API-KEY, x-api-key all work).
Body
application/json
B2B person profile URL or slug
Was this page helpful?
⌘I
B2B Person Profile to Email
curl --request POST \
--url https://api.leadmagic.io/v1/people/b2b-profile-email \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"profile_url": "alex-rivera"
}
'import requests
url = "https://api.leadmagic.io/v1/people/b2b-profile-email"
payload = { "profile_url": "alex-rivera" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({profile_url: 'alex-rivera'})
};
fetch('https://api.leadmagic.io/v1/people/b2b-profile-email', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leadmagic.io/v1/people/b2b-profile-email"
payload := strings.NewReader("{\n \"profile_url\": \"alex-rivera\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadmagic.io/v1/people/b2b-profile-email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'profile_url' => 'alex-rivera'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"profile_url": "alex-rivera",
"credits_consumed": 5,
"message": "Email Found.",
"email": "alex.rivera@example.com"
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/validation_error",
"title": "Request validation failed. Check your input parameters.",
"status": 400,
"code": "validation_error",
"param": [
"email"
],
"detail": "Email format is invalid. Expected format: user@domain.com",
"action": "Provide a valid email address in the 'email' field.",
"docs": "https://leadmagic.io/docs/api-reference/errors"
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/missing_authentication",
"title": "Authentication required. Provide a valid API key in the X-API-Key header (case-insensitive).",
"status": 401,
"code": "missing_authentication",
"docs": "https://leadmagic.io/docs/api-reference/authentication"
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/insufficient_credits",
"title": "Insufficient credits: need 5, have 2.50. Add credits to continue.",
"status": 402,
"code": "insufficient_credits",
"detail": "This request requires 5 credit(s) but your account only has 2.50 credits remaining.",
"action": "Add credits to your account at https://app.leadmagic.io/billing or contact support@leadmagic.io for enterprise plans.",
"docs": "https://leadmagic.io/docs/api-reference/credits",
"context": {
"credits_required": 5,
"credits_available": 2.5,
"credits_needed": 2.5
}
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/resource_not_found",
"title": "Resource not found.",
"status": 404,
"code": "resource_not_found",
"docs": "https://leadmagic.io/docs/api-reference/errors"
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/rate_limit_exceeded",
"title": "Rate limit exceeded: 300 requests per 1 minute. Wait and try again.",
"status": 429,
"code": "rate_limit_exceeded",
"detail": "You have exceeded the maximum allowed request rate. Please wait before making additional requests.",
"action": "Wait 42 seconds before retrying. Consider implementing exponential backoff.",
"docs": "https://leadmagic.io/docs/api-reference/rate-limits",
"context": {
"limit": 300,
"window": "1 minute",
"remaining": 0,
"reset_at": 1706745642,
"retry_after_seconds": 42
}
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/INTERNAL_ERROR",
"title": "Something went wrong on our end. Our team has been notified and is investigating.",
"status": 500,
"code": "INTERNAL_ERROR",
"detail": "This is a temporary server error. The issue has been automatically reported to our team.",
"action": "Wait 30 seconds and retry your request. If the problem persists, contact support@leadmagic.io",
"docs": "https://leadmagic.io/docs/api-reference/errors"
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}