REST API

With REST API you turn any HTTP endpoint into a tool your agent can invoke during a conversation. Unlike MCPs (which connect a whole server), here you define a single request and tell the AI what data it must provide to run it.

Each API combines two things:

  • A schema — the fields the AI must fill in (for example, an order ID).
  • A complete HTTP request — method, URL, params, headers, body, and response options.

To start, click "Create API". The wizard has three steps: Identity → Define → Review and create. The API is created as a draft; you can enable it when it's ready.


Step 1: Identity

Give it a technical name and a description that let the AI know when to use the tool.

FieldDescription
Technical nameA unique identifier in the workspace. Only lowercase letters, digits, and underscores (_) are allowed. The AI sees the tool as api_<name> (for example, api_get_order_details).
DescriptionThe text the AI reads to decide when to invoke the tool. Be specific: explain what it does and when to use it (for example: "Gets the full details of an order by its ID. Use it when the user asks about the status of a specific order."). Minimum 10 characters, maximum 1024.

Step 2: Define the request

Here you build the actual HTTP call. Choose the method (GET, POST, etc.) and write the endpoint URL.

The request is organized into tabs:

TabWhat it's for
ParamsQuery parameters appended to the URL (?key=value). Up to 25.
AuthorizationHow the request authenticates (token, API key, etc.).
HeadersAdditional HTTP headers.
BodyThe request body (for POST, PUT, etc.).
SettingsGeneral options for the call.

Variables

Variables are the dynamic part of the request. Type {{ }} in any field (URL, params, headers, or body) and a picker appears to insert one.

Context variables (ctx) — Data Platica knows about the conversation and fills in automatically. They appear in the picker with the CTX label:

VariableWhat it contains
{{ctx.phoneNumber}}Customer's phone number.
{{ctx.workspaceId}}Workspace ID.
{{ctx.conversationId}}Conversation ID.
{{ctx.agentId}}Active agent ID.
{{ctx.agentName}}Active agent name.
{{ctx.channelId}}Channel ID.

Your own variables — If you type a name that doesn't exist (for example {{orderId}}), the picker offers "Create as new variable". Each variable appears in the Variables table, with these columns:

ColumnDescription
VariableThe name you used inside {{ }}.
ModeWhere the value comes from (see below).
TypeThe data type: string, number, integer, boolean, array, or object.
Description / ValueIn AI mode, the description the AI reads to know what the field represents; in Fixed mode, the constant value.
Used inWhere the variable appears within the request (URL, query, header, or body).
Req.Whether the field is required.

The Mode defines where each variable's value comes from:

ModeWhere the value comes from
AIThe AI fills in the value when invoking the tool. These variables make up the tool's schema.
FixedA constant value you define that never changes.
ContextMapped to a piece of conversation data (a ctx value, like the customer's phone number).

Step 3: Review and create

The final step shows a summary of the tool: name (tool name), method, URL, number of variables, and description.

From here you have two options:

  • Create as draft — saves the API to keep editing it later. It stays inactive.
  • Create and enable — creates the tool and makes it active right away.

Managing the API

After creating it, the API's detail view opens. If you saved it as a draft, it shows the DRAFT label and a "Publish" button to activate it (it takes you to this same view, now with the API active).

The detail view has several tabs:

TabWhat it's for
SummaryGeneral overview of the tool.
EditorEdit the request and variables (same as Step 2).
ResponseDefine which part of the response the AI sees.
AdvancedAdvanced tool options.
LogsLog of API invocations.
StatsUsage statistics.

Summary tab

Shows and lets you edit the tool's identity (technical name and description, with "Autocomplete"), along with tracking metadata:

FieldDescription
VersionThe tool's version number.
Last editedDate and time of the last change.
Last testedWhen it was last tested ( if never tested).

Editor tab

It's the same builder as Step 2: there you edit the method, URL, tabs (Params, Authorization, Headers, Body, Settings), and the request variables. It also includes the "Test API" button.

Testing the API

From the Editor or the Response tab you can open "Test API" to run a real call without leaving Platica.

ElementDescription
Simulated inputThe JSON the AI would pass as arguments when invoking the tool. Use "Auto-fill" to generate sample values.
Dry runSimulates the call without actually sending it.
RunSends the request for real.

After running, you'll see the result (success + response time) and the details of the sent request: method, final URL, headers, and authentication method.

Response tab

This is where you decide which part of your API's response the AI will see. Platica needs a real example for this: if you haven't tested the API yet, the tab will ask you to run "Test API" first; with the sample response in hand, you can map it.

Which part of the response does the AI use? — Pick a sub-path if the response carries more than you need. Platica suggests paths detected in the sample response (for example [0].name, [0].email) as one-click chips, or you can keep "Full response". Two side-by-side panels show the raw response and what the AI will receive, so you see the effect of every change instantly.

Filter fields — Limit which properties the AI sees within the selected path:

ModeWhat it does
All fieldsThe AI receives everything (default behavior).
Only theseThe AI only sees the fields you check.
All exceptThe AI sees everything except the fields you exclude.

Use it to cut noise (irrelevant fields that confuse the agent) or to hide sensitive data you don't want exposed to the AI.

Fail if the path doesn't exist — On by default. If you define a path and the API response no longer contains it, the AI receives a clear error instead of the full response. Turning it off can hide bugs (for example, the API changed its shape without notice); keeping it on is recommended.

Size limit — Cap on the characters the AI will see of the already-filtered JSON. If the response exceeds it, it's truncated with the [truncated …] marker so the AI knows data is missing. The default is 32,000 characters (≈ 8,000 tokens).

Advanced tab

Options for special cases, disabled by default:

Periodic auth — Automatically injects a token refreshed by a cron job of type auth. When you enable it, you configure:

FieldDescription
Cron jobThe auth-type cron that generates the token. If you don't have one, create it first in Cron jobs and come back.
Inject intoWhere the token is placed (for example, in a Header).
NameThe header name (for example, Authorization).
Prefix / SuffixText prepended or appended to the token (for example, the Bearer prefix).

The "Value sent" field shows a preview of how the header with the token will look.

Encrypt payload (JWT) — Signs the request body with HS256 + exp and sends it as jdata form-urlencoded. Intended for specific legacy integrations. You configure the HS256 Secret and the token's TTL (seconds).

Logs tab

Records every API invocation (real and test calls) with its full history. At the top you'll see aggregate metrics: Total, Successes, Errors, Error rate, and P50 / P95 latencies (up to the last 30 days).

You can filter by All / Successes / Errors, search, and Export the log. Expanding a call shows its status, method, latency, and the full metadata (trigger, toolName, inputArgs, requestUrl, requestHeaders, sentBody) and, if it failed, the error message.

Stats tab

Summarizes the API's activity over a window of 24h, 7 days, or 30 days: number of calls, successes, errors (with their rate), and latency (p50 and p95).

Publishing, pausing, and managing

From the API's top bar you manage its state:

  • Publish — activates the API (it leaves the draft state) so agents can use it.
  • Pause — once published, you can pause it to temporarily disable it without deleting it.
  • Menu (⋮) — from the three dots you can clone the API (to create a variant) or delete it entirely.