IntegrationsREST API

API Integration

Use the Ledly API to programmatically submit leads from your applications.

Authentication

All API requests require an API key. Get your key from SettingsAPI Keys.

Include your API key in the request header:

Authorization: Bearer your_api_key_here

Submit a Lead

POST https://api.ledly.io/api/leads

Request Body

{
  "email": "[email protected]",
  "first_name": "John",
  "last_name": "Doe",
  "phone": "+1234567890",
  "program_code": "MBA",
  "source": "api",
  "custom_fields": {
    "start_date": "Fall 2025",
    "referral_source": "Google"
  }
}

Response

{
  "success": true,
  "lead_id": "lead_abc123",
  "message": "Lead created successfully"
}

Required Fields

FieldTypeDescription
emailstringLead’s email address

Optional Fields

FieldTypeDescription
first_namestringLead’s first name
last_namestringLead’s last name
phonestringPhone number
program_codestringProgram identifier
sourcestringLead source
custom_fieldsobjectAdditional custom fields

Rate Limits

PlanLimit
Education ($899/mo)500 requests per minute
Enterprise ($1,999/mo)1,000 requests per minute (custom limits available)

Error Codes

CodeDescription
400Invalid request body
401Invalid or missing API key
422Validation error (e.g., invalid email)
429Rate limit exceeded
500Server error

Example: cURL

curl -X POST https://api.ledly.io/api/leads \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "first_name": "John",
    "last_name": "Doe",
    "program_code": "MBA"
  }'

Example: JavaScript

const response = await fetch('https://api.ledly.io/api/leads', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer your_api_key_here',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    email: '[email protected]',
    first_name: 'John',
    last_name: 'Doe',
    program_code: 'MBA',
  }),
});
 
const data = await response.json();
console.log(data);