Skip to main content
inputCreateDiscussionInput

Fields

sidekickModelOption

Model option for Plain Sidekick, fixed for the life of the session. Defaults to MEDIUM. Rejected when the model picker is not enabled for the workspace.

threadId
ID
markdownContent
String!
required
attachmentIds
[ID!]

Customer-scoped attachments. Used by EMAIL / SLACK / CURSOR discussions. Sidekick Agent AGENT_SESSION discussions use workspaceFileIds instead.

workspaceFileIds
[ID!]

Workspace-scoped files. Used by Sidekick Agent AGENT_SESSION discussions, which are not customer-scoped. Other discussion types ignore this field.

type
sourceEntityId
ID

The entity ID where this discussion was started (e.g. a company or customer ID). Used to provide context to agent sessions started outside of a thread.

The entity type for sourceEntityId. Required when sourceEntityId is provided.

agentMachineUserId
ID

Which agent to ask on an AGENT_SESSION discussion. Omit for Plain's Sidekick Agent. Must reference a machine user marked as a custom agent; Plain starts nothing for one, so the agent is expected to reply over the API.

The page path where this discussion was started (e.g. '/insights', '/settings'). Used to provide context when the user is on a page without a specific entity. Also carries the reporting page link for a CHART source.

sourcePageAnchor
String

The page-fragment anchor (no '#') identifying the element the discussion was started from, e.g. a specific reporting chart. Kept separate from sourcePageLink, which is matched exactly as a page-scope key and must stay hash-free. Only meaningful for PAGE and CHART sources.

The kind of source. Pass CHART (with sourcePageLink) to start a discussion from a reporting chart. THREAD/PAGE/ENTITY are otherwise inferred from threadId / sourcePageLink / sourceEntityId.

additionalContext
String

Free-form context from the UI (e.g. active filters on the current page) injected into the agent's prompt, so it knows what data the user is currently looking at.

Ignored when agentMachineUserId is set. Plain builds the prompt only for its own Sidekick Agent; an agent the workspace built receives the message over the discussion webhook, which does not carry this field. Passing it is accepted but has no effect.