> **Photon Beta documentation**
> Browse all pages: https://photon.codes/docs/beta/llms.txt
> Search Beta docs via MCP: https://photon.codes/docs/beta/mcp (OAuth REST API MCP: https://mcp.photon.codes/mcp)

# Reply to a webhook event

> Submit a synchronous response when a delivery expects one.

When `metadata.replyExpected` is true, your connection may emit `reply` with the public `event.id` and an acknowledgement callback. Your credential must have `project:write`.

```ts
socket.timeout(5_000).emit("reply", {
  eventId: event.id,
  status: 200,
  headers: { "content-type": "text/plain" },
  body: Buffer.from("accepted").toString("base64"),
}, (error, result) => {
  if (error) console.error("Reply outcome unknown");
  else if (!result.ok) console.error(result.error.code);
});
```

The acknowledgement confirms acceptance for forwarding. It does not confirm downstream processing. A timeout leaves the outcome uncertain; do not assume the reply was rejected.

Reply promptly. The expectation expires at the original request’s deadline and can be used only once. A replayed event may no longer expect a reply. Late, duplicate, and cross-connection replies are rejected without interrupting event delivery.

The body uses standard base64. Omitting `status`, or sending zero, leaves the normal response status unchanged. See the [event reference](/docs/beta/api-reference/websocket/frames.md) for the complete reply schema.
