Documentation

Zapier API Documentation

SaleAssistant is an AI sales assistant that captures leads from embedded widgets and tracking links. This page documents the REST API used by the SaleAssistant Zapier integration to authenticate connections, subscribe to webhooks, and discover trigger field samples.

Getting started

Each SaleAssistant assistant has a unique Zapier API key. Enable Zapier for an assistant in the SaleAssistant dashboard, then copy the read-only API key from the assistant settings. Use that key when Zapier prompts you to connect your SaleAssistant account. The key identifies a single assistant and must be kept secret.

Base URL

All endpoints are served over HTTPS.

https://www.saleassistant.ai/api
Authentication

Every request must include a valid assistant API key. The server checks the key in the following order:

  1. X-API-Key request header (recommended)
  2. api_key query parameter (Zapier API Key auth default)
  3. apiKey field in the JSON body (supported for backward compatibility on POST requests)

Invalid or missing keys return 401 Unauthorized.


GET
/zapier-me
Test authentication

Returns metadata about the assistant linked to the API key. Zapier uses this endpoint to validate credentials and build the connection label shown in the Zapier UI.

Request
GET https://www.saleassistant.ai/api/zapier-me
X-API-Key: YOUR_API_KEY
Success response — 200 OK
{
  "assistantId": "665f1a2b3c4d5e6f7a8b9c0d",
  "assistantName": "Website Assistant",
  "ownerEmail": "owner@example.com"
}

ownerEmail may be null when the organization has no contact email on file.


POST
/zapier-integrations
Subscribe to webhooks

Registers the Zapier catch hook URL for the authenticated assistant. When a new lead is captured, SaleAssistant POSTs the lead payload to this URL.

Request
POST https://www.saleassistant.ai/api/zapier-integrations
Content-Type: application/json
X-API-Key: YOUR_API_KEY

{
  "hookUrl": "https://hooks.zapier.com/hooks/catch/123456/abcdef/"
}
Success response — 200 OK
{}

Re-subscribing with the same hookUrl is idempotent. If the assistant is already connected to a different hook URL, the request returns 409 Conflict; disconnect the existing Zap first.


DELETE
/zapier-integrations
Unsubscribe from webhooks

Removes the stored Zapier hook URL when a Zap is turned off or the SaleAssistant connection is deleted. The operation is idempotent and always returns 200 OK to avoid Zapier retries.

Request
DELETE https://www.saleassistant.ai/api/zapier-integrations
Content-Type: application/json
X-API-Key: YOUR_API_KEY

{
  "hookUrl": "https://hooks.zapier.com/hooks/catch/123456/abcdef/"
}

The hookUrl body field is optional. When provided, the hook is cleared only if it still matches the stored subscription.

Success response — 200 OK
{}

GET
/zapier-samples
List sample lead payloads

Returns representative lead objects for Zapier trigger field discovery. The shape matches the real-time webhook payload sent when a new lead is created.

Request
GET https://www.saleassistant.ai/api/zapier-samples
X-API-Key: YOUR_API_KEY
Success response — 200 OK
[
  {
    "id": "665f1a2b3c4d5e6f7a8b9c0d",
    "name": "John Doe",
    "contact": "john.doe@mail.com",
    "description": "I want to book an appointment for next week.",
    "createdAt": "2026-06-05T10:30:00.000Z",
    "origin": {
      "type": "Widget",
      "isTitans": false,
      "pageUrl": "https://example.com/pricing"
    }
  },
  {
    "id": "665f1a2b3c4d5e6f7a8b9c0e",
    "name": "Jane Smith",
    "contact": "+39 333 1234567",
    "description": "Interested in the premium plan.",
    "createdAt": "2026-06-05T11:15:00.000Z",
    "origin": {
      "type": "LEGENDS",
      "isTitans": true,
      "tlId": "a1b2c3d4",
      "campaignLabel": "TITANS - Black Friday"
    }
  }
]

New Lead trigger (outbound webhook)

After a successful subscription, SaleAssistant sends an HTTPS POST to the registered hookUrl whenever the assistant captures a new lead (from the embedded widget or a LEGENDS tracking link). The JSON body uses the same schema as the samples above.

Payload fields
FieldTypeDescription
idstringProspect ID
namestringLead name
contactstringEmail address or phone number
descriptionstringLead message or summary
createdAtstringISO 8601 creation timestamp
origin.typestringWidget or LEGENDS
origin.isTitansbooleanWhether the lead came from a TITANS campaign tracking link
origin.pageUrlstringWidget only: page URL where the widget is embedded
origin.tlIdstringLEGENDS only: tracking link ID, when applicable
origin.campaignLabelstringLEGENDS only: tracking link or campaign label
Error responses
StatusWhen
400 Bad RequestRequest body fails validation
401 UnauthorizedMissing or invalid API key
409 ConflictPOST: assistant already connected to a different hook URL
500 Internal Server ErrorUnexpected server error
Support

For integration or API questions, contact support@saleassistant.ai.