Sources API
All source endpoints are prefixed with /api/sources and require authentication.
List sources
Section titled “List sources”Returns all sources in your workspace.
curl "https://leads.500rockets.io/api/sources" \ -H "X-API-Key: 5l_live_..."Response:
[ { "id": "src_abc123", "name": "Website Contact Form", "webhookToken": "tok_...", "webhookUrl": "https://leads.500rockets.io/api/webhooks/inbound/tok_...", "fieldMappings": {}, "createdAt": "2026-03-01T12:00:00.000Z", "createdBy": { "id": "usr_...", "name": "Chidi", } }]Get a source
Section titled “Get a source”Returns a single source with its webhook URL and field mappings.
Create a source
Section titled “Create a source”Creates a new source with a unique webhook token.
curl -X POST "https://leads.500rockets.io/api/sources" \ -H "X-API-Key: 5l_live_..." \ -H "Content-Type: application/json" \ -d '{ "name": "Landing Page Form", "fieldMappings": { "full_name": "firstName", "email_address": "email" } }'Body:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Human-readable name for the source (max 255 chars) |
fieldMappings | object | No | Maps incoming field names to standard lead fields |
Response (201):
{ "id": "src_new123", "name": "Landing Page Form", "webhookToken": "tok_...", "webhookUrl": "https://leads.500rockets.io/api/webhooks/inbound/tok_...", "fieldMappings": { "full_name": "firstName", "email_address": "email" }, "createdAt": "2026-03-02T10:00:00.000Z"}Update a source
Section titled “Update a source”Updates a source’s name or field mappings.
curl -X PUT "https://leads.500rockets.io/api/sources/src_abc123" \ -H "X-API-Key: 5l_live_..." \ -H "Content-Type: application/json" \ -d '{ "name": "Updated Form Name" }'Delete a source
Section titled “Delete a source”Deletes a source. Existing leads from this source are preserved but will show the source as deleted.
curl -X DELETE "https://leads.500rockets.io/api/sources/src_abc123" \ -H "X-API-Key: 5l_live_..."Regenerate webhook token
Section titled “Regenerate webhook token”Generates a new webhook token for a source. The old token will stop working immediately.
curl -X POST "https://leads.500rockets.io/api/sources/src_abc123/regenerate-token" \ -H "X-API-Key: 5l_live_..."Response:
{ "webhookToken": "tok_new...", "webhookUrl": "https://leads.500rockets.io/api/webhooks/inbound/tok_new..."}Use this if you suspect a token has been compromised.
Field mappings
Section titled “Field mappings”Field mappings let you transform incoming payload field names to the standard lead fields. This is useful when connecting form tools that use different field names.
Standard fields:
| Field | Type | Description |
|---|---|---|
email | string | Lead’s email address |
firstName | string | First name |
lastName | string | Last name |
phone | string | Phone number |
company | string | Company or organization name |
Example mapping:
If your form sends { "contact_email": "[email protected]", "org": "Acme" }, set field mappings to:
{ "contact_email": "email", "org": "company"}