How activities are organized
- An activity type names a kind of event, such as
call-score. Itsdescriptiontells 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, anoccurredAttime, optionalbodytext, aurlback to your system,properties,tags, and the employees it’s about.
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 created by a member with that permission.
Reading activities only needs a key that can see them. See Control who can see an activity.
Send your first activity
One Create or replace activities request can define a type and send its activities. This example uses the environment variables from the API overview:id for each activity, in request order:
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.
Resend activities safely
Each write replaces the whole activity
Sending the sametype 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
tagsclears the tags. - A resend without
accessresets access toEMPLOYEE_AND_MANAGERS.
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:
- 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
400anddetailslists 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.
Describe an activity
Employees
Name each employee byemployeeId 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 asq4-push. They match exactly and case-sensitively, so Q4 and q4 are different tags.
Limits
- An
externalId, atype, and a tag can each be up to 512 characters. occurredAtmust be an RFC 3339 date-time withZor a±HH:MMoffset.- A field the request doesn’t define fails validation, except the keys you choose inside
properties.
Control who can see an activity
Each activity’saccess sets who can read it. Use a preset for the common cases:
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, whateveraccess 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 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 returns one page of matches, newestoccurredAt first. Filter by type, employee, tag, time range, and property conditions:
pageSize defaults to 20 and goes up to 100, and you continue while pagination.hasMore is true. See Pagination.
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 number82. eq,in, and the list operators match text exactly and case-sensitively.containsandstartsWithignore case.notInandnotOverlapsalso match activities where the property is missing.
groupBy to type or month to break the count down, for example to chart activity volume by month.
Archive and restore
- Archive an activity removes it from every read, search, and count. To restore it, send it again.
- Archive an activity type 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
Can I update one field of an activity without resending the rest?
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.
Why does my request fail with 403?
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.
How do I delete an activity?
How do I delete an activity?
Archive it with Archive an activity. Archived activities never appear in reads, and Windy doesn’t use them.
Is there a limit on how often I can send activities?
Is there a limit on how often I can send activities?
Activity requests share the standard API budget. See Rate limits. To send many activities, batch up to 1,000 per request.