# TrustPager > TrustPager is a CRM platform with a REST API and MCP server. This documentation site covers every public endpoint, authentication, scopes, MCP tools, error codes, template variables, and the changelog. The API base URL is `https://api.trustpager.com/functions/v1/api/v1`. Authentication is `Authorization: Bearer ` (one key per workspace). Endpoints are grouped by resource. Every endpoint below links to a machine-readable Markdown file. A full OpenAPI 3.1 spec is also available at `/openapi.json`. ## API reference - [Universal Search](https://docs.trustpager.com/api/search.md): Search across all entity types (contacts, customers, deals) in a single call. Supports fuzzy/typo-tolerant matching on names via pg_trgm. - [Contacts](https://docs.trustpager.com/api/contacts.md): Manage individual contacts (people) in the CRM. Supports search, filtering, sub-resources (opportunities, activities, employers), and AI enrichment. - [Companies](https://docs.trustpager.com/api/companies.md): Manage business accounts (companies / organisations) in the CRM. Canonical path is /companies; the legacy /customers path remains supported. Companies can have multiple contacts linked and roll up to opportunities and activities. - [Opportunities](https://docs.trustpager.com/api/opportunities.md): Manage sales opportunities through your pipeline. Canonical path is /opportunities; the legacy /deals path remains supported. Sub-resources cover products, product costs, contacts, users, activities, tasks, work orders, pipeline moves, file/document/image/spreadsheet attachments, and invoices. - [Pipelines](https://docs.trustpager.com/api/pipelines.md): Manage sales pipelines and their stages. Opportunities move through pipeline stages to track progress. - [Products](https://docs.trustpager.com/api/products.md): Manage products and services that can be added to deals. - [Supplier Catalog](https://docs.trustpager.com/api/supplier-catalog.md): Manage supplier product catalogues for cost tracking on deals. The endpoint path is /supplier-catalog. - [Activities](https://docs.trustpager.com/api/activities.md): Log and manage CRM activities (calls, meetings, notes) linked to contacts, deals, and customers. - [Tasks](https://docs.trustpager.com/api/tasks.md): Create, assign, and manage tasks linked to deals and contacts. - [Work Orders](https://docs.trustpager.com/api/work-orders.md): Manage work orders linked to deals for tracking project execution. Work orders appear on the CRM Calendar, support team assignment, and scheduled dates. - [Automations](https://docs.trustpager.com/api/automations.md): Create and manage workflow automations. Includes sub-resources for triggers, actions, and execution runs. Supports enable/disable and manual triggering. - [Event Queues](https://docs.trustpager.com/api/event-queues.md): Manage event queues for sequenced multi-step workflows (drip campaigns, follow-up sequences). - [Event Schedules](https://docs.trustpager.com/api/event-schedules.md): Create clock-driven automation schedules that fire on a cron expression, fan out to a resolved audience, and trigger one automation run per row. - [Auto Queues](https://docs.trustpager.com/api/auto-queues.md): Manage Auto Queues for sequenced multi-step workflows (drip campaigns, follow-up sequences). Legacy path /event-queues is also accepted. - [Auto Schedules](https://docs.trustpager.com/api/auto-schedules.md): Create clock-driven automation schedules that fire on a cron expression, fan out to a resolved audience, and trigger one automation run per row. Legacy path /event-schedules is also accepted. - [Scheduled Event Types](https://docs.trustpager.com/api/scheduled-event-types.md): Configurable event templates that appear in the Add Event dropdown on opportunities. Each type can optionally attach an event queue for auto-enrollment with reminders. - [Scheduling Availability](https://docs.trustpager.com/api/scheduling-availability.md): Manage company and per-user working hours, timezone, and date overrides for the booking system. - [Scheduling Bookings](https://docs.trustpager.com/api/scheduling-bookings.md): Create, manage, and check availability for bookings. Bookings link to an opportunity via deal_id (field name preserved for backward compatibility) and surface in the Meetings card on the opportunity page. Scheduler bookings are separate from the opportunity's next_action_* fields, which are for ad-hoc reminders only. AI-agent-friendly: human-readable responses, self-correcting errors with alternatives, nearest-slot suggestions. Includes voice-optimised endpoints (text/plain responses) designed for Retell AI voice agents. - [Email](https://docs.trustpager.com/api/email.md): Send and receive emails via TrustPager Mail or Gmail, manage threads, view logs, and configure email settings. Supports provider selection for Gmail integration. - [Email Campaigns](https://docs.trustpager.com/api/email-campaigns.md): Create and send bulk broadcast email campaigns to segmented audiences. Supports tag-based and pipeline-based audience filters, delivery tracking (opens, clicks, bounces), and automatic unsubscribe management. - [SMS](https://docs.trustpager.com/api/sms.md): Send and receive SMS messages. View conversations and message history. - [Phone](https://docs.trustpager.com/api/phone.md): Manage phone numbers and call logs. Search for available numbers to purchase. - [Agents](https://docs.trustpager.com/api/agents.md): Manage AI voice agents and text agents under the unified /agents endpoint. Use ?type=voice or ?type=text to filter listings. The type field is required in the create body. - [Agent Knowledge Bases](https://docs.trustpager.com/api/voice-agent-kbs.md): Manage Retell-backed knowledge bases for voice agents. Each KB stores documents that agents can retrieve during calls. KBs can be seeded from help center articles or populated with custom content. Required scopes: voice-kbs:read, voice-kbs:write, voice-kbs:delete. NOTE: Retell KB write API (create and add-sources) is occasionally unavailable -- if create or add_doc returns a 500, this is a Retell-side outage, not a TrustPager bug. - [Text Agents](https://docs.trustpager.com/api/text-agents.md): Text agents are now part of the unified /agents endpoint. Use GET /agents?type=text to list text agents. See the Agents resource group for full documentation. - [Transcripts](https://docs.trustpager.com/api/transcripts.md): Transcribe call recordings and meetings, view results, and access AI coaching. Use POST /transcripts/transcribe to kick off transcription from any audio URL. Coaching results are under /transcripts/coaching. - [Document Templates](https://docs.trustpager.com/api/document-templates.md): Manage document templates with sections for proposals, contracts, and more. - [Documents](https://docs.trustpager.com/api/documents.md): Manage CRM documents (uploaded files). Supports folders, downloads via signed URLs, and CRUD operations. - [Signing](https://docs.trustpager.com/api/signing.md): Manage e-signature envelopes. Send documents for signing and track completion status. - [Forms](https://docs.trustpager.com/api/forms.md): Create form templates, manage fields, send forms to contacts, and view submissions. Fields support CRM Variable Injection - map a field to a CRM variable so submitted values are written back to the linked deal, contact, or account before automations run. - [Websites](https://docs.trustpager.com/api/websites.md): Manage TrustPager-hosted websites, pages, and page sections. - [Order Forms](https://docs.trustpager.com/api/order-forms.md): Manage payment order forms connected to Stripe for product purchases. - [Files](https://docs.trustpager.com/api/files.md): Unified file storage endpoint for all file types. Use ?type=document (private PDFs), ?type=image (public CDN/R2 images), or ?type=secure (confidential private files). Single-resource routes (/files/:id) auto-detect the type. - [Notepads](https://docs.trustpager.com/api/notepads.md): Manage rich-text notepads organized in folders. Supports markdown input, iterative editing (append/prepend/section patches), per-record visibility, and ACL-based access control for restricted notes. - [Spreadsheets](https://docs.trustpager.com/api/spreadsheets.md): Manage spreadsheet templates (column definitions) and populated spreadsheets (row data). Spreadsheets can be linked to opportunities and are also created automatically when a form with a spreadsheet field is submitted. Scopes: spreadsheets:read, spreadsheets:write, spreadsheets:delete. - [Reports](https://docs.trustpager.com/api/reports.md): Query engine, dashboard CRUD, card CRUD, and funnel configuration for the workspace reporting system. Dashboards support per-record visibility (all_users or restricted) with ACL-based access grants. - [AI Knowledge](https://docs.trustpager.com/api/knowledge.md): Manage company AI Knowledge entries with semantic search powered by Voyage AI embeddings. Use for policies, FAQs, agent instructions, and product documentation. - [Agent Memory](https://docs.trustpager.com/api/memory.md): Cross-run persistent state for managed agents. Each row records what an agent learned, decided, or intends to revisit about a subject. Supports semantic search via vector embeddings. Required scopes: memory:read (GET/search), memory:write (POST/PATCH/DELETE). - [Company](https://docs.trustpager.com/api/company.md): View and manage company settings, users, and CRM configuration. - [CRM Templates](https://docs.trustpager.com/api/crm-templates.md): Manage reusable CRM templates for emails, messages, and automated communications. - [Integrations](https://docs.trustpager.com/api/integrations.md): Read, query, and execute actions on native integrations (Xero, MYOB, etc.). Connecting and disconnecting integrations is done via the platform UI (OAuth browser flows). - [Webhooks](https://docs.trustpager.com/api/webhooks.md): Manage incoming and outgoing webhooks for external system integration. - [AI](https://docs.trustpager.com/api/ai.md): AI-powered features including text editing, call coaching, needs analysis, form filling, pipeline generation, image generation, reference-guided image editing, text-to-speech generation, and AI tool generators (form, document, whiteboard, website page) that create fully-structured workspace assets from a plain-language prompt. - [Billing](https://docs.trustpager.com/api/billing.md): View billing plans, credit balance, and pricing. - [Service Requests](https://docs.trustpager.com/api/service-requests.md): Submit and manage platform improvement requests. Designed for AI agents to report missing capabilities, suggest new features, and flag issues with the MCP, API, or platform. Supports listing, filtering, note threads, inline note editing, and two-way ticket linking. - [Approvals](https://docs.trustpager.com/api/approvals.md): Manage API actions queued for human approval. When an API key has a "with Approval" permission level, write operations are held here until a team member reviews them. - [AI Instructions](https://docs.trustpager.com/api/ai-instructions.md): Structured behavioral instructions for AI agents. Call once per session, cache the result. Free (0 credits). - [Voices](https://docs.trustpager.com/api/voices.md): Manage saved workspace voices and browse platform-recommended voices. Workspace voices are saved ElevenLabs voices scoped to your company. Platform voices are pre-seeded recommended voices available to all workspaces (read-only). Use these with POST /ai/generate-speech. - [Agent Proposals](https://docs.trustpager.com/api/agent-proposals.md): Agent action proposals submitted by AI agents for human review and approval. Agents submit proposals when they identify an action that should be taken but requires a human decision. Proposals surface in the Agent Hub at /auto/agent-hub?tab=proposals. - [Lead Generation](https://docs.trustpager.com/api/lead-gen.md): Search for businesses via Google Maps (powered by Apify), match against existing CRM records, save search configurations, and import results as contacts, customers, and deals. Requires lead-gen:read, lead-gen:write, or lead-gen:delete scopes. - [Learning Hub](https://docs.trustpager.com/api/training.md): Manage Learning Hub canvases and their cards. Canvases are drag-and-drop boards of cards that can embed YouTube videos, external links, iframes, notepads, PDFs, images, and secure files. - [Scheduled Communications](https://docs.trustpager.com/api/scheduled-communications.md): Queue deferred emails, SMS, and AI voice calls for future dispatch. The communications_scheduler_tick cron (runs every minute) claims pending rows, enforces business-hours windows, retries with exponential backoff, and dispatches via the automation pipeline. Row lifecycle: pending -> dispatching -> dispatched | failed | cancelled | skipped. - [Schemas](https://docs.trustpager.com/api/schemas.md): Discoverable reference data for automation trigger types. Returns the shape of trigger_data each trigger publishes, the {{variable}} tokens available in action templates, and CRM-enriched variable namespaces. Free -- 0 credits, no scope required. - [Reputation](https://docs.trustpager.com/api/reputation.md): Public B2B reputation profiles, verified reviews, and case studies. Build credibility with a public reputation page at trustpager.com/reputation/. Includes a companion anonymous image upload endpoint for reviewer logos and avatars. - [Referrals](https://docs.trustpager.com/api/referrals.md): Track the referrer -> referred contact -> opportunity chain. Includes workspace-defined category picklist, a leaderboard endpoint, a public token-based submission form, and an automation action (attribute_referral) for pipeline-driven attribution. Every write to the referrals table fires the referral_attributed automation trigger (see GET /schemas/triggers/referral_attributed). Attribution is also cached on the opportunity: crm_deals.primary_referrer_contact_id and crm_deals.primary_referrer_category are maintained by a Postgres trigger and surface in GET /opportunities/:id (including the expand=referrer expansion). - [CRM Export](https://docs.trustpager.com/api/crm-export.md): Bulk-export CRM data as XLSX or CSV. Supports all four entity types (contacts, customers, deals, work-orders) with entity-specific filters. Custom fields auto-expand into dedicated columns. Maximum 50,000 rows per request. - [Export Templates](https://docs.trustpager.com/api/export-templates.md): Reusable export configurations that combine a column layout, filters, sort order, and output format into a named template. Run a template to get XLSX or CSV data; preview returns the first 10 rows. Named views let each user persist their own filter/sort variant on a shared template. Scopes: exports:read, exports:write, exports:delete. - [Evie (In-App Agent)](https://docs.trustpager.com/api/evie.md): Evie is the conversational AI assistant embedded in the TrustPager CRM sidebar. These endpoints are separate from the standard /api/v1 gateway and use OAuth tokens minted specifically for the in-app agent. - [Agent Ops](https://docs.trustpager.com/api/agent-ops.md): Observability and management for AI agent infrastructure. Covers: registry, run log, signals, metrics, tool log, report runs, alert rules, fired alerts, and the aggregated dashboard. All routes require agent-ops:read (reads) or agent-ops:write (writes/actions). ## Guides - [Quickstart](https://docs.trustpager.com/quickstart) - [Authentication & scopes](https://docs.trustpager.com/authentication) - [MCP setup](https://docs.trustpager.com/mcp-setup) - [MCP tools](https://docs.trustpager.com/mcp-tools) - [MCP examples](https://docs.trustpager.com/mcp-examples) - [Template variables](https://docs.trustpager.com/template-variables) - [Error reference](https://docs.trustpager.com/errors) - [Changelog](https://docs.trustpager.com/changelog) ## Optional - [Full expanded reference (llms-full.txt)](https://docs.trustpager.com/llms-full.txt) - [OpenAPI 3.1 spec](https://docs.trustpager.com/openapi.json) - [Machine-readable API index](https://docs.trustpager.com/api-index.json)