# NewLead API > Create leads, send messages and templates, place calls and receive events from your NewLead agents. - [NewLead API](https://docs.newlead.ai/index.md): Create leads, send messages and templates, place calls and receive events from your agents. - [Quickstart](https://docs.newlead.ai/quickstart.md): Create a lead and send it your first WhatsApp template. - [Authentication](https://docs.newlead.ai/authentication.md): Authenticate every request with a subaccount API key. - [Errors](https://docs.newlead.ai/errors.md): What each error means and when to retry the request. - [Pagination](https://docs.newlead.ai/pagination.md): Walk through a complete list with cursors. - [Idempotency](https://docs.newlead.ai/idempotency.md): Repeat a request without sending anything twice. - [Rate limits](https://docs.newlead.ai/rate-limits.md): How many requests you can make, and what to do when you reach the limit. - [Webhooks](https://docs.newlead.ai/webhooks.md): Receive lead, message and call events at your URL. - [Webhook events](https://docs.newlead.ai/webhook-events.md): Every event NewLead sends, with its payload. - [Verify webhook signatures](https://docs.newlead.ai/webhook-signatures.md): Confirm that a delivery comes from NewLead before you process it. - [n8n](https://docs.newlead.ai/n8n.md): Use NewLead in your workflows with the official node. - [Sync leads to a CRM](https://docs.newlead.ai/sync-leads-to-crm.md): Create and update CRM contacts from NewLead webhook events. - [Show your properties on your website](https://docs.newlead.ai/website-properties.md): List your published properties with their photos and keep your website up to date. - [Versioning](https://docs.newlead.ai/versioning.md): What can change in the API, and how you hear about it. - [Changelog](https://docs.newlead.ai/changelog.md): New features and changes in the NewLead API. - [Migrate from the legacy routes](https://docs.newlead.ai/migrate-legacy-routes.md): Move your integration to /v1. - [Get the API specification](https://docs.newlead.ai/api-reference/specification/get-the-api-specification.md): This document, as JSON. Needs no API key. - [Get the API key's account](https://docs.newlead.ai/api-reference/account/get-the-api-keys-account.md): The key, its subaccount and organization, and the key's rate limits. Use it to check that a key works. - [List text agents](https://docs.newlead.ai/api-reference/text-agents/list-text-agents.md): Text agents in your subaccount, newest first. - [Retrieve a text agent](https://docs.newlead.ai/api-reference/text-agents/retrieve-a-text-agent.md) - [List lead fields](https://docs.newlead.ai/api-reference/text-agents/list-lead-fields.md): The variables the customer declared for its leads. Use them when creating a lead so it fits. - [List templates](https://docs.newlead.ai/api-reference/text-agents/list-templates.md): WhatsApp templates of the agent, each with its status; only approved ones can be sent. With no WhatsApp connected, the list is empty. - [Get qualification questions](https://docs.newlead.ai/api-reference/text-agents/get-qualification-questions.md): The questions the agent asks to qualify its leads. Their id is the question_id of each answer in lead.qualification.answers. - [List leads](https://docs.newlead.ai/api-reference/leads/list-leads.md): Leads in your subaccount, newest first, excluding test leads. Encode the + in the phone number as %2B in the URL. - [Create or update a lead](https://docs.newlead.ai/api-reference/leads/create-or-update-a-lead.md): If the agent already has a WhatsApp or Lead Ads lead with that phone number, in any of its forms, updates it and returns 200; otherwise creates it and returns 201. A voice or web chat lead with the same number does not count. The name changes only if you send it, and variables are merged with the ex… - [Retrieve a lead](https://docs.newlead.ai/api-reference/leads/retrieve-a-lead.md) - [Delete a lead](https://docs.newlead.ai/api-reference/leads/delete-a-lead.md): Removes it from lists and from the API, like deleting it in the dashboard. - [Update a lead](https://docs.newlead.ai/api-reference/leads/update-a-lead.md): Name, status and variables (merged; null deletes a key). do_not_contact only accepts false. - [Pause the AI for a lead](https://docs.newlead.ai/api-reference/leads/pause-the-ai-for-a-lead.md): The AI stops replying to the lead, like the dashboard button. Without duration_minutes, or with 0, the pause lasts until resume_ai. Returns the lead. - [Resume the AI for a lead](https://docs.newlead.ai/api-reference/leads/resume-the-ai-for-a-lead.md) - [List messages](https://docs.newlead.ai/api-reference/messages/list-messages.md): A lead's messages, newest first. Internal platform notices are not included. - [Retrieve a message](https://docs.newlead.ai/api-reference/messages/retrieve-a-message.md): Use it to check the delivery status. - [Send a message](https://docs.newlead.ai/api-reference/messages/send-a-message.md): Free-form text to a lead, or an approved template to a lead or a phone number. If it cannot be sent, returns an error: 409 if we know before sending (24-hour window, do not contact, unapproved template), 400 recipient_invalid if WhatsApp rejects the recipient, and 502 if WhatsApp does not respond. - [List voice agents](https://docs.newlead.ai/api-reference/voice-agents/list-voice-agents.md): Voice agents in your subaccount, newest first. - [Retrieve a voice agent](https://docs.newlead.ai/api-reference/voice-agents/retrieve-a-voice-agent.md) - [List calls](https://docs.newlead.ai/api-reference/calls/list-calls.md): Calls in your subaccount, newest first by started_at, excluding dashboard tests. Without the transcript: it is in GET /calls/{call_id}. - [Create a call](https://docs.newlead.ai/api-reference/calls/create-a-call.md): The voice agent calls to from its outbound number. Finds the agent's lead with that phone number, or creates it, and returns 201 with the ongoing call and its lead_id. With lead, its name and variables are written to the lead before dialing, and the agent uses them during the call; if the call then… - [Retrieve a call](https://docs.newlead.ai/api-reference/calls/retrieve-a-call.md): Includes the transcript. - [Retrieve a call recording](https://docs.newlead.ai/api-reference/calls/retrieve-a-call-recording.md): Redirects (302) to the audio with a signed link valid for one hour: request this route each time you need it. If your client follows the redirect, send the key in Authorization: Bearer, which is not forwarded to another domain; x-api-key would be. Without a recording, 404. - [List webhook endpoints](https://docs.newlead.ai/api-reference/webhooks/list-webhook-endpoints.md): Webhook endpoints of your subaccount's agents, newest first, excluding deleted ones. The secret is never returned by a read: only on creation. - [Create a webhook endpoint](https://docs.newlead.ai/api-reference/webhooks/create-a-webhook-endpoint.md): Registers your URL to receive an agent's events, signed with a secret you see only in this response. If the agent already has 3 active endpoints, returns 409 webhook_endpoint_limit_reached: pause or delete one first. - [Retrieve a webhook endpoint](https://docs.newlead.ai/api-reference/webhooks/retrieve-a-webhook-endpoint.md) - [Delete a webhook endpoint](https://docs.newlead.ai/api-reference/webhooks/delete-a-webhook-endpoint.md): Stops receiving deliveries immediately, including queued ones. - [Update a webhook endpoint](https://docs.newlead.ai/api-reference/webhooks/update-a-webhook-endpoint.md): URL, events, description or active. The agent cannot change: to move an endpoint to another agent, delete it and create a new one. Reactivating an endpoint when the agent already has 3 active returns 409 webhook_endpoint_limit_reached. - [Send a test delivery](https://docs.newlead.ai/api-reference/webhooks/send-a-test-delivery.md): An event with fictional data, signed and sent like a real one: call.ended for a voice agent or, on a text agent, the first event the endpoint listens for in the order of WebhookEvent, with a test lead whose number is 555. It does not count towards automatic pausing, and it is sent once: a failed tes… - [List webhook deliveries](https://docs.newlead.ai/api-reference/webhooks/list-webhook-deliveries.md): Newest first, including test deliveries. Kept for 30 days. They carry neither the body sent nor your server's response: only its status and why it failed. - [List properties](https://docs.newlead.ai/api-reference/properties/list-properties.md): Properties in your catalog with at least one published listing, most recently added first, with their photos: the ones on Idealista and the ones you send with PUT /properties/{reference}. Use it to show your catalog on your website. With reference, only the properties that match a listing code or yo… - [Create or replace a property](https://docs.newlead.ai/api-reference/properties/create-or-replace-a-property.md): Creates the property with this reference, or replaces it entirely: a field you leave out is removed. 201 when it is created, 200 when it is replaced. Sending the same request again changes nothing, so retry freely: there is no Idempotency-Key. Send one PUT at a time per reference: two concurrent PUT… - [Delete a property](https://docs.newlead.ai/api-reference/properties/delete-a-property.md): Deletes a property you sent with PUT /properties/{reference}, with its photos. Your agents stop finding it. A property from Idealista is not deleted here: 404. ## OpenAPI Specs - [openapi](/openapi.yaml) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.