Change a tool's host, traffic, attachment, call style or key

People only, with a fresh second factor.

PATCH/v1/tools/{tool_id}

People only, with a fresh second factor. A new key replaces the old one, which is destroyed. Every table that grants the tool is published again. A new host is taken only with a new key in the same call (invalid otherwise): the stored key was written once for its host and can never be read back, so it is never re-pointed at another host, where whoever holds that host would receive it. A new key keeps the tool's kind unless kind is sent with it. kind without key is invalid: an encrypted key is never relabelled as another kind.

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 PATCH "https://api.pod.mapier.ai/v1/tools/example?project=example" \
  -H "Authorization: Bearer $POD_PERSON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"host":"example"}'

Parameters

NameInTypeRequiredWhat it is
tool_idpathstringYes
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

A new host needs a new key with it: the encrypted key is never sent to a host it was not given for.

FieldTypeRequiredWhat it is
hoststringNo
trafficstring[]No
attachstringNo
calls"mcp" | "json-rpc" | nullNoLeft out keeps it; null clears it, which is refused while a call rule names the tool.
keystringNoThe 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 the new key is; only with key (invalid on kind otherwise), since an encrypted key is never relabelled as another kind. Left out with a key, the tool's kind so far.

Answer

200. The tool as changed, without its key.

200
{
  "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, not_found. 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.