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.
https://your-app.comQuickstart
- 1Create a landing page in your dashboard and note its
slug(shown as/p/your-slug). - 2Generate an API key under Settings → API access. Copy it immediately — it's shown only once.
- 3Send a request with your key and the page slug:
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_KEYKeep 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.
/api/v1/collectCollect a contact
Adds an email/contact to one of your pages. Identify the page with either a slug or a pageId.
Body parameters
| Field | Type | Required |
|---|---|---|
| string | Yes | |
| slug | string | One of slug / pageId |
| pageId | string | One of slug / pageId |
| name | string | No |
| source | string | No |
Example response
{
"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.
| Code | Meaning |
|---|---|
| 400 | Missing or invalid parameters |
| 401 | Missing or invalid API key |
| 403 | The page doesn't belong to your account |
| 404 | Page not found |
| 503 | Server not configured yet |