Developer · Last updated 18 May 2026 · 4 min read

Developer overview

The TrainAR developer platform gives you three ways to build on top of your TrainAR account: a Tenant REST API for direct CRUD operations, webhooks for reactin…

The TrainAR developer platform gives you three ways to build on top of your TrainAR account: a Tenant REST API for direct CRUD operations, webhooks for reacting to events as they happen, and a Tenant MCP server for agent-driven workflows where an AI model calls TrainAR tools on your behalf.

The three surfaces

Tenant REST API

The REST API lets you create tasks, manage users, execute skills, and subscribe to webhooks from any HTTP client. Use it when you need to trigger an action on demand -- importing a job from an external system, inviting a new user as part of an onboarding flow, or running a skill from a backend script.

Base URL: https://api.trainar.ai/v1/

Every request is authenticated with a tak_* API key in the Authorization: Bearer header.

See Tenant REST API reference for the full endpoint list.

Webhooks

Webhooks let TrainAR push events to a URL you control. Instead of polling the API, you register an endpoint and receive an HTTP POST the moment something happens -- a session completes, a task changes status, a skill runs. You can subscribe to all six event types or just the ones you care about.

Use webhooks when your workflow is event-driven: update a spreadsheet when a session completes, trigger a Slack message when a task is created, sync completion data back to your job management system.

Webhooks are authenticated at the delivery end using HMAC-SHA256 signatures, not API keys.

See Webhooks for the full reference.

Tenant MCP server

The Tenant MCP (Model Context Protocol) server exposes around 70 tools across the same domains as the REST API (and several more) as a structured interface that AI models -- Claude, ChatGPT, n8n AI nodes, or custom agents -- can call directly. It is the right choice when you are building an agent that needs to reason over your TrainAR account: listing sessions to find patterns, creating tasks from a conversation, or executing a skill as part of a larger workflow.

MCP URL: mcp.trainar.ai/sse

Auth is the same tak_* key passed in the Authorization: Bearer header or as the api_key query parameter.

See Tenant MCP server for connection guides and the full tool catalogue.

Authentication model

All three surfaces share the same authentication primitive: Tenant API keys with the prefix tak_. One key can hold multiple permission scopes, so you can create a narrow key for a single integration or a broad key for an agent that needs full access.

Authorization: Bearer tak_your_key_here

Keys are created in Dashboard → API & Webhooks → API Keys (admin-only top-level nav). The key value is shown only once at creation -- copy it immediately. If you lose it, revoke the key and generate a new one.

See API keys and permission scopes for the scope reference and security best practices.

When to use which surface

Situation Recommended surface
Create a task when a job is raised in another system REST API (POST /api-tenant-tasks)
Log training completion into a spreadsheet Webhooks (session.completed)
Update your HR system when a user is invited Webhooks (task.created + user context)
Let an AI agent manage tasks and users in a conversation Tenant MCP server
Run a nightly script that pulls all recent sessions REST API (GET) via the MCP list_sessions tool
Automate skill execution from n8n or a custom agent REST API (POST /api-tenant-skills-execute) or MCP execute_skill

The REST API and MCP server expose overlapping capabilities -- the MCP server calls the same underlying database but with richer context-passing built in for agent loops. If you are building a traditional server-to-server integration, use the REST API directly. If you are building an AI agent, use the MCP server.

Scopes and access boundaries

Your API key only has access to your own tenant's data. There is no cross-tenant access. Every endpoint enforces that the key's tenant matches the requested resource -- a 403 is returned for any record that belongs to another account.

Rate limits & throttling

There are no per-endpoint published rate limits today. The API runs on Supabase Edge Functions, which apply platform-level throttling under extreme volumes. If you're planning sustained high-frequency calls (thousands per minute), pace your traffic and add backoff on 5xx responses. Get in touch (team@trainar.ai) if you have a workload that needs explicit limit guarantees.

Getting started

  1. Create an API key with the scopes you need.
  2. Make your first request to the REST API.
  3. Register a webhook endpoint to receive events.
  4. Connect the MCP server to Claude Desktop, n8n, or your own agent.