Universal Webhook API
Connect any CRM or tool to AskAd.ai with a simple webhook. Push leads, capture form submissions, and query your data programmatically.
Authentication
All API requests require an API key. Generate one from Settings > API Keys in your AskAd dashboard. Include it in the Authorization header:
Authorization: Bearer YOUR_API_KEYKeep your API key secret. Do not expose it in client-side code or public repositories.
Endpoints
/api/v1/leads/inboundPush leads from any external source (CRM, form builder, Zapier, etc.) into AskAd.
Request Body
{
"email": "jane@example.com",
"first_name": "Jane",
"last_name": "Smith",
"phone": "+1234567890",
"source": "hubspot",
"metadata": {
"deal_value": 5000
}
}Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "created"
}/api/v1/leads/captureCapture leads from web forms, landing pages, or embedded widgets.
Request Body
{
"email": "john@example.com",
"name": "John Doe",
"source": "website",
"page_url": "https://example.com/pricing"
}Response
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"status": "created"
}/api/v1/contactsList all contacts in your workspace. Supports pagination with ?page=1&limit=50 query parameters. Requires authentication.
/api/v1/dealsList all deals in your workspace. Filter by stage with ?stage=negotiation. Requires authentication.
Webhooks (Outbound)
Register a URL to receive real-time notifications when leads convert, deals close, or campaigns hit spend thresholds. Configure outbound webhooks from Settings > Webhooks.
Rate Limits
API requests are rate-limited to 100 requests per minute per API key. If you exceed the limit, you will receive a 429 Too Many Requests response.
Rate limit headers are included in every response: X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.
Code Examples
Here are examples for pushing a lead via the inbound endpoint in three languages.
curl -X POST https://app.askad.ai/api/v1/leads/inbound \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "jane@example.com",
"first_name": "Jane",
"last_name": "Smith",
"phone": "+1234567890",
"source": "hubspot",
"metadata": { "deal_value": 5000 }
}'const response = await fetch(
"https://app.askad.ai/api/v1/leads/inbound",
{
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
email: "jane@example.com",
first_name: "Jane",
last_name: "Smith",
phone: "+1234567890",
source: "hubspot",
metadata: { deal_value: 5000 },
}),
}
);
const data = await response.json();
console.log(data.id); // "uuid"import requests
response = requests.post(
"https://app.askad.ai/api/v1/leads/inbound",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"email": "jane@example.com",
"first_name": "Jane",
"last_name": "Smith",
"phone": "+1234567890",
"source": "hubspot",
"metadata": {"deal_value": 5000},
},
)
data = response.json()
print(data["id"]) # "uuid"Ready to integrate?
Sign up for a free account and generate your API key in under a minute.