Send leads in and set outcomes through the API
Add a lead from any tool, find one by email or phone, mark it won or lost, and read your leads and posts with the TruLata API.
#Test your key
Call GET /v1/me. It returns the account the key opens, its company name, the key's label and the events you can subscribe to. Every request carries your key; see Make, copy or revoke an API key.
#Add a lead
Call POST /v1/leads with name, or first_name and last_name, plus any of email, phone, service, message and source. A lead needs at least a name, an email or a phone.
It lands on your Leads tab like a website form message and, by default, emails the owner the same way. Send notify as false to skip the email.
#Mark a lead won, lost or anything in between
Call POST /v1/leads/{id}/status with status set to contacted, quoted, won, lost or not_lead, and an optional note. It is the same record the Leads tab shows, so the outcome appears on screen.
The id comes from a new lead, a list or a search.
#Read and find leads and posts
GET /v1/leads returns your leads newest first: up to 100 a call (50 by default), from the last 30 days unless you set days up to 365.
GET /v1/leads/search finds a lead by email or phone across the last 365 days. Phone numbers match on their last ten digits, so formatting does not matter.
GET /v1/posts returns your published blog posts, newest first, up to 100 a call (25 by default).
#Questions
Will a lead added through the API email me?
Yes, by default, the same way a website form lead does. Send notify as false to add it without the email.
Where do I find example requests?
The API reference has a curl example for every endpoint.
Related articles
Ask on the Ask TruLata tab of your dashboard and it answers from your own numbers, or opens a ticket for a person. Or email support@trulata.com and a person on our team replies.

