> For the complete documentation index, see [llms.txt](https://mava.gitbook.io/mava-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mava.gitbook.io/mava-docs/webhooks-and-api/webhooks/schemas.md).

# Schemas

```
{
  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](broken://pages/NFSVUWmjNqVcofeHHn5A) to verify the authenticity of your payload. The Webhook ID must be used to ensure you have not previously received this webhook. See [Deliverability](/mava-docs/webhooks-and-api/webhooks/deliverability.md) for more information.

Once [unencrypted](broken://pages/NFSVUWmjNqVcofeHHn5A) you're payload will look like something like this - depending on the data events you've subscribed to and are receiving.<br>

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

\
**Ticket Schema**

<pre class="language-typescript"><code class="lang-typescript">interface Ticket {
  tags: {},
  customer: Customer,
  assignedTo: {
    name: string;
    email: string;
<strong>  } | undefined,
</strong>  status: string;
  priority: string;
  category: {
    name: string;
    isArchived: boolean;
<strong>  },
</strong>  sourceType: string;
  aiStatus: string;
  userRating: Types.ObjectId;
  isUserRatingRequested: boolean;
  firstCustomerMessageCreatedAt?: Date;
  firstAgentMessageCreatedAt?: Date;
  attributes: { attribute: Attribute; content: string }[];
}
</code></pre>

\
**Message schema**

```typescript

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**

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


```

**Attribute schema**

```typescript

interface IAttribute {
  _id: string;
  name: string;
  type: string;
  affiliationType: string;
  isArchived: boolean;
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mava.gitbook.io/mava-docs/webhooks-and-api/webhooks/schemas.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
