All docs
Webhooks
Webhooks send events to your own endpoint as conversations happen, so you can update other systems, alert your team or fill your warehouse.
Events
conversation.startedandconversation.endedmessage.createdfor customer and agent messageshandoff.createdwhen a person is asked to step inconversation.resolvedwith the outcome and its trace linkaction.failedwhen an action returns an error
Payload
json
{
"type": "conversation.resolved",
"project": "prj_returns",
"conversation": "conv_8f21",
"channel": "whatsapp",
"outcome": "resolved",
"trace_url": "https://app.parley.ai/t/conv_8f21"
}Verifying signatures
Each request carries a Parley-Signature header: an HMAC SHA-256 of the raw body using your endpoint secret. Reject requests whose signature doesn't match.
javascript
import crypto from "node:crypto";
export function verify(body, header, secret) {
const mac = crypto.createHmac("sha256", secret).update(body).digest("hex");
return crypto.timingSafeEqual(Buffer.from(mac), Buffer.from(header));
}Retries
Parley retries failed deliveries with backoff for up to 24 hours. Respond with a 2xx within 10 seconds; do slow work after you reply.
Something unclear?Contact supportor browse thehelp centerAll guides