API Reference

Leadbyte API

The Leadbyte API lets you collect emails and contacts from anywhere — your own site, a mobile app, or a server — and have them appear instantly in your dashboard. It's a simple REST API that returns JSON.

Base URLhttps://your-app.com

Quickstart

  1. 1Create a landing page in your dashboard and note its slug (shown as /p/your-slug).
  2. 2Generate an API key under Settings → API access. Copy it immediately — it's shown only once.
  3. 3Send a request with your key and the page slug:
cURL
curl -X POST https://your-app.com/api/v1/collect \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "your-slug",
    "email": "jane@example.com",
    "name": "Jane Doe"
  }'

Authentication

Authenticate every request with your secret API key. Pass it in the x-api-key header, or as a bearer token in the Authorization header.

x-api-key: YOUR_API_KEY
# or
Authorization: Bearer YOUR_API_KEY

Keep your key secret

Keys are shown once and stored only as a hash — we can never show an existing key again. If you lose it, regenerate a new one from Settings (this invalidates the old key). Only use keys from a server or trusted environment.

POST/api/v1/collect

Collect a contact

Adds an email/contact to one of your pages. Identify the page with either a slug or a pageId.

Body parameters

FieldTypeRequired
emailstringYes
slugstringOne of slug / pageId
pageIdstringOne of slug / pageId
namestringNo
sourcestringNo

Example response

200 OK
{
  "ok": true,
  "id": "cnt_8fJd2...",
  "duplicate": false
}

Waitlist emails

If a page is a waitlist, collecting a contact automatically triggers two emails via sendbyte.africa: a welcome / thank-you email to the person who joined, and a notification to you (the creator) that someone signed up. No extra parameters are required — just collect the contact as usual.

Errors

The API uses conventional HTTP status codes. Errors return a JSON body with an error message.

CodeMeaning
400Missing or invalid parameters
401Missing or invalid API key
403The page doesn't belong to your account
404Page not found
503Server not configured yet

Ready to grow your audience?

Create your first landing page in under a minute. No credit card required.

Create your account