Capture Email
POST
/api/v1/public/email-capture
const url = 'https://indepai.app/api/v1/public/email-capture';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"user@example.com","source":"fi_calculator","metadata":{"additionalProperty":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://indepai.app/api/v1/public/email-capture \ --header 'Content-Type: application/json' \ --data '{ "email": "user@example.com", "source": "fi_calculator", "metadata": { "additionalProperty": "example" } }'Submit an email for the waitlist or lead capture. Rate limited to 10 per day per IP. No authentication required.
Request Body
Section titled “Request Body”Media typeapplication/json
object
email
required
Email address to capture
string format: email
Example
user@example.comsource
required
Capture source identifier
string
Example
fi_calculatormetadata
Additional metadata from the capture context
object
key
additional properties
Responses
Section titled “Responses”Email captured successfully
Media typeapplication/json
object
success
required
boolean
message
required
Confirmation message
string
Example
{ "success": true, "message": "Email captured successfully"}Validation error
Media typeapplication/json
object
success
required
Always false for error responses
boolean
error
required
Error type
string
code
Machine-readable error code
string
details
Detailed validation errors
Array<object>
object
path
required
Path to the invalid field
string
message
required
Error message
string
Example
{ "success": false, "error": "Validation error", "code": "VALIDATION_ERROR", "details": [ { "path": "currentAge", "message": "Must be between 18 and 100" } ]}Rate limit exceeded
Media typeapplication/json
object
success
required
Always false for error responses
boolean
error
required
Error type
string
code
Machine-readable error code
string
details
Detailed validation errors
Array<object>
object
path
required
Path to the invalid field
string
message
required
Error message
string
Example
{ "success": false, "error": "Validation error", "code": "VALIDATION_ERROR", "details": [ { "path": "currentAge", "message": "Must be between 18 and 100" } ]}