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

# events.add

> Record something a customer did.

Events appear on the customer's timeline, and the assistant reads them when it decides what to do next.

```ts theme={null}
const [event, error] = await crm.events.add({
  partyId: contact.id,
  name: "project.created",
  properties: { plan: "pro", seats: 5 },
  idempotencyKey: `project.created:${project.id}`,
});
```

**partyId** `string` *required*

The CRM's id for the customer: the `id` that `contacts.upsert` returns, or what
[`contacts.resolve`](https://docs.revenuebee.ai/sdk/resolve-contact) finds from your own id.

**name** `string` *required*

What happened, in your own words. Keep names stable, such as `project.created`, so they can be filtered.

**properties** `object`

Anything worth knowing about it, as JSON.

**occurredAt** `string`

When it happened, ISO 8601. Now when omitted.

**idempotencyKey** `string`

Sending the same key twice records the event once, so retrying a failed call is safe.

## Returns

**event** `object`

**properties**

**id** `string`

**name** `string`

**occurredAt** `string`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.