Back to SynthAI

    SynthAI API Documentation

    This document describes the API used by the SynthAI Zapier integration and other API consumers. All endpoints use HTTPS.

    Base URL: https://indkkxxhxcrfwraedpze.supabase.co/functions/v1


    Authentication

    API requests are authenticated using an API key generated in SynthAI (Dashboard → Settings → Integrations → Zapier).

    • Header name: X-API-Key
    • Header value: Your API key (no "Bearer" prefix)

    Example:

    X-API-Key: your-api-key-here

    Endpoints

    1. Test authentication

    Validates the API key and returns the authenticated user.

    MethodPathDescription
    GET/zapier-authVerify API key and get user info

    Headers: X-API-Key (required)

    Response (200): { "user": { "id", "name", "email" }, ... }

    Errors: 401 – Invalid or missing API key

    2. Zapier API (actions, searches, poll triggers)

    Single endpoint for all Zapier actions and searches. The request body specifies the operation by route and payload.

    MethodPathDescription
    POST/zapier-apiExecute an action or search by route

    Headers: Content-Type: application/json, X-API-Key (required)

    Request body:

    {
      "route": "actions/create_lead",
      "payload": { ... }
    }

    Routes (examples):

    RouteDescription
    actions/create_leadCreate a lead
    actions/create_campaignCreate a campaign
    actions/create_ticketCreate a support ticket
    actions/create_taskCreate a task
    actions/update_taskUpdate a task
    actions/create_social_postCreate a social post
    actions/schedule_social_postSchedule a social post
    actions/send_emailSend an email
    searches/find_leadFind a lead
    searches/find_taskFind a task
    searches/find_ticketFind a ticket
    triggers/new_lead (poll)Poll for new leads

    Response (200): JSON object with success and data.

    Errors: 400 – Invalid route or payload; 401 – Invalid or missing API key; 500 – Server error

    3. Webhooks (REST Hook triggers)

    Subscribe and unsubscribe from REST Hook triggers.

    MethodPathDescription
    POST/zapier-webhooksSubscribe or unsubscribe a hook

    Subscribe:

    {
      "action": "subscribe",
      "trigger_key": "new_lead",
      "target_url": "https://hooks.zapier.com/..."
    }

    Unsubscribe:

    {
      "action": "unsubscribe",
      "subscription_id": "...",
      "target_url": "https://hooks.zapier.com/..."
    }

    Trigger keys (examples): new_lead, ticket_created, email_sent, social_post_published, task_completed, page_created, video_generated, expense_recorded, campaign_created


    Rate limits and errors

    • Use HTTPS for all requests.
    • Include X-API-Key on every request.
    • On error, responses return appropriate HTTP status codes and JSON error details where applicable.

    Support