> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.polytomic.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidocs.polytomic.com/_mcp/server.

# Get Connection Proxy Info

GET https://app.polytomic.com/api/connections/{id}/proxy/info

Returns the proxy contract for a connection.

Use this endpoint before calling
[`POST /api/connections/{id}/proxy`](../../../../../api-reference/connections/execute-proxy)
when you need to build requests programmatically. The response shows:

* the inherited base URL that all proxied requests are sent to
* locked headers and query parameters that are attached automatically
* blocked request and response headers
* allowed HTTP methods and body shapes
* timeout, rate-limit, and payload-size limits

Some connections reach more than one upstream API, each with its own base URL
and quota. For these, the response includes `apis`: one entry per API with its
`name`, `description`, whether it is the `default`, and its own
`inheritedBase`. The top-level `inheritedBase` describes the default API.
Connections with a single API omit `apis`.

Sensitive inherited header and query values are redacted in the response. The
contract is still useful for discovering which keys are fixed by the
connection, even though their raw values are not exposed.

Reference: https://apidocs.polytomic.com/api-reference/connections/proxy/get-proxy-info

## Authentication

- `Authorization` header (bearer token, required) — Bearer user API key
- `Authorization` header (basic auth, required) — Basic organization-scoped API key

## Request

### Path parameters

- `id` (string, required) — Unique identifier of the connection whose proxy contract should be returned.

## Response

### 200

OK

- `data` (ConnectionProxyInfoResponse, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `key` (string, optional)
- `message` (string, optional)
- `metadata` (map from string to any, optional)
- `status` (integer, optional)

### 401 Unauthorized Error

Unauthorized

- `key` (string, optional)
- `message` (string, optional)
- `metadata` (map from string to any, optional)
- `status` (integer, optional)

### 403 Forbidden Error

Forbidden

- `key` (string, optional)
- `message` (string, optional)
- `metadata` (map from string to any, optional)
- `status` (integer, optional)

### 404 Not Found Error

Not Found

- `key` (string, optional)
- `message` (string, optional)
- `metadata` (map from string to any, optional)
- `status` (integer, optional)

### 500 Internal Server Error

Internal Server Error

- `key` (string, optional)
- `message` (string, optional)
- `metadata` (map from string to any, optional)
- `status` (integer, optional)

## Types

### ConnectionProxyInfoResponse

- `apis` (list of ConnectionProxyAPI, optional) — Upstream APIs this connection exposes through the proxy, when there is more than one. Select one by passing its name as request.api; requests without request.api use the default.
- `backendType` (string, optional) — Connection backend identifier (e.g. hubspot, salesforce).
- `connectionId` (string, optional) — Unique identifier of the connection the proxy contract applies to.
- `inheritedBase` (ConnectionProxyInheritedBase, optional)
- `mergeRules` (ConnectionProxyMergeRules, optional)
- `requestContract` (ConnectionProxyContract, optional)
- `stats` (ConnectionProxyStats, optional)

### ConnectionProxyAPI

- `default` (boolean, optional) — True for the API used when request.api is omitted.
- `description` (string, optional) — What this API is for.
- `inheritedBase` (ConnectionProxyInheritedBase, optional)
- `name` (string, optional) — Identifier to pass as request.api to call this API.

### ConnectionProxyInheritedBase

- `baseUrl` (string, optional) — Base URL all proxied requests are sent to. Caller-supplied paths are appended to this URL.
- `lockedHeaders` (list of ConnectionProxyLockedHeader, optional, nullable) — Headers that are always attached to proxied requests. Sensitive values are redacted.
- `lockedQuery` (map from string to any, optional, nullable) — Query parameters that are always attached to proxied requests. Values are redacted.

### ConnectionProxyMergeRules

- `headers` (string, optional) — How caller-supplied headers are merged with the connection's inherited headers.
- `query` (string, optional) — How caller-supplied query parameters are merged with the connection's inherited query parameters.

### ConnectionProxyContract

- `allowedMethods` (list of string, optional, nullable) — HTTP methods the proxy accepts.
- `blockedRequestHeaders` (list of string, optional, nullable) — Headers the proxy strips from caller-supplied requests before forwarding.
- `blockedResponseHeaders` (list of string, optional, nullable) — Headers the proxy strips from upstream responses before returning them.
- `bodyTypes` (list of string, optional, nullable) — Supported JSON types for request.body (e.g. object, string, null).
- `maxRequestBodyBytes` (integer, optional) — Maximum accepted request body size in bytes.
- `maxResponseBodyBytes` (integer, optional) — Maximum response body size in bytes. Larger responses are truncated.
- `pathRule` (string, optional) — Rule the caller-supplied path must satisfy.
- `queryModes` (list of string, optional, nullable) — Supported request query inputs. Use query for structured URL-encoded parameters or rawQuery for exact passthrough.
- `queryValueTypes` (list of string, optional, nullable) — Supported value types for request.query.
- `rateLimitPerMinute` (integer, optional) — Maximum proxied requests per minute per connection before the proxy returns 429.
- `rawQueryRule` (string, optional) — How request.rawQuery is appended and who is responsible for encoding.
- `timeoutMs` (integer, optional) — Per-request timeout in milliseconds.

### ConnectionProxyStats

- `callsLast24h` (integer, optional) — Total backend API calls made through this connection (including non-proxy calls) over the last 24 hours.
- `lastProxyCallAt` (datetime, optional, nullable) — Timestamp of the most recent proxy call, or null if none have occurred.
- `proxy2xxLast24h` (integer, optional) — Proxy calls that returned a 2xx status in the last 24 hours.
- `proxy4xxLast24h` (integer, optional) — Proxy calls that returned a 4xx status in the last 24 hours.
- `proxy5xxLast24h` (integer, optional) — Proxy calls that returned a 5xx status in the last 24 hours.
- `proxyCallsLast24h` (integer, optional) — Proxy calls made in the last 24 hours.

### ConnectionProxyLockedHeader

- `name` (string, optional) — Header name.
- `redacted` (boolean, optional) — True when the header value was redacted before returning it.
- `value` (string, optional) — Header value. Replaced with [REDACTED] if the header is sensitive.

## Examples

**Response**

```json
{
  "data": {
    "apis": [
      {
        "default": true,
        "description": "string",
        "inheritedBase": {
          "baseUrl": "string",
          "lockedHeaders": [
            {
              "name": "string",
              "redacted": true,
              "value": "string"
            }
          ],
          "lockedQuery": {}
        },
        "name": "reports"
      }
    ],
    "backendType": "string",
    "connectionId": "248df4b7-aa70-47b8-a036-33ac447e668d",
    "inheritedBase": {
      "baseUrl": "string",
      "lockedHeaders": [
        {
          "name": "string",
          "redacted": true,
          "value": "string"
        }
      ],
      "lockedQuery": {}
    },
    "mergeRules": {
      "headers": "string",
      "query": "string"
    },
    "requestContract": {
      "allowedMethods": [
        "string"
      ],
      "blockedRequestHeaders": [
        "string"
      ],
      "blockedResponseHeaders": [
        "string"
      ],
      "bodyTypes": [
        "string"
      ],
      "maxRequestBodyBytes": 1,
      "maxResponseBodyBytes": 1,
      "pathRule": "string",
      "queryModes": [
        "string"
      ],
      "queryValueTypes": [
        "string"
      ],
      "rateLimitPerMinute": 1,
      "rawQueryRule": "string",
      "timeoutMs": 1
    },
    "stats": {
      "callsLast24h": 1,
      "lastProxyCallAt": "2024-01-15T09:30:00Z",
      "proxy2xxLast24h": 1,
      "proxy4xxLast24h": 1,
      "proxy5xxLast24h": 1,
      "proxyCallsLast24h": 1
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/proxy/info"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/proxy/info';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/proxy/info"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/proxy/info")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/proxy/info")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/proxy/info', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/proxy/info");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/proxy/info")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```