> ## Documentation Index
> Fetch the complete documentation index at: https://www.plain.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a customer event

<Snippet file="graphql/sdk-note.mdx" />

<Info>
  A customer event will be created in all threads that belong to the provided customer ID. If you
  want an event to appear in a specific thread use a [thread
  event](/graphql/events/create-thread-event).
</Info>

To create an event you need a customer ID.

You can get this by [upserting a customer](/graphql/customers/upsert) in Plain, from data in webhooks or other API calls you made. If you want to test this, press **⌘ + K** on any thread and then "Copy customer ID" to get an ID you can experiment with.

In this example we'll be creating the following event:

<Frame>
  <img src="https://mintcdn.com/plain/EjhjILX5S36Y2AF-/public/images/events-api-key-example.png?fit=max&auto=format&n=EjhjILX5S36Y2AF-&q=85&s=f168c4372479e924f08c9a04f23e8150" alt="Example event" width="1972" height="634" data-path="public/images/events-api-key-example.png" />
</Frame>

For this you'll need an API key with the following permissions:

* `customerEvent:create`

<Snippet file="graphql/create-customer-event.mdx" />
