Base URL
https://api.base44.com/api/apps/69c5e66421adff9edba4b1e3/functions/agentEnrollWebhook
Authentication
All requests must include a shared secret key in the X-Webhook-Secret HTTP header. Contact the Evolution Travel AI team to receive your secret key before go-live.
POST /functions/agentEnrollWebhook HTTP/1.1 Content-Type: application/json X-Webhook-Secret: YOUR_SECRET_KEY
Endpoint
| Method | Path | Description |
|---|---|---|
POST | /functions/agentEnrollWebhook | Push a new agent enrollment from your back-office system |
Request Body Fields
Send a JSON body. Fields marked * are required.
| Field | Type | Description |
|---|---|---|
full_name* | string | Agent's full legal name (first and last) |
email* | string | Agent's email address — used as their login and unique identifier |
phone | string | Agent's phone number (any format) |
referred_by | string | Email address of the upline agent / sponsor who referred this new agent |
referral_code | string | The new agent's own unique referral code from your system |
agency_name | string | Business or agency name (if applicable) |
specialties | string[] | Array of travel specialties, e.g. ["Luxury", "Cruises", "Caribbean"] |
enrollment_date | string (ISO 8601) | Date agent enrolled in your system, e.g. "2026-05-09" |
plan | string | TravelOS subscription tier the agent purchased. Pass "starter" ($29/mo) or "pro" ($49/mo). Defaults to "starter" if omitted. |
Example Request
JSON payload:
{
"full_name": "Jane Smith",
"email": "jane.smith@example.com",
"phone": "+1 555-867-5309",
"referred_by": "john.doe@evolutiontravel.com",
"referral_code": "JANE2025",
"agency_name": "Smith Travel Group",
"specialties": ["Luxury", "Cruises", "Caribbean"],
"enrollment_date": "2026-05-09",
"plan": "pro"
}Full cURL example:
curl -X POST https://api.base44.com/api/apps/69c5e66421adff9edba4b1e3/functions/agentEnrollWebhook \
-H "Content-Type: application/json" \
-H "X-Webhook-Secret: YOUR_SECRET_KEY" \
-d '{
"full_name": "Jane Smith",
"email": "jane.smith@example.com",
"phone": "+1 555-867-5309",
"referred_by": "john.doe@evolutiontravel.com",
"referral_code": "JANE2025",
"agency_name": "Smith Travel Group",
"specialties": ["Luxury", "Cruises", "Caribbean"],
"enrollment_date": "2026-05-09",
"plan": "pro"
}'Response Codes
HTTP 201 Created
{
"success": true,
"lead_id": "abc123xyz",
"message": "Agent enrollment received and processed."
}HTTP 400 Bad Request
{
"error": "full_name and email are required"
}HTTP 409 Conflict
{
"success": false,
"message": "Lead with this email already exists",
"lead_id": "abc123xyz"
}What Happens After a Successful POST
- 1A Lead record is created in our CRM, marked as type agent_recruit and status converted.
- 2If the agent's email already exists in our user database (they've already registered), their profile is upgraded to role travel_agent and pre-filled with phone, agency_name, referral_code, referred_by, and specialties.
- 3A welcome email is automatically sent to the agent's email address with login instructions.
- 4The agent's upline/sponsor (referred_by) is linked in our system for downline tracking.
Additional Notes
Idempotency
If you POST the same email twice, the second call returns a 409 Conflict with the existing lead ID. We do not create duplicates.
Content-Type
Always include Content-Type: application/json in your request headers.
Secret Key Setup
Contact membership@myevolutiontravel.com to receive your X-Webhook-Secret before testing.
Lead Intake API — Create & Update CRM Leads
Each agent has their own key, generated in the app under Workspace → Lead Intake API. Every lead sent with that key is created in — and assigned to — that agent's own CRM, so a key can never write into another agent's account. This endpoint works for any lead type: travel clients, agent prospects or ordinary CRM contacts.
Endpoint:
POST https://evotravleai.base44.app/functions/leadIntakeWebhook
Authentication — per-agent key in a header:
POST /functions/leadIntakeWebhook HTTP/1.1 Content-Type: application/json X-Api-Key: YOUR_AGENT_API_KEY
Request fields (only email is required — send just what changed to update a lead):
| Field | Type | Description |
|---|---|---|
email* | string | Lead's email. Used to match an existing lead, so re-sends update instead of duplicating. |
full_name | string | Lead's full name |
phone | string | Phone number (any format) |
lead_type | string | "customer" for travel clients, "agent_recruit" for agent prospects. Defaults to customer. |
source | string | Origin of the lead — e.g. referral, Instagram, Jotform form, cold outreach, travel expo. Free text is filed into the CRM automatically. |
status | string | new, contacted, scheduled, quoted, confirmed, attended, paid_in_full, completed, cancelled. Common aliases (inquiry, booked, enrolled, won, lost) are accepted. |
notes | string | Appended to the lead's notes — earlier notes are never overwritten. |
interest | string | What the lead is interested in |
score | number | Lead quality score, 1-100 |
meeting_datetime | string (ISO 8601) | Scheduled meeting, e.g. "2026-11-10T18:00:00Z". Also adds the meeting to the agent's workspace calendars and sets the lead to scheduled. |
meeting_title | string | Title shown on the workspace calendar for that meeting |
suppress_automations | boolean | true skips the agent's new-lead email automations for this lead (useful for bulk imports). |
Example request:
curl -X POST https://evotravleai.base44.app/functions/leadIntakeWebhook \
-H "Content-Type: application/json" \
-H "X-Api-Key: YOUR_AGENT_API_KEY" \
-d '{
"full_name": "Jane Smith",
"email": "jane.smith@example.com",
"phone": "+1 555-867-5309",
"lead_type": "customer",
"source": "Jotform - Trip Inquiry",
"status": "new",
"interest": "Alaska cruise, July",
"meeting_datetime": "2026-11-10T18:00:00Z"
}'Responses:
HTTP 201 Created (new lead)
{ "success": true, "created": true, "lead_id": "abc123", "status": "new", "lead_type": "customer" }HTTP 200 OK (existing lead updated)
{ "success": true, "created": false, "lead_id": "abc123", "status": "scheduled" }HTTP 401 Unauthorized
{ "error": "Invalid or inactive API key" }
HTTP 400 Bad Request
{ "error": "email is required" }How agents connect their tools
In Zapier or Make, add a Webhooks → POST step: the endpoint URL above, an X-Api-Key header holding the agent's key, and the form fields mapped to the JSON keys. Jotform and Calendly can point their own webhooks (or a Zap) at the same endpoint. Keys are managed per agent under Workspace → Lead Intake API, where they can be copied or rotated at any time.