> ## Documentation Index
> Fetch the complete documentation index at: https://plain-docs-orca-916-agent-docs-restructure.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Discussion created

> Fired when a discussion is started on a thread.

This event is fired when a [discussion](/graphql/discussions) is started, on a thread or on its own.

Read `discussion.type` before acting. `AGENT_SESSION` is a Sidekick conversation, which is the only type a [custom agent](/agents/internal-agent) answers; `SLACK` and `EMAIL` discussions are conversations with people. Read `discussion.agent` to see which machine user the conversation was opened against. It is `null` on a discussion Plain's own Sidekick runs.

## Schema

[**View JSON Schema →**](https://core-api.uk.plain.com/webhooks/schema/latest.json)

Example:

<Snippet file="webhooks/discussion-created.mdx" />

<Snippet file="webhooks/sdk-usage.mdx" />
