API reference

Choose the resource you need and open its endpoint. Each call includes an example and the parameters for using it in your application.

https://api.platic.ai/v1

Conversations use version 2: https://api.platic.ai/v2/conversations. Every other resource is on /v1.

Your first call

import { Platic } from "platic-sdk";

const platic = new Platic({ apiKey: process.env.PLATIC_API_KEY! });
const agents = await platic.agents.list();

What you need to know

  • Authentication: every request carries Authorization: Bearer <key>. See Authentication.
  • Responses: many routes return { "status": "success", "data": … }; conversations add included and meta, and some V1 reads group data in workspaces. See Responses.
  • Paginated lists use limit and pageToken. See Pagination.
  • Retries: use Idempotency-Key on routes that support it, including every conversation action, to avoid repeating a change. See Idempotency.
  • Errors share one shape with a stable details.code. See Errors.
  • A Postman collection has every request.

Resources

Build agents

ResourceWhat it covers
AgentsCreate agents, change their settings and manage versions, files, tools and subagents.
Agent templatesInstall a ready-made agent and resolve its pending items.
EvalsSimulated conversations that test a version before you publish it.
ChatTalk with an agent now or schedule a turn.

Knowledge and tools

ResourceWhat it covers
FilesTexts, web pages and documents your agents consult.
ToolsThe workspace tool catalog.
Custom APIsTurn an HTTP endpoint into a tool.
Custom functionsYour own TypeScript code as a tool.
MCP serversConnect an external MCP server and install its tools.
DatabasesRead-only PostgreSQL or MySQL.
SecretsEncrypted credentials for your tools and webhooks.
AI providersBring your own model key.

Channels and conversations

ResourceWhat it covers
ChannelsWhatsApp, Instagram, Messenger and email.
Web chatsThe chat for your website.
ConversationsList, search and count conversations, read their messages, pause or resume the agent, tag, assign and archive.
MessagesSend and schedule messages.
WhatsApp templatesCreate and track WhatsApp templates.
Posts and commentsInstagram and Facebook posts, threads and replies.
CasesConversations escalated to your team.
EscalationsDefine when an agent asks for help and what happens while your team handles it.

Contacts and campaigns

ResourceWhat it covers
ContactsThe people your business talks to (API: clients).
Custom fieldsExtra data on contacts.
TagsLabel contacts.
CampaignsWhatsApp campaigns to an audience.

Account

ResourceWhat it covers
WebhooksSigned events on your server.
UsageConsumption and autonomy statistics.
WorkspacesThe workspaces a credential can use.
Docs searchSearch these docs from code.