> ## Documentation Index
> Fetch the complete documentation index at: https://plain-create-thread-thread-fields.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Reply to threads

You can reply to a thread using the `replyToThread` mutation. The call to this mutation will be successful if:

* the last message in the thread is an email from the customer OR
* the thread was just created with [`createThread`](/api-reference/graphql/threads/create)

If it is not possible to reply to this thread, you will get the mutation error code [`cannot_reply_to_thread`](/api-reference/graphql/error-codes#cannot_reply_to_thread) and a message indicating why.

<Tabs>
  <Tab title="Typescript SDK">
    Only one permission is needed:

    * `thread:reply`

    <Snippet file="typescript-sdk/reply-to-thread.mdx" />

    Where `res.data` is:

    <Snippet file="typescript-sdk/reply-to-thread-response.mdx" />
  </Tab>

  <Tab title="GraphQL">
    Only one permission is needed:

    * `thread:reply`

    <Snippet file="graphql/reply-to-thread.mdx" />
  </Tab>
</Tabs>
