---
title: "Proxy a request with a secret"
method: POST
path: "/secret/{secretId}/proxy"
tags: ["Secret"]
---

# Proxy a request with a secret

`POST /secret/{secretId}/proxy`

## Request

- Base URL: `https://api.chatbotkit.com/api/v1`
- URL: `https://api.chatbotkit.com/api/v1/secret/{secretId}/proxy`
- Auth: HTTP bearer

Performs an outbound HTTP request with the secret injected into the
request headers at egress. The secret value never leaves the server.
Reference the secret in any header value using `${SECRET_DEFAULT}`; if
no header references the secret, it is injected into `Authorization`.
The upstream response is returned verbatim.

## Path parameters

- `secretId` string, required: The ID of the secret to inject

## Request body

- object
  - `method` string: The HTTP method
  - `url` string, required: The destination URL
  - `headers` object: The request headers (may reference the secret)
  - `body` string: The request body

## Response `200`

The upstream response, returned verbatim

## Other responses

- `default`: An error response

---

[API](https://skmtc.dev/chatbotkit/apis/cbk-api.md) · [All operations](https://skmtc.dev/chatbotkit/apis/cbk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chatbotkit/apis/cbk-api/revisions/13d250576136?raw)
