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.