Automation & API
Integrate PeakAI into your workflows with our REST API or use our official n8n node for no-code automation.
Authentication
Get your access token to start making API calls
All API requests require a JWT access token. Obtain one by calling the token endpoint with your PeakAI credentials.
Base URL
https://automation.sayf.inPass the token as a query parameter access_token on all requests.
POST /webhook/token
# Request Body (form-data or JSON)
{
"id": "your@email.com",
"password": "yourpassword"
}
# Response
{
"access_token": "eyJhbGciOiJIUzI1NiIs..."
}curl -X POST https://automation.sayf.in/webhook/token \
-d "id=your@email.com" \
-d "password=yourpassword"API Endpoints
All extraction features use the same base endpoint with different type parameters.
Endpoints
Personal Email Lookup
Extract personal email addresses associated with a LinkedIn profile.
GET /webhook/extractor?type=emailParameters
| Name | Type | Required | Description |
|---|---|---|---|
| access_token | string | Yes | JWT token from authentication |
| type | string | Yes | "email" |
| profile_url | string | Yes | Full LinkedIn profile URL |
Example Request
curl "https://automation.sayf.in/webhook/extractor?access_token=YOUR_TOKEN&type=email&profile_url=https://www.linkedin.com/in/johndoe"Example Response
{
"linkedin_url": "https://www.linkedin.com/in/johndoe",
"email": [
{ "item": "johndoe@gmail.com" },
{ "item": "john.doe@yahoo.com" }
]
}Try It OutDemo Mode
Test the API with sample data. For production use, you'll need valid credentials.
Code Examples
Quick start examples in popular languages
PyPython
import requests
# Step 1: Get access token
auth_response = requests.post(
"https://automation.sayf.in/webhook/token",
data={"id": "your@email.com", "password": "yourpassword"}
)
token = auth_response.json()["access_token"]
# Step 2: Look up a phone number
response = requests.get(
"https://automation.sayf.in/webhook/extractor",
params={
"access_token": token,
"type": "phone_no",
"profile_url": "https://www.linkedin.com/in/johndoe"
},
timeout=120
)
print(response.json())JSJavaScript (Node.js)
const axios = require('axios');
async function lookupContact() {
// Step 1: Get access token
const authRes = await axios.post(
'https://automation.sayf.in/webhook/token',
{ id: 'your@email.com', password: 'yourpassword' }
);
const token = authRes.data.access_token;
// Step 2: Look up work email
const result = await axios.get(
'https://automation.sayf.in/webhook/extractor',
{
params: {
access_token: token,
type: 'work_email',
profile_url: 'https://www.linkedin.com/in/johndoe'
},
timeout: 120000
}
);
console.log(result.data);
}
lookupContact();Error Handling
Common error responses and how to handle them
Missing Token
Token not provided or invalid
{ "message": "Please contact PeakAi Team: pg@thepeakai.com" }Insufficient Credits
Account has insufficient credits
{ "message": "Not enough credits. Please recharge." }Timeout
Async lookups may timeout - retry the request
{ "status": "timeout", "message": "Request did not respond within 60 seconds" }Not Found
No data found for the provided input
{ "email": "Not Found" }Phone Not Verified
Account phone verification required
{ "message": "Please verify your phone number" }API Access Disabled
Contact support to enable API access
{ "message": "API access is not enabled for your account" }Best Practices
Tips for optimal API usage
Set Timeouts
Use 120 second timeouts — async lookups can take up to 60 seconds.
Cache Tokens
Tokens are valid for extended periods; avoid requesting new ones per call.
Handle Not Found
Not all profiles have public contact info — handle gracefully.
Use Correct URLs
Always use full LinkedIn URLs: https://www.linkedin.com/in/username
Ready to Get Started?
Contact us to enable API access on your account or discuss enterprise solutions.
Email: pg@thepeakai.com • Phone: +91 9008227180