Get started / Make your first request
GUIDE

Make your first request

Connect to LeadTruffle and read your first lead inquiry. This example only reads data.

Get your API key

Open Settings → API Keys in your LeadTruffle dashboard. Use a key for the company you want to access. If you cannot see this setting, ask your company administrator for access.

Keep this key on your server. Do not put it in website JavaScript, a public repository, or a widget embed.

Send a request

Replace YOUR_API_KEY with your key and run this in your terminal:

curl --request GET \
  --url 'https://pub-api.leadtruffle.com/api/v2/pub/leads-created?limit=1' \
  --header 'X-API-Key: YOUR_API_KEY'

The base URL is https://pub-api.leadtruffle.com/api. Every REST API request needs the X-API-Key header.

Check the result

A successful request returns HTTP 200. The response contains success, a data.leads array, and data.hasMore. An empty leads array can be a valid result when the company has no matching lead inquiries.

See List leads created for the complete response schema.

If you receive 401, check the key and header. If you receive 429, slow down your requests before trying again. See Errors and pagination.

Choose your next step

Guides & API endpoints Esc to close