Mava Docs
  • 👋Introducing Mava
    • Book a demo
    • What is Mava?
  • 🟢Getting Started
    • Create a free account
    • Integration Setup
      • Web Chat Setup
        • Automatically capture custom user data (SDK)
        • Automatically open the web chat on page load
        • Create custom launch event
        • Hide web chat icon
        • Delay script load
        • Customize the position & Size of the Web chat
      • Discord Setup
        • Discord Ticket Setup
        • Discord Public Channel AI Setup
        • Changing the Discord Bot Name
        • Automatically add users or all users with a role into a Discord private thread
        • Responding to tickets within Discord
        • Discord Thread Limits & Archiving
      • Telegram Setup
        • Telegram Group Ticketing
      • Email Setup
        • Email Forwarding
        • Custom Email Domains
    • Inviting Team Members
      • Transferring account ownership
      • Existing Wallet User - How To Verify Your Email
    • Linking your Discord Profile to Mava
    • Chatbot Builder
    • Attributes
  • 🔄Ticket Automations
  • 🤖AI Support
    • AI Training
    • Private Support Ticket AI
    • Public Discord Channel AI
    • Public Telegram Group AI
    • Public Slack AI Channel
  • 🔗Webhooks & API
    • 🪝Webhooks
      • 📋Schemas
      • 🔐 Webhook Security Guide
      • 📩Deliverability
    • 💻API
    • No-Code Integrations
  • 📥The Support Inbox
    • Inbox Keyboard Shortcuts
    • Ticket Status
    • How to create a custom inbox view
    • How to copy a user's Telegram/Discord ID or email address
    • Tags
    • Changing your team's workspace name
  • 🎟️Ticket Behavior & Settings
    • How to open a ticket in Discord
    • Spam & Ticket limits
    • Auto-Resolve Tickets
    • Re-opening Resolved Tickets
    • Discord Threads & Limits
    • Discord Ticket Transcripts
  • 🔔Notifications
    • Personal Notifications
    • Team Notifications
  • 💲Price Plans
    • Pricing FAQs
  • 💸Affiliate Program
  • 📱Using Mava on Mobile
  • 🔐Data Protection & Security
  • ✅Going Live Checklist
  • ⚠️Workspace Account Deletion
Powered by GitBook
On this page

Was this helpful?

  1. Webhooks & API
  2. Webhooks

Schemas

Layout of received data

PreviousWebhooksNext🔐 Webhook Security Guide

Last updated 1 year ago

Was this helpful?

{
  signature: 'mava_wh_3h32i2dkd2d90d2jdk2jd2k29hds' // string
  payload: 'encrypted_payload' // string
  key: 'encrypted_key',
  webhookId: '321312-2312d-2ed121' // string
}

You will receive post requests from Mava in the above format. Signature will be used along with Signing Key to verify the authenticity of your payload. The Webhook ID must be used to ensure you have not previously received this webhook. See for more information.

Once unencrypted you're payload will look like something like this - depending on the data events you've subscribed to and are receiving.

{
  signature: 'mava_wh_3h32i2dkd2d90d2jdk2jd2k29hds' // string
  payload: {
    type: 'ticket.created' // string
    document: {...} //  Ticket
  },
  webhookId: '321312-2312d-2ed121' // string
}

Ticket Schema

interface Ticket {
  tags: {},
  customer: Customer,
  assignedTo: {
    name: string;
    email: string;
  } | undefined,
  status: string;
  priority: string;
  category: {
    name: string;
    isArchived: boolean;
  },
  sourceType: string;
  aiStatus: string;
  userRating: Types.ObjectId;
  isUserRatingRequested: boolean;
  firstCustomerMessageCreatedAt?: Date;
  firstAgentMessageCreatedAt?: Date;
  attributes: { attribute: Attribute; content: string }[];
}

Message schema


interface Message {
  messageType: string;
  senderReferenceType: 'ClientMember' | 'Customer' | 'DiscordUser';
  sender: {
    name: string,
    email: string,
  },
  fromCustomer: boolean;
  content: string;
  ticket: Ticket;
  attachments: {
    url:string,
    fileName:string,
    type:string,  
  }[],
}

Customer schema

interface Customer {
  walletAddress: string;
  name: string;
  email: string;
  attributes: { attribute: Attribute; content: string }[];
  discordAuthorId: string;
  telegramAuthorId: string;
  discordRoles: string[];
}

Attribute schema


interface IAttribute {
  _id: string;
  name: string;
  type: string;
  affiliationType: string;
  isArchived: boolean;
}
🔗
🪝
📋
Deliverability