Allow or remove outbound API
tzcloud_declare_outbound_apiDeclare or remove an outside API your application calls through the proxy. Its key must already be stored with tzcloud_store_secret. Where the manifest has upstreams, the API is declared there instead of with this tool.
Calls to /egress/v0/<upstream>/<path> use Authorization: Bearer with the platform credential or an egress key. The proxy adds the stored key. Code reads the gateway address and credential from settings. sdk_settings configures an unchanged SDK on each environment's next deploy, promote or tzcloud_restart_application. Declaration leaves running settings unchanged. Direct key binding in manifest settings is only for these exceptions. Your user requires the client's fixed host unchanged, or library source fixes it with no configurable gateway address. For that binding, declare no upstream and list its host in manifest egress. No check proves your code uses the proxy. Check the first call with tzcloud_read_logs for undeclared egress.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>"
},
"name": "tzcloud_declare_outbound_api"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Upstream name, unique within the account, and `<upstream>` in the proxy path. Reusing it revises the entry. Changing or removing an upstream the manifest's `upstreams` lists is refused `manifest_owned_field`. | |
| remove | No | With `true`, takes `name` alone and frees it. This upstream's egress keys end in both environments. Calls from running copies stop after the cache interval. The stored key stays. Otherwise declares or revises. | |
| base_url | No | Required to declare: public `https://` base URL. The key applies under it. Mail ports are refused. Without a valid URL, a declaration is refused `invalid_request`. Omitted with `remove: true`. | |
| settings | No | Deprecated alias of `sdk_settings`. Giving both is refused `invalid_request`. | |
| application | No | Application id, required to declare, else `application_required`. A different application on revision is refused `binding_refused`. | |
| auth_format | No | Header value with `{value}` replaced by the key. Default: `{value}`. | |
| auth_header | No | Required to declare: the HTTP header that carries the key. Without a valid header name, a declaration is refused `invalid_request`. Omitted with `remove: true`. | |
| token_shape | No | Token-count format of the upstream's responses. Omitted where it reports none. | |
| sdk_settings | No | Settings filled for an unchanged client in a deployed container. Omission on revision keeps them. `null` or no `key` revokes this upstream's egress keys in both environments. | |
| credential_name | No | Required to declare: the key's stored name from `tzcloud_store_secret`. Without a valid name, a declaration is refused `invalid_request`. Omitted with `remove: true`. |