Get an API
SDK platic.tools.apis.get()
Check what remains before publishing an API. Read status, verified and secrets[].state; nextStep explains the next step. The response includes the full definition without credentials.
Example
curl "https://api.platic.ai/v1/tools/apis/$INTEGRATION_ID" \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.tools.apis.get("api_123"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
integrationId | string | Custom API ID | ✓ |
Response
data is the API:
{
"status": "success",
"data": {
"id": "RuzoaswTBBrhutHyKYZn",
"toolName": "api_order_lookup",
"name": "order_lookup",
"description": "Looks up the status of an Example Store order by its number. Use it when the customer asks where their order is.",
"status": "draft",
"version": 2,
"variables": [
{
"name": "orderId",
"type": "string",
"description": "Order number, as it appears in the confirmation email.",
"required": true,
"mode": "ai"
}
],
"response": {
"path": "data",
"exclude": ["internal_notes"]
},
"request": {
"method": "GET",
"url": "https://api.example-store.com/orders/{{orderId}}",
"headers": [
{ "key": "Accept", "value": "application/json" }
],
"auth": { "type": "bearer" }
},
"createdAt": "2026-10-28T12:05:03.902Z",
"updatedAt": "2026-10-28T12:09:41.300Z",
"lastTest": null,
"verified": false,
"secrets": [
{
"slot": "auth.token",
"state": "needs_authorization",
"secretId": "5d0c7a1e9b3f4a6c8e2d1f0b7a9c3e5d6f8a0b2c4d6e8f1a3b5c7d9e0f2a4b6c"
}
],
"secretsRedacted": true,
"nextStep": "Bind a secret to: auth.token. Use POST /v1/tools/apis/RuzoaswTBBrhutHyKYZn/secrets with { slot, secretId }. Secret ids come from GET /v1/secrets; create one with POST /v1/secrets. Slots in \"needs_authorization\" keep their secretId: the definition changed after they were bound, so bind them again."
}
} Response fields
This is the shape of an API in every response of this section.
| Field | Type | Description |
|---|---|---|
id | string | The integrationId. When the API is published, it is also its toolId |
toolName | string | The name the agent sees: api_<name> |
name | string | The short name you defined |
description | string | What the agent reads to decide when to use it |
status | string | draft, enabled or paused. See lifecycle |
version | number | Goes up with every change. Send it as expectedVersion when you update |
request | object | The HTTP request. request.auth has the authentication type, never the credential |
variables | array | The variables, with the shape described in Create an API. The constantValue of a constant variable comes as "[REDACTED]" |
context, mapping, response, periodicAuth, encryptPayload | object | The optional sections. They only appear if you configured them. encryptPayload has ttlSeconds, never the key |
createdAt, updatedAt | string | null | Dates in ISO 8601 |
lastTest | object | null | The last test made from Platica's editor: trigger, input, outcome, httpStatus, durationMs and at. Tests made with this API do not change it: their result is in verified |
verified | boolean | true if the last real test finished well and is still valid for this configuration and these secrets |
secrets | array | One entry per slot: slot, state and secretId if a secret is bound. See slot states |
secretsRedacted | boolean | Always true: the response has no credentials |
secretsError | object | Only when creating or updating with secrets: { code, message } when the API was saved but a secret could not be bound |
nextStep | string | Text in English that says what is missing, in order. It is for people and assistants; do not program against its wording |
What nextStep says
| Situation | nextStep starts with |
|---|---|
request.url is missing | Set request.url… |
There are slots in missing or needs_authorization | Bind a secret to: <slots>… |
| It is published | Enabled. Connect it to an agent… |
| A real test is missing | Run a real test… |
| It is paused and verified | Paused: no agent sees it… |
| It is verified and unpublished | Verified. Publish it… |
To program, use status, verified and secrets[].state.
Errors
| Status | details.code | When |
|---|---|---|
400 | INVALID_REQUEST | The credential covers several workspaces and workspace is missing or is not one of them |
403 | FORBIDDEN | The person behind the token does not have access to Integrations |
404 | NOT_FOUND | The API does not exist in this workspace |
See Errors for the full shape of an error.
Notes
- Values that look sensitive come as
"[REDACTED]": a header's with a credential name, aconstantvariable's and keys with a credential name in a JSON body. - A published API is connected to an agent with Connect a tool:
PUT /v1/agents/{agentId}/tools/{toolId}, with the API'sid.