---
title: "Start a durable execution from an application"
method: POST
path: "/durable-functions/{functionId}/executions"
tags: ["Durable Functions"]
---

# Start a durable execution from an application

`POST /durable-functions/{functionId}/executions`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/durable-functions/{functionId}/executions`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Starts an execution of a durable function using an application
credential, and returns its handle.

This is the durable counterpart of `POST /functions/{functionId}/invoke`,
and it is the endpoint an application calls. Like that one, it is not
project-scoped: an anon key, a service key and an auth user token each
carry their own project. The project-scoped collection under
`/projects/{id}/durable-functions/...` remains the owner's management
surface.

**With a service key:** any durable function in the project.

**With an auth user token:** a durable function whose `visibility` is
`authenticated` or `public`.

**With an anon key:** requires the `functions.invoke` permission, and
the function must have `visibility: public`.

A `private` durable function answers every credential but a service key
exactly as a missing one, with 404.

The start returns a `client_token`. An anon key, or a user who did not
start the execution, sends it as `X-Volcano-Client-Token` to read the
execution, stop it, and reach its messages. A service key scoped to a
list without `*` sends it to read and stop the execution. An anon key is shared by
everyone who loads the page, so the id alone never reaches an
execution. Listing executions takes the project owner's token or a
project access token.

Send `X-Volcano-Execution-Name` to make the start idempotent: repeating
a start with the same name returns the existing execution instead of
beginning a second one.

Each execution counts once against the project's durable execution
allowance, however many times the start is retried under the same
execution name, and the number in flight at once is capped by the plan.
The operations the execution performs are counted against the durable
operations allowance when it finishes.

## Path parameters

- `functionId` string, required

## Headers

- `X-Volcano-Execution-Name` string

## Request body

- unknown

## Response `202`

Execution accepted and started

- DurableExecution
  - `id` string, uuid, required
  - `function_id` string, uuid, required
  - `name` string, required: Idempotency key for the execution. Supplied by the client through `X-Volcano-Execution-Name`, otherwise generated.
  - `status` 'pending' | 'running' | 'succeeded' | 'failed' | 'timed_out' | 'stopped' | 'unknown', required: Lifecycle state of an execution. `pending` covers the window between the platform reserving the execution name and the function accepting the start, and has no counterpart once the execution is under way. `succeeded`, `failed`, `timed_out`, `stopped` and `unknown` are terminal. `unknown` means the execution's outcome cannot be established, so no result or error can be given for it. Either it was under way and was never seen to finish, or its start failed with a `500` without the platform establishing whether the execution began — which is why a name whose start returned an error can later read as `unknown` rather than not being found. It is terminal because nothing can settle it later, and it is rare — treat it as an outcome to retry rather than a state to wait on. A retry under the same name picks this execution back up instead of starting a second one, and needs a free concurrency slot because an `unknown` execution has given its own up. `completed_at` on an `unknown` execution is when the platform gave up, not when the work ended.
  - `region` string, required: Region the execution runs in. An execution is pinned to one region for its whole life because its checkpoints live there.
  - `result` unknown
  - `result_expired` boolean: `true` when the execution is terminal but its result is no longer retained, which distinguishes a discarded result from an empty one. Shortly after that the execution itself is dropped and reads answer `404`. A result that was checkpointed rather than returned leaves this unset, so it reads like a function that returned nothing.
  - `error` DurableExecutionError: Why a failed or timed-out execution ended.
    - `type` string
    - `message` string
  - `created_at` string, date-time, required
  - `completed_at` string, date-time: Present once the execution has reached a terminal status.
  - `client_token` string: Lets a browser read the execution, stop it, and read and send its messages, and a service key scoped to a list without `*` read and stop it. Returned only by the start whose input the execution runs, never by a repeat under the same name or by a read. Send it as `X-Volcano-Client-Token`.

## Other responses

- `400`: Payload is not valid JSON, or the execution name is invalid
- `401`: Missing or invalid credential. Also returned for a platform user token, which is not an application credential; project owners start executions through the project-scoped collection.
- `403`: The anon key lacks `functions.invoke` or the function is `authenticated`, or the request's origin is refused by the project's CORS policy.
- `404`: Durable function not found. Also returned for a standard function's id, for a durable function in another project, and for a `private` one to any credential but a service key, so the response cannot be used to tell those apart.
- `409`: Function is not deployed yet, or has no deployed region. Also returned when two starts under the same execution name raced and both released it, which is retryable as it stands, and with `code` `execution_name_held` when an unfinished start this caller may not resume holds the execution name, which needs a name of its own.
- `413`: Payload is larger than 256 KiB
- `429`: The project has too many executions in flight for its plan, the function invocation rate limit was exceeded, the project is over its bandwidth cap, or the account is out of one of its billing-cycle durable allowances: executions, operations, or compute. Operations and compute are counted once an execution finishes, so a refusal on either never interrupts an execution already running — it declines the next start.
- `503`: Durable execution is not available in this environment, or the plan terms for the start could not be read. The first means the capability is paused or this deployment cannot serve it, so it is not one to retry in a loop; the second is transient.

## Changes

- **2026-10-16** `7fec2090c1f4`: 1 info
  - added the optional property `client_token` to the response with the `202` status
- **2026-09-19** `3a6f365f3f35`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/durable-functions/:functionId/executions/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)
