How to connect your own agent backend to a Layercode pipeline.
layercode-signature
header, which contains a timestamp and a HMAC-SHA256 signature of the request body.
Here’s how you can verify the signature in your backend:
layercode-signature
header from the request. It will be in the format: t=timestamp,v1=signature
..
), and the exact raw webhook request body: signed_payload = timestamp + "." + request_body
.v1
value from the layercode-signature
header. If they match, the request is valid.type
, content
(when required) and turn_id
. See the Webhook SSE API documentation for details.
Below is a simple example where we respond with a static text SSE event, which will be converted to speech and spoken to the user:
Looking for another stack? Any backend that can handle HTTP POST and respond with SSE will work with Layercode. See the Webhook SSE API documentation for details.