Platform
Your platform's settings, the agent tools of your own that Undertext's MCP server offers, and its counts.
Your platform's settings say where Undertext sends people and calls: the page where they approve agents, where your documents and seals are, which origins may frame the editor, and the tools of your own that agents get beside Undertext's. You can set them here, or all but your tools in the console; a server that sets them on starting keeps them in step with where it runs.
The platform object
| Attribute | Type | Description |
|---|---|---|
id | string | Your platform's id. |
slug | string | Its short name, in your MCP address. |
name | string | What Undertext calls your platform: on consent and seal pages, and to agents. |
icon_url | string or null | Your icon, which MCP clients may show beside your server: Undertext's MCP server names it in serverInfo.icons when an agent connects. |
embed_origins | array | The origins that may frame the editor and presence settings. See Embed origins. |
consent_url | string or null | Where Undertext sends people to approve an agent, with ?request=areq_…. See Agent requests. Without one, agents can't connect. |
document_url | string or null | Where your product shows a document, with {document} for its id. Links between documents in the editor, and agents' answers, use it. |
seal_url | string or null | Where your product shows a seal, with {code} for its code. Seals' url and seal lines name it. Without one, they name the seal's page on seal.undertext.sh. See Seals. |
mcp_url | string | Your MCP address, for your users' agents. |
domain | string or null | Your domain, such as acme.com. Seal pages show it beside your name once it's verified, and say "Unverified" until then. See Verify your domain. |
domain_verified | boolean | Whether Undertext found your domain's record, at its last look. |
domain_record | object or null | The DNS record that proves domain is yours: type (TXT), name and value. |
checkins_required | boolean | Whether Verified Presence is required: everyone writing in your documents is asked to check in, and no one can turn it off. false unless you set it. |
checkin_minutes | integer | About how often your people are asked to check in while they write where Verified Presence is on: 1, 5, 10 or 30. 5 unless you set it. Your default, for anyone who hasn't chosen one of checkin_choices. |
checkin_choices | array | The intervals your people may choose from in presence settings, checkin_minutes among them, sorted. Empty, as unless you set it, everyone is asked at checkin_minutes. |
{
"id": "plt_6Hq2Lm4R",
"slug": "acme",
"name": "Acme Notes",
"icon_url": "https://acme.com/icon.png",
"embed_origins": ["https://acme.com"],
"consent_url": "https://acme.com/undertext/connect",
"document_url": "https://acme.com/docs/{document}",
"seal_url": "https://acme.com/seals/{code}",
"mcp_url": "https://mcp.undertext.sh/acme",
"domain": "acme.com",
"domain_verified": true,
"domain_record": { "type": "TXT", "name": "_undertext.acme.com", "value": "undertext-verification=Hq2Lm4R8Tb3Wc1X9Kp5Nz7Vd" },
"checkins_required": false,
"checkin_minutes": 5,
"checkin_choices": [5, 10, 30]
}Retrieve the platform
GET /v1/platform
curl https://api.undertext.sh/v1/platform \
-H "Authorization: Bearer $UNDERTEXT_SECRET_KEY"Update the platform
PATCH /v1/platform
Only the fields you send change. null removes a URL.
| Parameter | Type | Description |
|---|---|---|
name | string | Your platform's name. |
icon_url | string or null | A URL of your icon, for MCP clients to show. |
embed_origins | array | Origins, such as https://acme.com; each is kept as its origin alone. https, except http on localhost and 127.0.0.1. |
consent_url | string or null | |
document_url | string or null | With {document} where the id goes. |
seal_url | string or null | With {code} where the code goes. https, except http on localhost and 127.0.0.1. |
domain | string or null | A domain name, such as acme.com. A new one gets a new record and is unverified until it's found. |
checkins_required | boolean | true to require Verified Presence of everyone writing in your documents, even those without a key yet, whom the editor asks to add one. |
checkin_minutes | integer | 1, 5, 10 or 30. Shorter asks more often, and each check-in vouches for less writing: about one and a half intervals. A seal's breakdown says how often its check-ins came. |
checkin_choices | array | Intervals your people may choose from, each 1, 5, 10 or 30; checkin_minutes is added if it's missing. [] for no choice. Someone whose choice you stop offering is asked at checkin_minutes, and at their choice again if you offer it again. |
curl https://api.undertext.sh/v1/platform \
-X PATCH \
-H "Authorization: Bearer $UNDERTEXT_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"consent_url": "https://acme.com/undertext/connect", "document_url": "https://acme.com/docs/{document}"}'Returns the platform.
| Error | When |
|---|---|
400 invalid_parameter | A URL that isn't one, embed_origins that aren't https origins (or http on localhost), a seal_url without {code}, a domain that isn't a domain name, checkins_required that isn't true or false, checkin_minutes that isn't one of 1, 5, 10 or 30, or checkin_choices that isn't a list of them. |
Verify your domain
POST /v1/platform/verify-domain
Add domain_record to your domain's DNS, as a TXT record. Undertext looks for it each day, so a domain is verified within a day of the record appearing, and stops being verified once it's gone; keep the record for as long as you use the domain. This looks now instead. Returns the platform, with domain_verified as found.
| Error | When |
|---|---|
409 no_domain | The platform has no domain. |
Set your agent tools
PUT /v1/platform/tools
Gives your users' agents tools of your own, for what your product keeps itself, such as folders and pins. Undertext's MCP server lists them beside its own, and forwards each call to url, signed with secret. Each call replaces the tools you set before. See Add your own agent tools.
| Parameter | Type | Description |
|---|---|---|
url | string, required | Where Undertext posts tool calls. |
secret | string, required | At least 32 characters, which Undertext signs each call with. Choose it yourself and keep it. |
tools | array, required | Each { name, title?, description, inputSchema }, as MCP describes a tool. Names are lowercase letters, digits and underscores, and can't be one of Undertext's own. Agents are shown each schema without additionalProperties or an empty properties, which Gemini can't read. |
instructions | string | What agents are told of your tools, after Undertext's own instructions. |
curl https://api.undertext.sh/v1/platform/tools \
-X PUT \
-H "Authorization: Bearer $UNDERTEXT_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://acme.com/undertext/tools",
"secret": "'"$ACME_TOOLS_SECRET"'",
"instructions": "Folders are the person'\''s own: list_folders shows them, move_document files a document in one.",
"tools": [
{ "name": "list_folders", "description": "The person'\''s folders, in their order.", "inputSchema": { "type": "object", "properties": {} } }
]
}'{ "url": "https://acme.com/undertext/tools", "tools": ["list_folders"] }| Error | When |
|---|---|
400 invalid_parameter on url | Not a URL. |
400 invalid_parameter on secret | Shorter than 32 characters. |
400 invalid_parameter on tools | A tool lacks a name, description or input schema, or its name is one of Undertext's. |
Retrieve counts
GET /v1/platform/stats
Counts for your own operations page: all time, and the last 7 days.
{
"data": [
{ "label": "Documents", "total": 1204, "week": 87 },
{ "label": "Sealed documents", "total": 312, "week": 19 },
{ "label": "Agents", "total": 96, "week": 8 }
]
}