---
title: "Create an API proxy"
method: POST
path: "/v1/workspaces/{workspace_id}/api-proxy"
tags: ["API proxies"]
---

# Create an API proxy

`POST /v1/workspaces/{workspace_id}/api-proxy`

## Request

- Base URL: `https://api.stacksync.com`
- URL: `https://api.stacksync.com/v1/workspaces/{workspace_id}/api-proxy`
- Auth: HTTP bearer

A proxy on an existing connection; its app is the connection's. The token is in this answer only. Send an Idempotency-Key to retry safely.

## Path parameters

- `workspace_id` integer, required

## Query parameters

- `region` 'besg' | 'usnv', required

## Headers

- `Idempotency-Key` string, nullable: Makes the create retry-safe for 24 hours: a retry with the same key answers the resource the first call created, with the Idempotent-Replayed: true header, and creates nothing. 1 to 255 visible ASCII characters. The same key with a different request answers 422; while the first call still runs, 409.

## Request body

- CreateApiProxyBody
  - `connection_id` string, uuid4, required: The connection the proxy calls the app with; its app is the proxy's app
  - `api_proxy_name` string, nullable: 3 to 63 characters: a letter first, then letters, digits, spaces, _ and -; unique among the API proxies of the workspace in the region; generated when absent
  - `is_shared_with_workspace` boolean
  - `api_proxy_resource_id` string, nullable
  - `parent_folder_id` string, nullable: The folder to create the proxy in, the root when absent
  - `validate_only` boolean: Run every check of the write and answer 204 without writing: a refused write answers the error the write would

## Response `200`

OK

- CreatedApiProxy
  - `connection_id` string, nullable, required
  - `api_proxy_id` string, required
  - `api_proxy_name` string, required
  - `api_proxy_resource_id` string, nullable, required: Answered by GET /api-proxy/<api_proxy_id>; null in the list, whose core does not select it
  - `app_type` string, required
  - `connection_name` string, nullable, required
  - `is_shared_with_workspace` boolean, required: Every workspace member may use the proxy, not only its creator
  - `max_objects_per_request` integer, nullable, required: The workspace plan's limit of objects per proxied request; null in the list
  - `parent_folder_id` string, nullable, required: The folder of the proxy; null at the root, and in the list
  - `created_by` integer, required
  - `created_time` string, required: HTTP date (RFC 9110), UTC
  - `last_modified_by` integer, required
  - `last_modified_time` string, required: HTTP date (RFC 9110), UTC
  - `region` 'besg' | 'usnv', required
  - `api_proxy_token` string, nullable, required

## Other responses

- `204`: No Content
- `400`: Bad Request
- `403`: Forbidden
- `409`: Conflict
- `422`: Unprocessable Content

---

[API](https://skmtc.dev/stacksync/apis/stacksync-api.md) - [All operations](https://skmtc.dev/stacksync/apis/stacksync-api/llms.txt) - [OpenAPI document](https://skmtc.dev/stacksync/apis/stacksync-api/revisions/21f4ba4b214e?raw)
