---
title: "Route a Frontend path to an HTTP Function"
method: POST
path: "/projects/{id}/frontends/{frontendId}/function-routes"
tags: ["Frontends"]
---

# Route a Frontend path to an HTTP Function

`POST /projects/{id}/frontends/{frontendId}/function-routes`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/projects/{id}/frontends/{frontendId}/function-routes`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

The Frontend and Function must belong to this Project. The Function must be a standard
Function with `visibility: public` and HTTP invocation mode, because requests through the
route carry no credential: Volcano does not check a token sent to a route path or add
`__volcano_auth`, so the Function authenticates its callers itself. A Function cannot leave `public`
while a route targets it. The route applies to every hostname that resolves to the
Frontend, including generated, custom-domain, preview, and local hostnames.

## Path parameters

- `id` string, uuid, required
- `frontendId` string, uuid, required

## Request body

- CreateFrontendFunctionRouteRequest
  - `function_id` string, uuid, required
  - `path_prefix` string, required
  - `strip_prefix` boolean

## Response `201`

Function route created

- FrontendFunctionRoute
  - `id` string, uuid, required
  - `project_id` string, uuid, required
  - `frontend_id` string, uuid, required
  - `function_id` string, uuid, required
  - `path_prefix` string, required
  - `strip_prefix` boolean, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `400`: Invalid path or non-HTTP Function
- `401`: Unauthorized
- `403`: Project not owned by the caller
- `404`: Frontend or Function not found in the Project
- `409`: Path is already routed, the Frontend has reached its 64-route limit, or the Function is not public
- `500`: Failed to create Function route

## Changes

- **2026-10-07** `23e7875e7c4c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/projects/:id/frontends/:frontendId/function-routes/post.md)

---

[API](https://skmtc.dev/kong/apis/volcano-api.md) - [All operations](https://skmtc.dev/kong/apis/volcano-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/volcano-api/revisions/84c4488f91e9?raw)
