Skip to main content

Gravity Rail Developer Guide

Welcome to Gravity Rail! Build sophisticated AI-powered applications with multi-channel communication, custom data management, and intelligent automation.

What is Gravity Rail?

Gravity Rail is an enterprise platform for developers who need:

  • Multi-channel communication - Email, SMS, voice, and web chat unified in one platform
  • AI workflows - Build intelligent automation with custom tools and integrations
  • Custom data management - Define your own CRM-like data structures with indexing and search
  • MCP integration - Connect AI models to your business logic via Model Context Protocol
  • Flexible APIs - 170+ REST endpoints with OAuth 2.0 and webhooks
  • White-label capable - Resell with your own branding and pricing

Think of it as Zapier + Twilio + HubSpot + MCP, designed for developers.

Pick your integration path

You want to…Start here
Call the API from any languageREST API — see Quick Reference then API Reference
Ship a TypeScript/Node integrationTypeScript SDK — see SDK Reference
Drive your workspace from the terminalCLInpm install -g @gravity-rail/cli, then gr login
Let Claude/ChatGPT talk to Gravity RailMCP — see Getting Started with Integration
Use Claude Code with Gravity RailClaude Skills — see Claude Skills for Gravity Rail

For AI coding agents: a machine-readable index of this documentation is published at /llms.txt, with the full content inlined at /llms-full.txt. These follow the llms.txt convention.

Quick Start

Prerequisites

  • Gravity Rail account (sign up)
  • API key (Dashboard > Settings > API Keys) — or use OAuth 2.0 for third-party apps
  • Basic REST API knowledge

Base URL

https://api.gravityrail.com/api/v2

Authentication

curl https://api.gravityrail.com/api/v2/w \
-H "Authorization: Bearer YOUR_API_KEY"

Your first API call — cURL vs SDK

List your workspaces. Both examples hit GET /api/v2/w and return the same payload — pick whichever matches your stack.

# cURL
curl https://api.gravityrail.com/api/v2/w \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
// TypeScript SDK — @gravity-rail/sdk
import { GravityRailClient } from '@gravity-rail/sdk';

const client = new GravityRailClient({
apiKey: process.env.GRAVITY_RAIL_API_KEY,
});

const workspaces = await client.getWorkspaces();
console.log(workspaces);
# CLI — @gravity-rail/cli
gr login # OAuth, cached per environment
gr workspaces list # same endpoint, terminal-friendly output

Send your first message

Create a chat and send a message on behalf of the assistant. Replace {wid} with a workspace ID returned by the call above.

# 1. Create a chat
curl -X POST https://api.gravityrail.com/api/v2/w/{wid}/chats \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"channel":"web-chat","title":"Support","assistantEnabled":true}'

# 2. Send an assistant-authored message (API-initiated)
curl -X POST https://api.gravityrail.com/api/v2/w/{wid}/chats/{chatId}/send-assistant-message \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message":"Hello, how can I help?"}'

See the Quick Reference for 30+ common operations side-by-side.

Core Capabilities

Communication Channels

  • Email inboxes with AI processing
  • SMS and voice calls
  • Web chat widgets
  • Unified conversation management

Custom Data Types

  • Define flexible data schemas
  • Full-text search and indexing
  • Bulk operations
  • Relationship management

AI Workflows

  • Custom toolkits extending AI capabilities
  • Event-driven automation
  • Multi-step processes
  • Integration with external services

MCP (Model Context Protocol)

  • Build MCP servers for Claude/ChatGPT
  • Add external tools to AI workflows
  • OAuth 2.0 with Dynamic Client Registration

Webhooks & Events

  • Real-time notifications
  • Email, chat, task, and data events
  • Custom event rules

Permission System

  • Custom roles and RBAC
  • Scope-based access control
  • Multi-workspace organizations

What Can You Build?

  • AI-powered customer support with multi-channel inbox and smart routing
  • Custom CRM systems with flexible data structures and automation
  • Chatbots and AI agents using custom toolkits and MCP
  • Workflow automation triggered by emails, webhooks, or routines
  • SaaS platforms with white-label reseller capabilities
  • Healthcare patient engagement with HIPAA-compliant data storage
  • MCP servers that expose your business logic to AI models

Documentation Structure

Rate Limits

Rate limits vary by plan. Check your plan details or contact support@gravityrail.com.

Support