---
title: "Send a message to a durable execution"
method: POST
path: "/projects/{id}/durable-functions/{functionId}/executions/{executionId}/messages"
tags: ["Durable Functions"]
---

# Send a message to a durable execution

`POST /projects/{id}/durable-functions/{functionId}/executions/{executionId}/messages`

## Request

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

Sends a named message to a running execution, as
`POST /durable-functions/{functionId}/executions/{executionId}/messages`
does for an application. The workflow receives it from
`ctx.waitForMessage` with the same name; until then it is kept, and
waits take messages oldest first.

Project access tokens can send messages, but read-only ones cannot.
A message never decides an approval.

## Path parameters

- `id` string, uuid, required
- `functionId` string, required
- `executionId` string, uuid, required

## Headers

- `Idempotency-Key` string

## Request body

- SendDurableMessageRequest
  - `name` string, required: The name a workflow waits on or publishes under: up to 237 printable ASCII characters.
  - `data` unknown

## Response `200`

A message with this `Idempotency-Key` was already sent; it is returned

- DurableMessage: A message sent to, or published by, a durable execution.
  - `id` string, uuid, required
  - `execution_id` string, uuid, required
  - `direction` 'in' | 'out', required: `in` is a message sent to the execution. `out` is one the execution published.
  - `seq` integer, required: Orders the execution's messages in both directions. It increases with every message but can skip numbers. Pass the last one you read as `after` to read what came next.
  - `name` string, required
  - `data` unknown, required
  - `sender` DurableMessageSender, required: Who sent the message.
    - `type` 'service_key' | 'user' | 'anon' | 'project' | 'execution', required: The credential the message was sent with. `project` is the project's owner or one of its access tokens, and `execution` is the execution itself publishing.
    - `user_id` string, nullable, required: The auth user who sent it. Null unless `type` is `user`.
  - `status` 'queued' | 'delivering' | 'delivered' | 'dropped' | 'published', required: An `in` message is `queued` until a wait for its name takes it, `delivering` while it is handed over, and `delivered` once the execution has it. It is `dropped` if the execution ended before any wait took it. Every `out` message is `published`.
  - `delivered_at` string, date-time, nullable, required: When the execution received the message. Null until then, and for `out` messages.
  - `sent_at` string, date-time, required

## Other responses

- `201`: Message sent. `status` is `delivered`, `delivering`, or `queued`, as on the application route.
- `400`: The name, data or idempotency key is invalid
- `403`: The request used a `read_only` project access token
- `404`: Durable function or execution not found
- `409`: The message cannot be sent. `code` is `execution_not_running` or `too_many_queued_messages`.
- `413`: The request body is larger than 72 KiB
- `429`: Too many messages sent to this execution

## Changes

- **2026-10-23** `5113707385cc`: 1 breaking
  - added the pattern `^[ -~]+$` to the `header` request parameter `Idempotency-Key`
- **2026-10-16** `7fec2090c1f4`: 1 info
  - endpoint added

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