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",
  "respondent": {
    "email": "respondent@example.com",
    "metadata": {},
    "identities": [
      {
        "type": "identifier",
        "value": "customer-123",
        "source": "owner"
      },
      {
        "type": "email",
        "value": "respondent@example.com",
        "source": "ai"
      }
    ],
    "invite_id": null
  },
  "summary": {
    "respondent_email": null,
    "respondent_identities": [
      {
        "type": "email",
        "value": "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
respondentobjectRespondent identity and metadata attached to the conversation
respondent.emailstring or nullBest available respondent email, preferring the legacy respondent email value and then an email identity
respondent.metadataobjectConversation metadata
respondent.identitiesarrayVisible respondent identities from invites, embeds, system collection, or AI extraction
respondent.identities[].typestringIdentity type, such as email, name, identifier, user_id, or account_id
respondent.identities[].valuestringIdentity value
respondent.identities[].sourcestringowner, system, or ai
respondent.invite_idstring or nullInvite ID when the conversation came from a targeted respondent link
summaryobject or nullAI-generated interview summary
summary.respondent_emailstring or nullLegacy compatibility field. New AI-extracted emails are returned in summary.respondent_identities and respondent.identities.
summary.respondent_identitiesarray or nullIdentities extracted from respondent messages during post-processing
summary.respondent_identities[].typestringIdentity type, such as email, name, identifier, uuid, user_id, or account_id
summary.respondent_identities[].valuestringExtracted identity value
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 respondent identities during post-processing. New webhook consumers should read extracted emails from respondent.identities or summary.respondent_identities, not from summary.respondent_email.

Next Steps#

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