API Keys
API Keys allow external systems to interact with the platform via REST API. Location: Settings → DEVELOPER → API Keys.
API Name: LeadGen Public API
Server: https://sprootal.com/api/v1
Authentication: Bearer Token in the format lg_live_xxx (Live) or lg_test_xxx (Test)
API Docs
Click the API Docs button in the top right of the API Keys section — opens the full interactive documentation with all endpoints, request parameters and response examples. Also available at sprootal.com/docs.
Supported client libraries: curl · Ruby · Python · PHP · Go
Existing Key View
Each key in the list shows:
- Name and type (live / test — color badge)
- Token in the format
lg_live_....(partially hidden) - Scopes — permission tags (e.g. Read Contacts, Write Contacts, +19 more)
Creating an API Key
- Click Create API Key
- Enter a Name
- Select Type:
| Type | Purpose |
|---|---|
| Live | Production integrations |
| Test | Development and testing |
- Select Scopes (or click Select All)
- Click Create Key
Available Scopes
| Group | Scopes |
|---|---|
| Contacts & Messaging | Read / Write Contacts · Read / Write Messages |
| Organization | Read / Write Projects · Read / Write Lists · Read / Write Tags |
| Pipeline & Tasks | Read / Write Pipelines · Read / Write Tasks |
| Automations | Read / Write Automations |
| Companies & Analytics | Read / Write Companies · Read Analytics |
| Settings | Read / Write Sender Profiles · Manage Webhooks |
Available API Resources
Contacts
| Method | Endpoint | Description |
|---|---|---|
| GET | /contacts | List contacts |
| GET | /contacts/search | Advanced search by tags, stages, text |
| POST | /contacts | Create contact |
| GET | /contacts/{id} | Contact details (profile, tags, stage, stats) |
| PUT | /contacts/{id} | Update contact |
| DELETE | /contacts/{id} | Delete contact |
| GET | /contacts/{id}/messages | Contact messages |
Messages
| Method | Endpoint | Description |
|---|---|---|
| GET | /contacts/{id}/messages | Contact messages |
| GET | /messages | Message list |
| DELETE | /messages/{id} | Delete message |
Automations
| Method | Endpoint | Description |
|---|---|---|
| GET | /automations | List automations |
| GET | /automations/{id} | Automation details |
| POST | /automations/{id}/enroll | Add contacts to automation |
| POST | /automations/{id}/unenroll | Remove contacts from automation |
| PUT | /automations/{id}/status | Pause or resume automation |
Sender Profiles
| Method | Endpoint | Description |
|---|---|---|
| GET | /sender-profiles | List accounts |
| GET | /sender-profiles/{id} | Account details |
Webhooks
| Method | Endpoint | Description |
|---|---|---|
| GET | /webhooks | List webhooks |
| POST | /webhooks | Create webhook |
| PUT | /webhooks/{id} | Update webhook |
| DELETE | /webhooks/{id} | Delete webhook |
Projects
| Method | Endpoint | Description |
|---|---|---|
| GET | /projects | List projects |
Lists
| Method | Endpoint | Description |
|---|---|---|
| GET | /lists | List |
| GET | /lists/{id} | List details |
Managing Keys
| Action | Description |
|---|---|
| Rotate Key | Generate a new token — the old one stops working immediately |
| Revoke Key | Permanently delete the key |
FAQ
How many API keys can I create?
There is no limit. It's recommended to create a separate key for each integration for easier access revocation.
What is the difference between Live and Test keys?
Test keys are for development — they work with the same data but let you safely test integrations. Live keys are for production.
What if a key is compromised?
Immediately use Rotate Key or Revoke Key via the ⋯ menu. The old token stops working as soon as it is rotated or revoked.