Zapier Integratrion
Vega AI provides a comprehensive API for integrating with Zapier to automate workflows, sync data to CRM systems, and trigger actions based on student activities. This document covers all REST API endpoints designed specifically for Zapier integration.
Base URL
https://backend.myvega/api/zapierAuthentication
All API endpoints require authentication using an API key. The API key can be provided in one of the following ways:
Headers
x-api-key: Your organization's API keyAuthorization: Bearer token or direct API key
Query Parameters (for compatibility)
apiKey: Your organization's API key
Example Request with Authentication
curl -X GET "https://backend.myvega/api/zapier/healthcheck" \
-H "x-api-key: your-api-key-here"API Endpoints
1. Health Check
Validates API key and returns service status information.
Endpoint: GET /api/zapier/healthcheck
Authentication: Required
Response:
2. Organization Users Information
Retrieves a paginated list of users in the organization with subscription details.
Endpoint: POST /api/zapier/userinfo
Authentication: Required
Request Body:
Parameters:
page(optional): Page number for pagination (default: 1)limit(optional): Number of users per page (default: 10, max: 100)
Response:
3. New Student Signups (Trigger)
Retrieves new student signups for CRM integration. Designed for polling triggers in Zapier.
Endpoint: GET /api/zapier/new-student-signups
Authentication: Required
Query Parameters:
limit(optional): Number of students to return (default: 10, max: 100)since(optional): ISO date string to filter students created after this date (e.g., "2024-01-01T00:00:00Z")
Response: Returns an array of student objects for easy mapping in Zapier:
Zapier Setup:
Create a "Polling" trigger in Zapier
Use:
GET /api/zapier/new-student-signupsAdd your API key to headers
Configure polling interval (recommended: every 15 minutes)
Map response fields to your CRM fields
4. Student Diagnostic Tests
Retrieves diagnostic test data for the organization with detailed analytics.
Endpoint: POST /api/zapier/student-diagnostic-tests
Authentication: Required
Request Body:
Parameters:
limit(optional): Number of test records to return (default: 100, max: 500)since(optional): ISO date string to filter tests created after this datetestType(optional): Filter by test type ("DIAGNOSTIC" or "STRUCTURED_TEST", default: "DIAGNOSTIC")
Response:
5. Student Analytics (Structured Tests)
Retrieves student analytics data for structured tests with detailed metrics and pagination.
Endpoint: POST /api/zapier/students-analytics
Authentication: Required
Request Body:
Parameters:
page(required): Page number for paginationlimit(required): Number of results per page (1-100)
Response:
6. Student Practice Analytics
Retrieves student analytics for practice tests (Quiz, Assignment, Homework, Exit Ticket).
Endpoint: POST /api/zapier/students-practice-analytics
Authentication: Required
Request Body:
Parameters:
page(required): Page number for paginationlimit(required): Number of results per page (1-100)
Response:
Subscribe to Webhooks
Subscribe a Zapier webhook URL to receive real-time notifications.
Endpoint: POST /api/zapier/subscribe
Authentication: Required
Request Body:
Response:
Unsubscribe from Webhooks
Remove a webhook URL from notifications.
Endpoint: POST /api/zapier/unsubscribe
Authentication: Required
Request Body:
Response:
Webhook Notifications
When students register, the following payload is sent to active webhooks:
Error Handling
All endpoints return standardized error responses:
Common HTTP status codes:
200: Success400: Bad Request (invalid parameters)403: Forbidden (invalid API key)404: Not Found500: Internal Server Error
Rate Limiting
API requests are rate-limited per organization
Standard limits apply to prevent abuse
Contact support for increased limits if needed
Date Formats
API responses use
DD-MM-YYYYformat for display datesISO 8601 format (
YYYY-MM-DD) for precise timestampsQuery parameters accept ISO 8601 date strings
Test Types
DIAGNOSTIC: Initial assessment testsSTRUCTURED_TEST: Full practice testsQUIZ: Short quizzesASSIGNMENT: Homework assignmentsHOMEWORK: Homework tasksEXIT_TICKET: End-of-lesson assessments
Subscription Tiers
BASIC: Free tierPRO: Professional tierPRO_MAX: Premium tier
Completion Status
PENDING: Test not startedIN_PROGRESS: Test in progressCOMPLETED: Test finishedEXPIRED: Test expired
Zapier Integration Examples
1. Student Signup to CRM
Trigger: Polling trigger on
/api/zapier/new-student-signupsAction: Create/update contact in CRM (HubSpot, Salesforce, etc.)
Schedule: Every 15 minutes
2. Test Results to Google Sheets
Trigger: Polling trigger on
/api/zapier/students-analyticsAction: Add/update row in Google Sheet
Schedule: Every hour
3. Real-time Signup Notifications
Trigger: Webhook trigger on
/api/zapier/subscribeAction: Send Slack notification or email alert
4. Diagnostic Results to Analytics Platform
Trigger: Polling trigger on
/api/zapier/student-diagnostic-testsAction: Send data to analytics platform (Mixpanel, Amplitude, etc.)
Schedule: Daily
Support
For API key generation, technical support, or additional endpoints:
Contact: [email protected]
Documentation: https://docs.learnq.ai
Version History
v1.0: Initial Zapier API release
Health check endpoint
User information endpoint
New student signups trigger
Student diagnostic tests endpoint
Student analytics endpoints
Webhook subscription system
Last Updated: December 25, 2024 API Version: v1.0
Last updated