Connect a tool

People only, with a fresh second factor.

POST/v1/tools

People only, with a fresh second factor. The key is stored encrypted at once under the customer's key and can never be read back. A policy grants the tool with Allow use <name> or Ask use <name>, which switches traffic reading on for the sandboxes under it. A host known to echo requests gets a warning in warnings. The key must read as its kind (invalid, field key, otherwise; the message never holds the key), and the kind is bound into the encrypted key.

For people only: a signed-in person with a fresh second factor makes this call, from the dashboard. Any API key is refused with person_required.

Request

curl -X POST "https://api.pod.mapier.ai/v1/tools?project=example" \
  -H "Authorization: Bearer $POD_PERSON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"example","host":"example","traffic":["example"],"attach":"example","key":"example"}'

Parameters

NameInTypeRequiredWhat it is
projectquerystringYesThe project the call is about. Every route is scoped to one.
Pod-OrganisationheaderstringNoThe organization, for a person who belongs to several. An API key's organization is its own, and a different one here is forbidden.
Idempotency-KeyheaderstringNoMakes a repeat of this call safe for 24 hours.

Body

FieldTypeRequiredWhat it is
projectstringNoOptional; when sent it must be the project of the query.
namestringYesA named policy may not be called organisation, project or default, the layers the service makes itself, or self, which a rule's policy:self reads as the policy's own domain.
hoststringYes
trafficstring[]Yes
attachstringYes
calls"mcp" | "json-rpc" | nullNoA call rule may name the tool only when this is set. Null or left out: no call rule may name it.
keystringYesThe tool's key. Written once, stored encrypted at once under the customer's key in Pod's form, never readable back and never in an answer or an error message. Pod's limit: 1 to 8192 characters of visible ASCII (no space, control character or line break). It must read as its kind.
kind"header" | "aws_sigv4" | "oauth_refresh"NoWhat key is. Left out, header.

Answer

201. The tool, without its key.

201
{
  "id": "example",
  "name": "example",
  "host": "example",
  "traffic": ["example"],
  "attach": "example",
  "calls": null,
  "kind": "header",
  "connected_at": "2026-11-23T12:00:00.000Z",
  "connected_by": "example",
  "used_by": 0,
  "warnings": ["example"]
}
FieldTypeAlwaysWhat it is
idstringYes
namestringYesA named policy may not be called organisation, project or default, the layers the service makes itself, or self, which a rule's policy:self reads as the policy's own domain.
hoststringYes
trafficstring[]YesMethods and path prefixes the key may be attached to, such as POST /v1/refunds*.
attachstringYesHow the key is attached, with <key> where it goes, such as Authorization: Bearer <key>.
calls"mcp" | "json-rpc" | nullNoA call rule may name the tool only when this is set. Null or left out: no call rule may name it.
kind"header" | "aws_sigv4" | "oauth_refresh"NoWhat the tool's encrypted key is, read from its encrypted form; never the key. Always sent by this version; a tool connected before kinds existed is header.
connected_atstringYesRFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z.
connected_bystringYesWho made a change. An identity account id for a person, or a key id (key_…) for an API key.
used_byintegerYesPolicies that grant the tool. At least 0.
warningsstring[]NoFor example, that the host is known to echo requests back.

Errors

The refusals this call is known for: invalid, unauthorized, person_required, forbidden, conflict. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.