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

# Activities overview

> Send events from your own systems to Windmill, control who can see them, and read them back.

Use the Activities API to send Windmill the events your other systems record, such as a scored sales call, a resolved escalation, or a completed certification. Each event is an **activity**: something that happened at a point in time, about zero, one, or many employees.

Windy can find activities and cite them as evidence, for example in Deep Research and in drafts for performance reviews. Windy only uses an activity for people who can see it.

## How activities are organized

* An **activity type** names a kind of event, such as `call-score`. Its `description` tells Windy what the event is and how to read its properties, so write it for a reader who has never seen your system. For example: "A scored sales call. properties.score is 0 to 100."
* An **activity** is one event of a type. It has a `title`, an `occurredAt` time, optional `body` text, a `url` back to your system, `properties`, `tags`, and the employees it's about.

You identify both with your own keys. A type's key is its `externalId`. An activity's key is its `type` plus its own `externalId`, so `call-8842` only needs to be unique within `call-score`.

## Before you start

Creating activities and writing activity types requires the **Manage activities** permission (`activities.manage`). Admins and HR Admins have it by default, and you can add it to a custom role. Use a **Read/write** [API key](https://help.gowindmill.com/api-reference/authentication.md) created by a member with that permission.

Reading activities only needs a key that can see them. See [Control who can see an activity](#control-who-can-see-an-activity).

## Send your first activity

One [Create or replace activities](https://help.gowindmill.com/api-reference/activities/create-or-replace-activities.md) request can define a type and send its activities. This example uses the environment variables from the [API overview](https://help.gowindmill.com/api-reference/overview.md#make-your-first-request):

```bash theme={null}
curl --fail-with-body --silent --show-error \
  --request PUT \
  --url "$WINDMILL_API_BASE/c/$WINDMILL_COMPANY_ID/activities" \
  --header "Authorization: Bearer $WINDMILL_API_KEY" \
  --header 'Content-Type: application/json' \
  --data @- <<'JSON'
{
  "activityTypes": [
    {
      "externalId": "call-score",
      "name": "Call score",
      "description": "A scored sales call. properties.score is 0 to 100."
    }
  ],
  "activities": [
    {
      "type": "call-score",
      "externalId": "call-8842",
      "employees": [{ "email": "jane@acme.example" }],
      "title": "Discovery call with Northwind scored 82/100",
      "occurredAt": "2026-10-20T15:30:00Z",
      "url": "https://calls.example/call?id=8842",
      "properties": { "score": 82, "callType": "Discovery", "account.name": "Northwind" },
      "tags": ["q4-push"]
    }
  ]
}
JSON
```

The response returns Windmill's `id` for each activity, in request order:

```json theme={null}
{
  "results": [
    { "type": "call-score", "externalId": "call-8842", "id": "019a2f7c-8842-7e3f-9a4b-5c6d7e8f9a0b" }
  ]
}
```

You only need `activityTypes` the first time you send a type, or when you change its name or description. You can also manage types on their own with [Create or update an activity type](https://help.gowindmill.com/api-reference/activities/create-or-update-an-activity-type.md).

## Resend activities safely

### Each write replaces the whole activity

Sending the same `type` and `externalId` again replaces the activity. It doesn't merge with what's stored. An omitted field goes back to its default, so:

* A resend without `tags` clears the tags.
* A resend without `access` resets access to `EMPLOYEE_AND_MANAGERS`.

Always send the complete activity. Because a resend writes the same result, repeating a request is safe, so you can retry after a timeout or rerun a sync.

### A request succeeds or fails as a whole

Send 1 to 1,000 activities per request. If any item fails, nothing is written. `error.details` lists every failing item with its path in the request and a message. For example, when the second activity names an email that no employee has, `error.details` is:

```json theme={null}
[
  {
    "path": ["activities", 1, "employees", 0],
    "message": "No employee has the email omar@acme.example."
  }
]
```

* **400:** validation errors, unknown types, employees, groups, or integrations, and emails that match more than one employee.
* **403:** a write your key isn't allowed to make. When both kinds occur, the status is `400` and `details` lists both.
* **409:** your own employee record changed while the request was written, for example in an employee merge. Nothing was written. Send the request again.

See [Errors](https://help.gowindmill.com/api-reference/errors.md) for the full envelope.

## Describe an activity

### Employees

Name each employee by `employeeId` or by `email`, not both. An email can be any of the employee's addresses. It matches the one active employee who has it, or if no active employee does, the one archived employee who has it.

You can name archived employees. An activity can also have no employees at all, when it's context rather than something about a person.

### Properties

`properties` is a flat object of structured details that you can filter on later. Each value is a string, number, boolean, or `null`, or an array of those. Nested objects and arrays inside arrays aren't allowed.

To group related details, put a `.` in the key, such as `account.name`. The whole key is one name.

### Tags

Tags are labels such as `q4-push`. They match exactly and case-sensitively, so `Q4` and `q4` are different tags.

### Limits

* An `externalId`, a `type`, and a tag can each be up to 512 characters.
* `occurredAt` must be an RFC 3339 date-time with `Z` or a `±HH:MM` offset.
* A field the request doesn't define fails validation, except the keys you choose inside `properties`.

## Control who can see an activity

Each activity's `access` sets who can read it. Use a preset for the common cases:

| Preset | Who can read the activity |
| - | - |
| `EMPLOYEE_AND_MANAGERS` (default) | Each employee on the activity and everyone above them in the reporting line |
| `MANAGERS` | Everyone above each employee on the activity in the reporting line |
| `EMPLOYEE` | Each employee on the activity |
| `ADMINS` | Members with the **View admin activities** permission (`activities.view_admin`) |
| `PUBLIC` | Everyone in the company |

Access follows the org chart as it changes. A new manager can read an activity right away, and a former manager loses access, without any resend.

### Keep an activity from its employees

By default, the employees on an activity can always read it, whatever `access` says. Set `shareWithEmployees` to `false` to remove that grant. For example, `"access": "MANAGERS"` with `"shareWithEmployees": false` shares a call score with an employee's managers but not with the employee.

### Grant access to specific people or groups

Instead of a preset, `access` can be an object that grants `read` or `write` access to employees, groups, reporting subtrees, reporting relationships, and member permissions. Write access lets its holder replace and archive that activity without the **Manage activities** permission. See the request schema in [Create or replace activities](https://help.gowindmill.com/api-reference/activities/create-or-replace-activities.md) for each field.

### Who can always read and edit

Members with **Manage activities** and the employee who created an activity can always read and edit it. Archived activities never appear in any read.

## Read activities

[Search activities](https://help.gowindmill.com/api-reference/activities/search-activities.md) returns one page of matches, newest `occurredAt` first. Filter by type, employee, tag, time range, and property conditions:

```json theme={null}
{
  "filter": {
    "types": ["call-score"],
    "emails": ["jane@acme.example"],
    "occurredAt": { "from": { "at": "2026-10-01T00:00:00Z" } },
    "properties": [{ "key": "score", "op": "gte", "value": 80 }]
  },
  "page": 1,
  "pageSize": 100
}
```

Pages start at 1, `pageSize` defaults to 20 and goes up to 100, and you continue while `pagination.hasMore` is `true`. See [Pagination](https://help.gowindmill.com/api-reference/pagination.md).

A few filter rules are worth knowing:

* Every filter you supply must match, and all property conditions must match. A filter takes at most 49 property conditions.
* Property values are never converted: the text `"82"` doesn't equal the number `82`.
* `eq`, `in`, and the list operators match text exactly and case-sensitively. `contains` and `startsWith` ignore case.
* `notIn` and `notOverlaps` also match activities where the property is missing.

For totals, use [Count activities](https://help.gowindmill.com/api-reference/activities/count-activities.md) with the same filter. Set `groupBy` to `type` or `month` to break the count down, for example to chart activity volume by month.

## Archive and restore

* [Archive an activity](https://help.gowindmill.com/api-reference/activities/archive-an-activity.md) removes it from every read, search, and count. To restore it, send it again.
* [Archive an activity type](https://help.gowindmill.com/api-reference/activities/archive-an-activity-type.md) archives the type and every one of its activities. Any later write of the type restores the type, but its activities stay archived until you send each one again.

## FAQs

> [accordion] Can I update one field of an activity without resending the rest?
>
> No. Each write replaces the whole activity, and omitted fields take their defaults. Keep the full activity in your system and send all of it every time.

> [accordion] Why does my request fail with 403?
>
> A key acts with its creator's current permissions. Creating an activity, and any activity type write, needs **Manage activities**. Replacing or archiving an existing activity needs **Manage activities** or write access to that activity. Also check that the key is **Read/write**. See [Authentication](https://help.gowindmill.com/api-reference/authentication.md#understand-permissions).

> [accordion] How do I delete an activity?
>
> Archive it with [Archive an activity](https://help.gowindmill.com/api-reference/activities/archive-an-activity.md). Archived activities never appear in reads, and Windy doesn't use them.

> [accordion] Is there a limit on how often I can send activities?
>
> Activity requests share the standard API budget. See [Rate limits](https://help.gowindmill.com/api-reference/rate-limits.md). To send many activities, batch up to 1,000 per request.


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