Integrations

Webhook Payload Reference

This page documents the structure of webhook payloads sent by Diaform, including HTTP headers and JSON body schemas.

HTTP Headers#

Every webhook request includes the following headers:

HeaderValueDescription
Content-Typeapplication/jsonThe payload is JSON-encoded
X-Webhook-Eventconversation.completedThe event that triggered the webhook
X-Webhook-SignatureHMAC-SHA256 hex digestHMAC signature for verifying authenticity

conversation.completed Event#

Fired when an interview finishes and the AI-generated summary is ready.

Example Payload#

{
  "conversation_id": "uuid",
  "agent_id": "uuid",
  "organization_id": "uuid",
  "status": "completed",
  "summary": {
    "respondent_email": "respondent@example.com",
    "answers": [
      {
        "question_id": "question-1",
        "question_text": "How satisfied are you with our product?",
        "summary": "The respondent was very satisfied, especially with onboarding.",
        "sentiment": "positive",
        "confidence": "high",
        "quotes": ["The onboarding was really smooth"]
      }
    ],
    "overall_sentiment": "positive",
    "urgent_issues": [],
    "additional_insights": "The respondent mentioned interest in API access.",
    "keyword_tags": {
      "positive": ["onboarding", "ease of use"],
      "negative": []
    },
    "actions_called": [
      {
        "action_type": "send_slack_message",
        "ended_conversation": false,
        "description": "Sent Slack notification for a delighted fan trigger."
      }
    ]
  },
  "completed_at": "2026-02-09T12:00:00.000Z"
}

Field Reference#

FieldTypeDescription
conversation_idstringUnique ID of the conversation
agent_idstringThe project that conducted the interview
organization_idstringYour organization ID
statusstringAlways "completed" for this event
summaryobject or nullAI-generated interview summary
summary.respondent_emailstring or nullRespondent email extracted from user messages when available
summary.answersarrayPer-question structured answers
summary.answers[].question_idstringInternal question ID
summary.answers[].question_textstringThe question text
summary.answers[].summarystringAI-generated summary of the respondent's answer
summary.answers[].sentimentstringpositive, negative, neutral, or mixed
summary.answers[].confidencestringhigh, medium, or low
summary.answers[].quotesstring[] or nullDirect quotes from the respondent
summary.overall_sentimentstringOverall interview sentiment
summary.urgent_issuesstring[]Critical issues flagged by the AI
summary.additional_insightsstringExtra context not covered by questions
summary.keyword_tagsobjectCategorized keywords extracted from the interview
summary.keyword_tags.positivestring[]Positive themes
summary.keyword_tags.negativestring[]Negative themes
summary.actions_calledarrayAutomation or tool actions recorded during the interview
summary.actions_called[].action_typestringType of action
summary.actions_called[].ended_conversationbooleanWhether the action ended the interview
summary.actions_called[].descriptionstringHuman-readable action description
completed_atstringISO 8601 timestamp of when the interview completed

Sentiment Values#

  • positive: The response expresses satisfaction or positive feedback
  • negative: The response expresses dissatisfaction or negative feedback
  • neutral: The response is factual or neither positive nor negative
  • mixed: The response contains both positive and negative elements

Confidence Levels#

  • high: The respondent gave a clear, direct answer
  • medium: The answer was somewhat indirect or required interpretation
  • low: The answer was vague or the respondent did not fully address the question

Email Answers#

If you collect an email as an interview question, it appears in summary.answers like any other answer. Diaform also attempts to extract a valid respondent email into summary.respondent_email during post-processing.

Next Steps#

To verify that webhook requests are genuinely from Diaform, see Verifying Webhook Signatures.