Technical Documentation

Evolution Travel AI — Integration API

This document describes the REST API endpoint for pushing agent enrollment data from your back-office system into the Evolution Travel AI platform. One-way POST — you send the data, we handle the rest.

v1.0
REST / JSON
One-Way POST

Base URL

text
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.

http
POST /functions/agentEnrollWebhook HTTP/1.1
Content-Type: application/json
X-Webhook-Secret: YOUR_SECRET_KEY

Endpoint

MethodPathDescription
POST
/functions/agentEnrollWebhookPush a new agent enrollment from your back-office system

Request Body Fields

Send a JSON body. Fields marked * are required.

FieldTypeDescription
full_name*stringAgent's full legal name (first and last)
email*stringAgent's email address — used as their login and unique identifier
phonestringAgent's phone number (any format)
referred_bystringEmail address of the upline agent / sponsor who referred this new agent
referral_codestringThe new agent's own unique referral code from your system
agency_namestringBusiness or agency name (if applicable)
specialtiesstring[]Array of travel specialties, e.g. ["Luxury", "Cruises", "Caribbean"]
enrollment_datestring (ISO 8601)Date agent enrolled in your system, e.g. "2026-05-09"
planstringTravelOS subscription tier the agent purchased. Pass "starter" ($29/mo) or "pro" ($49/mo). Defaults to "starter" if omitted.

Example Request

JSON payload:

json
{
  "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:

bash
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

201 Created
Successfully enrolled
json
HTTP 201 Created

{
  "success": true,
  "lead_id": "abc123xyz",
  "message": "Agent enrollment received and processed."
}
400 Bad Request
Missing required fields
json
HTTP 400 Bad Request

{
  "error": "full_name and email are required"
}
409 Conflict
Agent email already exists
json
HTTP 409 Conflict

{
  "success": false,
  "message": "Lead with this email already exists",
  "lead_id": "abc123xyz"
}
401 Unauthorized
Invalid or missing X-Webhook-Secret

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:

text
POST https://evotravleai.base44.app/functions/leadIntakeWebhook

Authentication — per-agent key in a header:

http
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):

FieldTypeDescription
email*stringLead's email. Used to match an existing lead, so re-sends update instead of duplicating.
full_namestringLead's full name
phonestringPhone number (any format)
lead_typestring"customer" for travel clients, "agent_recruit" for agent prospects. Defaults to customer.
sourcestringOrigin of the lead — e.g. referral, Instagram, Jotform form, cold outreach, travel expo. Free text is filed into the CRM automatically.
statusstringnew, contacted, scheduled, quoted, confirmed, attended, paid_in_full, completed, cancelled. Common aliases (inquiry, booked, enrolled, won, lost) are accepted.
notesstringAppended to the lead's notes — earlier notes are never overwritten.
intereststringWhat the lead is interested in
scorenumberLead quality score, 1-100
meeting_datetimestring (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_titlestringTitle shown on the workspace calendar for that meeting
suppress_automationsbooleantrue skips the agent's new-lead email automations for this lead (useful for bulk imports).

Example request:

bash
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:

json
HTTP 201 Created  (new lead)
{ "success": true, "created": true, "lead_id": "abc123", "status": "new", "lead_type": "customer" }
json
HTTP 200 OK  (existing lead updated)
{ "success": true, "created": false, "lead_id": "abc123", "status": "scheduled" }
json
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.