Creates or replaces 1 to 1,000 activities: events from your systems, such as a scored sales call, each about zero or more employees. An activity is identified by its type and externalId. Sending the same pair again replaces the whole activity, and an omitted field takes its default. Sending an archived activity again restores it. List activity types in activityTypes to create or update them first, so one request can define a type and send its activities. Sending an activity of an archived type restores the type, but not the type's other activities.
Each activity's access sets who can read and edit it: a preset, or an access object. Unless shareWithEmployees is false, the employees on the activity can read it too. Members with permission to manage activities (`activities.manage`) and the employee who created the activity can always read and edit it.
Creating an activity requires permission to manage activities (`activities.manage`). Replacing an existing activity requires that permission or write access to the activity. Every activity type write also requires that permission: an activityTypes entry, or an activity of an archived type, which restores the type. Without the permission, an activity you cannot write fails with 403 whether or not it exists.
An externalId, a type, and a tag are each limited to 512 characters. A field the request does not define fails validation, except the keys of properties, which you name. No text can contain the NUL character (U+0000) or a lone UTF-16 surrogate (U+D800 to U+DFFF).
The request succeeds or fails as a whole: when any item fails, nothing is written. error.details lists every failing item, each with its path in the request and a message. For example, when the second activity names an email that no employee has, the request fails with 400 and error.details is [{ "path": ["activities", 1, "employees", 0], "message": "No employee has the email omar@acme.example." }]. Validation errors, unknown types, employees, groups, or integrations, and ambiguous emails fail with 400. A write you may not make fails with 403, and its detail carries resourceId, the activity's id, only when you can read the activity. When both kinds occur, the status is 400 and details lists both. If your own employee record changes while the request is written, for example in an employee merge, the request fails with 409 and nothing is written; send it again. Repeating a request is safe: it replaces the same activities.
Use an API key or OAuth access token. Enter only the token in the authorization dialog; requests send it as Authorization: Bearer <TOKEN>.
Create an API key in your workspace's Settings → API keys. Keys start with wm_api_ and only work in the workspace where they were created. Read-only keys can read data; creating, updating, or deleting data requires a read-write key.
Authorization: Bearer wm_api_example
OAuth access tokens are issued for connected Windmill applications.
Authorization: Bearer <OAUTH_ACCESS_TOKEN>
Both token types use the authenticated user's workspace permissions. Each endpoint's permission requirements and the sharing settings of the requested items still apply.
Path Parameters
companyId
string
required
Company ID. A URL slug is also accepted. The caller must have access to this company.
Required string length: 1 - 128
Example:
"company-acme"
Body
application/json
activities
object[]
required
The activities to create or replace, from 1 to 1,000. Each type and externalId pair can appear once.
Required array length: 1 - 1000 elements
Show child attributes
activityTypes
object[]
Activity types to create or update before the activities are written, so one request can define a type and send its activities. Each externalId can appear once. Requires permission to manage activities (activities.manage); without it, each entry fails and nothing is written.
Show child attributes
Response
The activities are written. Returns each activity's id, in request order.
results
object[]
required
One entry per written activity, in request order.
Show child attributes
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Windmill Help Site","colors":{"primary":"#4084FB","light":"#7aadff","dark":"#1758c1"},"logo":{"light":"https://mintcdn.com/windmill/438SkEPmWnjrcDyT/logo/light.svg?fit=max\u0026auto=format\u0026n=438SkEPmWnjrcDyT\u0026q=85\u0026s=911e75d2985851400d148f9e5e20c94f","dark":"https://mintcdn.com/windmill/438SkEPmWnjrcDyT/logo/dark.svg?fit=max\u0026auto=format\u0026n=438SkEPmWnjrcDyT\u0026q=85\u0026s=3942c2e1a12a8a71050cdb71a6613cf0"},"favicon":"https://mintcdn.com/windmill/438SkEPmWnjrcDyT/favicon.svg?fit=max\u0026auto=format\u0026n=438SkEPmWnjrcDyT\u0026q=85\u0026s=d0f6bb9380e55bd874dafc8c7a0bf0cc","navbar":{"links":[{"href":"mailto:support@gowindmill.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.gowindmill.com"}},"footer":{"socials":{"x":"https://x.com/trywindmill","linkedin":"https://www.linkedin.com/company/gowindmill"}},"seo":{"metatags":{"og:site_name":"Windmill Help Center"}},"contextual":{"options":["copy","view"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"windmill","hasAudioNarration":false,"actualSubdomain":"windmill","customDomains":["help.gowindmill.com"],"gitSource":{"type":"github","owner":"windmill-dev","repo":"windmill-help","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b10565f5fc932eb7b95c423","clientVersion":"0.0.4410","searchFilterCounts":[{"language":"default","tag":"Platform","count":144},{"language":"default","tag":"API reference","count":73},{"language":"default","tag":"Endpoints","count":64},{"language":"default","tag":"Review Cycles","count":51},{"language":"default","tag":"Integrations","count":44},{"language":"default","tag":"Productivity","count":30},{"language":"default","tag":"Pulse surveys","count":28},{"language":"default","tag":"Groups","count":23},{"language":"default","tag":"Features","count":17},{"language":"default","tag":"Getting started","count":16}]},"assistantConfig":{"enableAskAiButton":true,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"loom-embed.css","content":"[data-loom]{position:relative;aspect-ratio:16 / 9;background:#000;border-radius:0.75rem;overflow:hidden;margin-bottom:1rem}[data-loom]>a{position:absolute;inset:0;display:block}[data-loom] img{width:100%;height:100%;margin:0;border-radius:0;object-fit:contain;object-position:center}[data-loom]::before{content:attr(data-title);position:absolute;inset:0;z-index:1;pointer-events:none;padding:1rem 1.25rem;color:#fff;font-weight:600;font-size:1.25rem;line-height:1.25;text-shadow:0 1px 4px rgba(0, 0, 0, 0.4);background:linear-gradient(\n to bottom,\n rgba(0, 0, 0, 0.75) 0%,\n rgba(0, 0, 0, 0.28) 45%,\n rgba(0, 0, 0, 0.28) 100%\n );transition:opacity 0.5s}[data-loom][data-duration]::after{content:attr(data-duration);position:absolute;bottom:0.75rem;right:0.75rem;z-index:1;pointer-events:none;border-radius:0.375rem;background:rgba(0, 0, 0, 0.7);padding:0.125rem 0.5rem;font-size:0.75rem;font-weight:500;font-variant-numeric:tabular-nums;color:#fff;transition:opacity 0.5s}[data-loom]>a::after{content:\"\";position:absolute;inset:0;z-index:1;margin:auto;width:clamp(72px, 15%, 124px);aspect-ratio:1;border-radius:100%;box-shadow:0 1px 6px rgba(0, 0, 0, 0.25);background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 90' fill='none'%3E%3Cpath fill='%23ffffff' opacity='0.3' d='M45 90C69.8529 90 90 69.8527 90 44.9999C90 20.1471 69.8529 0 45 0C20.1472 0 0 20.1471 0 44.9999C0 69.8527 20.1472 90 45 90Z'/%3E%3Cpath fill='%23ffffff' d='M45 85C67.0914 85 85 67.0913 85 44.9999C85 22.9086 67.0914 5 45 5C22.9086 5 5 22.9086 5 44.9999C5 67.0913 22.9086 85 45 85Z'/%3E%3Cpath fill='%23000000' opacity='0.8' d='M35 33.268V56.732C35 58.5212 37.0582 59.6083 38.6432 58.6344L57.8999 46.9025C59.3667 46.0192 59.3667 43.9808 57.8999 43.0749L38.6432 31.3656C37.0582 30.3917 35 31.4788 35 33.268Z'/%3E%3C/svg%3E\")\n center / contain no-repeat;transition:transform 0.2s, opacity 0.5s}[data-loom]:hover>a::after,[data-loom]:focus-within>a::after{transform:scale(1.1)}[data-loom]>iframe{position:absolute;inset:0;width:100%;height:100%;z-index:2;border:0;opacity:0;pointer-events:none;transition:opacity 0.5s}[data-loom][data-playing]>iframe{opacity:1;pointer-events:auto}[data-loom][data-playing]::before,[data-loom][data-playing]::after,[data-loom][data-playing]>a::after{opacity:0}[data-loom]>button{position:absolute;inset:0;width:100%;height:100%;z-index:3;cursor:pointer;background:transparent;border:0;padding:0}"}]}
{"page":{"pagePath":"api-reference/activities/create-or-replace-activities","slug":"/api-reference/activities/create-or-replace-activities","pageMetadata":{"title":"Create or replace activities","description":"Creates or replaces 1 to 1,000 activities: events from your systems, such as a scored sales call, each about zero or more employees. An activity is identified by its type and externalId. Sending the same pair again replaces the whole activity, and an omitted field takes its default. Sending an archived activity again restores it. List activity types in activityTypes to create or update them first, so one request can define a type and send its activities. Sending an activity of an archived type restores the type, but not the type's other activities.\n\nEach activity's access sets who can read and edit it: a preset, or an access object. Unless shareWithEmployees is false, the employees on the activity can read it too. Members with permission to manage activities (`activities.manage`) and the employee who created the activity can always read and edit it.\n\nCreating an activity requires permission to manage activities (`activities.manage`). Replacing an existing activity requires that permission or write access to the activity. Every activity type write also requires that permission: an activityTypes entry, or an activity of an archived type, which restores the type. Without the permission, an activity you cannot write fails with 403 whether or not it exists.\n\nAn externalId, a type, and a tag are each limited to 512 characters. A field the request does not define fails validation, except the keys of properties, which you name. No text can contain the NUL character (U+0000) or a lone UTF-16 surrogate (U+D800 to U+DFFF).\n\nThe request succeeds or fails as a whole: when any item fails, nothing is written. error.details lists every failing item, each with its path in the request and a message. For example, when the second activity names an email that no employee has, the request fails with 400 and error.details is [{ \"path\": [\"activities\", 1, \"employees\", 0], \"message\": \"No employee has the email omar@acme.example.\" }]. Validation errors, unknown types, employees, groups, or integrations, and ambiguous emails fail with 400. A write you may not make fails with 403, and its detail carries resourceId, the activity's id, only when you can read the activity. When both kinds occur, the status is 400 and details lists both. If your own employee record changes while the request is written, for example in an employee merge, the request fails with 409 and nothing is written; send it again. Repeating a request is safe: it replaces the same activities.","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json put /c/{companyId}/activities","href":"/api-reference/activities/create-or-replace-activities","autogeneratedByOpenApi":true},"description":"Creates or replaces 1 to 1,000 activities: events from your systems, such as a scored sales call, each about zero or more employees. An activity is identified by its type and externalId. Sending the same pair again replaces the whole activity, and an omitted field takes its default. Sending an archived activity again restores it. List activity types in activityTypes to create or update them first, so one request can define a type and send its activities. Sending an activity of an archived type restores the type, but not the type's other activities.\n\nEach activity's access sets who can read and edit it: a preset, or an access object. Unless shareWithEmployees is false, the employees on the activity can read it too. Members with permission to manage activities (`activities.manage`) and the employee who created the activity can always read and edit it.\n\nCreating an activity requires permission to manage activities (`activities.manage`). Replacing an existing activity requires that permission or write access to the activity. Every activity type write also requires that permission: an activityTypes entry, or an activity of an archived type, which restores the type. Without the permission, an activity you cannot write fails with 403 whether or not it exists.\n\nAn externalId, a type, and a tag are each limited to 512 characters. A field the request does not define fails validation, except the keys of properties, which you name. No text can contain the NUL character (U+0000) or a lone UTF-16 surrogate (U+D800 to U+DFFF).\n\nThe request succeeds or fails as a whole: when any item fails, nothing is written. error.details lists every failing item, each with its path in the request and a message. For example, when the second activity names an email that no employee has, the request fails with 400 and error.details is [{ \"path\": [\"activities\", 1, \"employees\", 0], \"message\": \"No employee has the email omar@acme.example.\" }]. Validation errors, unknown types, employees, groups, or integrations, and ambiguous emails fail with 400. A write you may not make fails with 403, and its detail carries resourceId, the activity's id, only when you can read the activity. When both kinds occur, the status is 400 and details lists both. If your own employee record changes while the request is written, for example in an employee merge, the request fails with 409 and nothing is written; send it again. Repeating a request is safe: it replaces the same activities.","pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create or replace activities","description":"Creates or replaces 1 to 1,000 activities: events from your systems, such as a scored sales call, each about zero or more employees. An activity is identified by its type and externalId. Sending the same pair again replaces the whole activity, and an omitted field takes its default. Sending an archived activity again restores it. List activity types in activityTypes to create or update them first, so one request can define a type and send its activities. Sending an activity of an archived type restores the type, but not the type's other activities.\n\nEach activity's access sets who can read and edit it: a preset, or an access object. Unless shareWithEmployees is false, the employees on the activity can read it too. Members with permission to manage activities (`activities.manage`) and the employee who created the activity can always read and edit it.\n\nCreating an activity requires permission to manage activities (`activities.manage`). Replacing an existing activity requires that permission or write access to the activity. Every activity type write also requires that permission: an activityTypes entry, or an activity of an archived type, which restores the type. Without the permission, an activity you cannot write fails with 403 whether or not it exists.\n\nAn externalId, a type, and a tag are each limited to 512 characters. A field the request does not define fails validation, except the keys of properties, which you name. No text can contain the NUL character (U+0000) or a lone UTF-16 surrogate (U+D800 to U+DFFF).\n\nThe request succeeds or fails as a whole: when any item fails, nothing is written. error.details lists every failing item, each with its path in the request and a message. For example, when the second activity names an email that no employee has, the request fails with 400 and error.details is [{ \"path\": [\"activities\", 1, \"employees\", 0], \"message\": \"No employee has the email omar@acme.example.\" }]. Validation errors, unknown types, employees, groups, or integrations, and ambiguous emails fail with 400. A write you may not make fails with 403, and its detail carries resourceId, the activity's id, only when you can read the activity. When both kinds occur, the status is 400 and details lists both. If your own employee record changes while the request is written, for example in an employee merge, the request fails with 409 and nothing is written; send it again. Repeating a request is safe: it replaces the same activities.","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json put /c/{companyId}/activities","href":"/api-reference/activities/create-or-replace-activities","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"activities.upsert","summary":"Create or replace activities","description":"Creates or replaces 1 to 1,000 activities: events from your systems, such as a scored sales call, each about zero or more employees. An activity is identified by its type and externalId. Sending the same pair again replaces the whole activity, and an omitted field takes its default. Sending an archived activity again restores it. List activity types in activityTypes to create or update them first, so one request can define a type and send its activities. Sending an activity of an archived type restores the type, but not the type's other activities.\n\nEach activity's access sets who can read and edit it: a preset, or an access object. Unless shareWithEmployees is false, the employees on the activity can read it too. Members with permission to manage activities (`activities.manage`) and the employee who created the activity can always read and edit it.\n\nCreating an activity requires permission to manage activities (`activities.manage`). Replacing an existing activity requires that permission or write access to the activity. Every activity type write also requires that permission: an activityTypes entry, or an activity of an archived type, which restores the type. Without the permission, an activity you cannot write fails with 403 whether or not it exists.\n\nAn externalId, a type, and a tag are each limited to 512 characters. A field the request does not define fails validation, except the keys of properties, which you name. No text can contain the NUL character (U+0000) or a lone UTF-16 surrogate (U+D800 to U+DFFF).\n\nThe request succeeds or fails as a whole: when any item fails, nothing is written. error.details lists every failing item, each with its path in the request and a message. For example, when the second activity names an email that no employee has, the request fails with 400 and error.details is [{ \"path\": [\"activities\", 1, \"employees\", 0], \"message\": \"No employee has the email omar@acme.example.\" }]. Validation errors, unknown types, employees, groups, or integrations, and ambiguous emails fail with 400. A write you may not make fails with 403, and its detail carries resourceId, the activity's id, only when you can read the activity. When both kinds occur, the status is 400 and details lists both. If your own employee record changes while the request is written, for example in an employee merge, the request fails with 409 and nothing is written; send it again. Repeating a request is safe: it replaces the same activities.","tags":["Activities"],"security":["cbddd921-2568-49b6-bab4-9750dd27c878"],"parameters":["6fd9576e-1919-4f25-9d5b-1f59a644c1b3"],"requestBody":"a1421e76-83a5-4915-944f-88fc7823a391","responses":{"200":"86c3f920-4bcf-46a4-86c4-bbe1962d8f2b","400":"6ce89220-1a58-41e7-be98-787186efb4c1","401":"5b6da903-4926-4473-bb77-2b22280cff27","403":"99f705f8-ef89-4c7a-9958-7680372d7290","409":"7bd37908-99ad-4e69-8652-9656c4fe7214","429":"07847ded-bdd3-49f0-9b97-07a163520d16"},"method":"put","type":"path","servers":["d3918fe8-23b6-493a-bc1d-766e494d07c3"],"path":"/c/{companyId}/activities","baseUrlOptions":["https://api.gowindmill.com/api/v2"],"title":"Create or replace activities","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"6fd9576e-1919-4f25-9d5b-1f59a644c1b3":{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme","isRequired":true,"uniqueKey":"","typeLabel":"string"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"activities":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","maxLength":512,"pattern":"\\S","isRequired":true,"uniqueKey":"activities.items.[INDEX].type","typeLabel":"string"},"externalId":{"type":"string","maxLength":512,"pattern":"\\S","isRequired":true,"uniqueKey":"activities.items.[INDEX].externalId","typeLabel":"string"},"title":{"type":"string","pattern":"\\S","isRequired":true,"uniqueKey":"activities.items.[INDEX].title","typeLabel":"string"},"occurredAt":{"type":"string","format":"date-time","description":"When the event happened, as an RFC 3339 date-time with `Z` or a `±HH:MM` offset.","example":"2026-10-20T15:30:00Z","isRequired":true,"uniqueKey":"activities.items.[INDEX].occurredAt","typeLabel":"string\u003cdate-time>"},"employees":{"type":"array","items":{"oneOf":[{"type":"object","description":"An employee, named by employeeId or by email.","required":["employeeId"],"properties":{"employeeId":{"type":"string","minLength":1,"isRequired":true,"uniqueKey":"activities.items.[INDEX].employees.items.[INDEX].oneOf.0.employeeId","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"activities.items.[INDEX].employees.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"An employee, named by employeeId or by email.","required":["email"],"properties":{"email":{"type":"string","minLength":1,"isRequired":true,"uniqueKey":"activities.items.[INDEX].employees.items.[INDEX].oneOf.1.email","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"activities.items.[INDEX].employees.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"activities.items.[INDEX].employees.items.[INDEX]","typeLabel":"object"},"default":[],"description":"The employees the activity is about. Defaults to none. Archived employees can be named, and an employee named twice counts once. An email resolves to the one active employee who has it or, when no active employee has it, to the one archived employee who has it. An unknown employee or an ambiguous email fails the request.","uniqueKey":"activities.items.[INDEX].employees","typeLabel":"object[]"},"url":{"oneOf":[{"type":"string","format":"uri","default":null,"uniqueKey":"activities.items.[INDEX].url.oneOf.0","typeLabel":"string\u003curi>"},{"type":"null","format":"uri","default":null,"uniqueKey":"activities.items.[INDEX].url.oneOf.1","typeLabel":"null"}],"uniqueKey":"activities.items.[INDEX].url","typeLabel":"string\u003curi> | null"},"body":{"oneOf":[{"type":"string","default":null,"description":"Longer text about the event. Defaults to null.","uniqueKey":"activities.items.[INDEX].body.oneOf.0","typeLabel":"string"},{"type":"null","default":null,"description":"Longer text about the event. Defaults to null.","uniqueKey":"activities.items.[INDEX].body.oneOf.1","typeLabel":"null"}],"uniqueKey":"activities.items.[INDEX].body","typeLabel":"string | null"},"properties":{"type":"object","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"activities.items.[INDEX].properties.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"activities.items.[INDEX].properties.additionalProperties.oneOf.1","typeLabel":"number"},{"type":"boolean","uniqueKey":"activities.items.[INDEX].properties.additionalProperties.oneOf.2","typeLabel":"boolean"},{"type":"null","uniqueKey":"activities.items.[INDEX].properties.additionalProperties.oneOf.3","typeLabel":"null"},{"type":"array","items":{"oneOf":[{"type":"string","uniqueKey":"activities.items.[INDEX].properties.additionalProperties.oneOf.4.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"activities.items.[INDEX].properties.additionalProperties.oneOf.4.items.[INDEX].oneOf.1","typeLabel":"number"},{"type":"boolean","uniqueKey":"activities.items.[INDEX].properties.additionalProperties.oneOf.4.items.[INDEX].oneOf.2","typeLabel":"boolean"},{"type":"null","uniqueKey":"activities.items.[INDEX].properties.additionalProperties.oneOf.4.items.[INDEX].oneOf.3","typeLabel":"null"}],"uniqueKey":"activities.items.[INDEX].properties.additionalProperties.oneOf.4.items.[INDEX]","typeLabel":"string | number | boolean | null"},"uniqueKey":"activities.items.[INDEX].properties.additionalProperties.oneOf.4","typeLabel":"(string | number | boolean | null)[]"}],"uniqueKey":"activities.items.[INDEX].properties.additionalProperties","typeLabel":"string | number | boolean | null | (string | number | boolean | null)[]"},"description":"Structured details of the event as a flat object. Each value is a string, number, boolean, or null, or an array of those. An object value, or an array that holds an object or an array, fails validation. To group related details, put a `.` in the key, for example `account.name`; the whole key is one name.","example":{"score":82,"callType":"Discovery","account.name":"Northwind"},"uniqueKey":"activities.items.[INDEX].properties","typeLabel":"object"},"tags":{"type":"array","items":{"type":"string","maxLength":512,"pattern":"\\S","uniqueKey":"activities.items.[INDEX].tags.items.[INDEX]","typeLabel":"string"},"default":[],"uniqueKey":"activities.items.[INDEX].tags","typeLabel":"string[]"},"integrationId":{"oneOf":[{"type":"string","default":null,"uniqueKey":"activities.items.[INDEX].integrationId.oneOf.0","typeLabel":"string"},{"type":"null","default":null,"uniqueKey":"activities.items.[INDEX].integrationId.oneOf.1","typeLabel":"null"}],"uniqueKey":"activities.items.[INDEX].integrationId","typeLabel":"string | null"},"access":{"oneOf":[{"type":"string","description":"Who can read and edit the activity: a preset name, or an access object that grants read or write access to employees, groups, member capabilities, and reporting relationships. Write access includes read access. Defaults to EMPLOYEE_AND_MANAGERS. Every employee and group you name must belong to the company, or the request fails. Unless shareWithEmployees is false, the employees on the activity can also read it, with a preset or an access object alike. Members with permission to manage activities (`activities.manage`) and the employee who created the activity can always read and edit it.","default":"EMPLOYEE_AND_MANAGERS","enum":["EMPLOYEE_AND_MANAGERS","MANAGERS","EMPLOYEE","ADMINS","PUBLIC"],"example":"EMPLOYEE_AND_MANAGERS","uniqueKey":"activities.items.[INDEX].access.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"Who can read and edit the activity: a preset name, or an access object that grants read or write access to employees, groups, member capabilities, and reporting relationships. Write access includes read access. Defaults to EMPLOYEE_AND_MANAGERS. Every employee and group you name must belong to the company, or the request fails. Unless shareWithEmployees is false, the employees on the activity can also read it, with a preset or an access object alike. Members with permission to manage activities (`activities.manage`) and the employee who created the activity can always read and edit it.","default":"EMPLOYEE_AND_MANAGERS","example":"EMPLOYEE_AND_MANAGERS","properties":{"companyAccess":{"type":"string","enum":["none","read","write"],"default":"none","description":"`write` can read and edit; `none` removes the grant.","uniqueKey":"activities.items.[INDEX].access.oneOf.1.companyAccess","typeLabel":"enum\u003cstring>"},"allManagersAccess":{"type":"string","enum":["none","read","write"],"default":"none","description":"Every employee with at least one report.","uniqueKey":"activities.items.[INDEX].access.oneOf.1.allManagersAccess","typeLabel":"enum\u003cstring>"},"employeeAccess":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1,"isRequired":true,"uniqueKey":"activities.items.[INDEX].access.oneOf.1.employeeAccess.items.[INDEX].employeeId","typeLabel":"string"},"access":{"type":"string","enum":["none","read","write"],"description":"`write` can read and edit; `none` removes the grant.","isRequired":true,"uniqueKey":"activities.items.[INDEX].access.oneOf.1.employeeAccess.items.[INDEX].access","typeLabel":"enum\u003cstring>"}},"required":["employeeId","access"],"additionalProperties":false,"uniqueKey":"activities.items.[INDEX].access.oneOf.1.employeeAccess.items.[INDEX]","typeLabel":"object"},"default":[],"uniqueKey":"activities.items.[INDEX].access.oneOf.1.employeeAccess","typeLabel":"object[]"},"groupAccess":{"type":"array","items":{"type":"object","properties":{"groupId":{"type":"string","minLength":1,"isRequired":true,"uniqueKey":"activities.items.[INDEX].access.oneOf.1.groupAccess.items.[INDEX].groupId","typeLabel":"string"},"access":{"type":"string","enum":["none","read","write"],"description":"`write` can read and edit; `none` removes the grant.","isRequired":true,"uniqueKey":"activities.items.[INDEX].access.oneOf.1.groupAccess.items.[INDEX].access","typeLabel":"enum\u003cstring>"}},"required":["groupId","access"],"additionalProperties":false,"uniqueKey":"activities.items.[INDEX].access.oneOf.1.groupAccess.items.[INDEX]","typeLabel":"object"},"default":[],"uniqueKey":"activities.items.[INDEX].access.oneOf.1.groupAccess","typeLabel":"object[]"},"subtreeAccess":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1,"isRequired":true,"uniqueKey":"activities.items.[INDEX].access.oneOf.1.subtreeAccess.items.[INDEX].employeeId","typeLabel":"string"},"access":{"type":"string","enum":["none","read","write"],"description":"`write` can read and edit; `none` removes the grant.","isRequired":true,"uniqueKey":"activities.items.[INDEX].access.oneOf.1.subtreeAccess.items.[INDEX].access","typeLabel":"enum\u003cstring>"}},"required":["employeeId","access"],"additionalProperties":false,"uniqueKey":"activities.items.[INDEX].access.oneOf.1.subtreeAccess.items.[INDEX]","typeLabel":"object"},"default":[],"description":"Everyone who reports to the employee, directly or not.","uniqueKey":"activities.items.[INDEX].access.oneOf.1.subtreeAccess","typeLabel":"object[]"},"capabilitiesAccess":{"type":"array","items":{"type":"object","properties":{"capability":{"type":"string","minLength":1,"description":"A workspace member capability.","isRequired":true,"uniqueKey":"activities.items.[INDEX].access.oneOf.1.capabilitiesAccess.items.[INDEX].capability","typeLabel":"string"},"access":{"type":"string","enum":["none","read","write"],"description":"`write` can read and edit; `none` removes the grant.","isRequired":true,"uniqueKey":"activities.items.[INDEX].access.oneOf.1.capabilitiesAccess.items.[INDEX].access","typeLabel":"enum\u003cstring>"}},"required":["capability","access"],"additionalProperties":false,"uniqueKey":"activities.items.[INDEX].access.oneOf.1.capabilitiesAccess.items.[INDEX]","typeLabel":"object"},"default":[],"uniqueKey":"activities.items.[INDEX].access.oneOf.1.capabilitiesAccess","typeLabel":"object[]"},"relationshipAccess":{"type":"array","items":{"type":"object","properties":{"relationship":{"type":"string","enum":["DIRECT_MANAGER","MANAGER_HIERARCHY","EMPLOYEE_AND_MANAGER_HIERARCHY"],"isRequired":true,"uniqueKey":"activities.items.[INDEX].access.oneOf.1.relationshipAccess.items.[INDEX].relationship","typeLabel":"enum\u003cstring>"},"employeeId":{"type":"string","minLength":1,"isRequired":true,"uniqueKey":"activities.items.[INDEX].access.oneOf.1.relationshipAccess.items.[INDEX].employeeId","typeLabel":"string"},"access":{"type":"string","enum":["none","read","write"],"description":"`write` can read and edit; `none` removes the grant.","isRequired":true,"uniqueKey":"activities.items.[INDEX].access.oneOf.1.relationshipAccess.items.[INDEX].access","typeLabel":"enum\u003cstring>"}},"required":["relationship","employeeId","access"],"additionalProperties":false,"uniqueKey":"activities.items.[INDEX].access.oneOf.1.relationshipAccess.items.[INDEX]","typeLabel":"object"},"default":[],"description":"A grant to whoever holds a reporting relationship to the employee.","uniqueKey":"activities.items.[INDEX].access.oneOf.1.relationshipAccess","typeLabel":"object[]"}},"additionalProperties":false,"uniqueKey":"activities.items.[INDEX].access.oneOf.1","typeLabel":"object"}],"uniqueKey":"activities.items.[INDEX].access","typeLabel":"enum\u003cstring> | object"},"shareWithEmployees":{"type":"boolean","default":true,"description":"Defaults to true, with a preset or an access object alike: each employee on the activity can read it, whatever access allows. Set false to remove that grant, so the employees read the activity only when access includes them. For example, access MANAGERS with false shares an activity with an employee's managers but not with the employee.","uniqueKey":"activities.items.[INDEX].shareWithEmployees","typeLabel":"boolean"}},"required":["type","externalId","title","occurredAt"],"additionalProperties":false,"description":"A complete activity, identified by type and externalId. Each write replaces the whole activity, and an omitted field takes its default: a resend without tags clears the tags, and one without access resets access to EMPLOYEE_AND_MANAGERS.","uniqueKey":"activities.items.[INDEX]","typeLabel":"object"},"minItems":1,"maxItems":1000,"description":"The activities to create or replace, from 1 to 1,000. Each type and externalId pair can appear once.","isRequired":true,"uniqueKey":"activities","typeLabel":"object[]"},"activityTypes":{"type":"array","items":{"type":"object","properties":{"externalId":{"type":"string","maxLength":512,"pattern":"\\S","isRequired":true,"uniqueKey":"activityTypes.items.[INDEX].externalId","typeLabel":"string"},"name":{"type":"string","pattern":"\\S","isRequired":true,"uniqueKey":"activityTypes.items.[INDEX].name","typeLabel":"string"},"description":{"type":"string","pattern":"\\S","isRequired":true,"uniqueKey":"activityTypes.items.[INDEX].description","typeLabel":"string"}},"required":["externalId","name","description"],"additionalProperties":false,"description":"An activity type to create, or to update by its externalId.","uniqueKey":"activityTypes.items.[INDEX]","typeLabel":"object"},"description":"Activity types to create or update before the activities are written, so one request can define a type and send its activities. Each externalId can appear once. Requires permission to manage activities (`activities.manage`); without it, each entry fails and nothing is written.","uniqueKey":"activityTypes","typeLabel":"object[]"}},"required":["activities"],"additionalProperties":false,"example":{"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"]}]},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"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"]}]}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"86c3f920-4bcf-46a4-86c4-bbe1962d8f2b":{"description":"The activities are written. Returns each activity's id, in request order.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"The externalId of the activity's type.","isRequired":true,"uniqueKey":"results.items.[INDEX].type","typeLabel":"string"},"externalId":{"type":"string","description":"Your identifier for the event.","isRequired":true,"uniqueKey":"results.items.[INDEX].externalId","typeLabel":"string"},"id":{"type":"string","description":"Windmill's identifier for the activity.","isRequired":true,"uniqueKey":"results.items.[INDEX].id","typeLabel":"string"}},"required":["type","externalId","id"],"uniqueKey":"results.items.[INDEX]","typeLabel":"object"},"description":"One entry per written activity, in request order.","isRequired":true,"uniqueKey":"results","typeLabel":"object[]"}},"required":["results"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"results":[{"type":"\u003cstring>","externalId":"\u003cstring>","id":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"6ce89220-1a58-41e7-be98-787186efb4c1":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"],"isRequired":true,"uniqueKey":"oneOf.0.error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.error.message","typeLabel":"string"},"requestId":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.error.requestId","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"oneOf":[{"type":"string","uniqueKey":"oneOf.0.error.details.items.[INDEX].path.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"oneOf.0.error.details.items.[INDEX].path.items.[INDEX].oneOf.1","typeLabel":"number"}],"uniqueKey":"oneOf.0.error.details.items.[INDEX].path.items.[INDEX]","typeLabel":"string | number"},"isRequired":true,"uniqueKey":"oneOf.0.error.details.items.[INDEX].path","typeLabel":"(string | number)[]"},"message":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.error.details.items.[INDEX].message","typeLabel":"string"},"resourceId":{"type":"string","uniqueKey":"oneOf.0.error.details.items.[INDEX].resourceId","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"oneOf.0.error.details.items.[INDEX]","typeLabel":"object"},"description":"Each request item that failed, by its path in the request, when the operation identifies them. resourceId names an existing resource the failure concerns.","uniqueKey":"oneOf.0.error.details","typeLabel":"object[]"}},"required":["code","message","requestId"],"isRequired":true,"uniqueKey":"oneOf.0.error","typeLabel":"object"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"],"isRequired":true,"uniqueKey":"oneOf.1.error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.error.message","typeLabel":"string"},"requestId":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.error.requestId","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"oneOf":[{"type":"string","uniqueKey":"oneOf.1.error.details.items.[INDEX].path.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"oneOf.1.error.details.items.[INDEX].path.items.[INDEX].oneOf.1","typeLabel":"number"}],"uniqueKey":"oneOf.1.error.details.items.[INDEX].path.items.[INDEX]","typeLabel":"string | number"},"isRequired":true,"uniqueKey":"oneOf.1.error.details.items.[INDEX].path","typeLabel":"(string | number)[]"},"message":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.error.details.items.[INDEX].message","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"oneOf.1.error.details.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.1.error.details","typeLabel":"object[]"}},"required":["code","message","requestId","details"],"isRequired":true,"uniqueKey":"oneOf.1.error","typeLabel":"object"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"BAD_REQUEST","message":"\u003cstring>","requestId":"\u003cstring>","details":[{"path":["\u003cstring>"],"message":"\u003cstring>","resourceId":"\u003cstring>"}]}}}},"exampleType":"generated"}},"exampleType":"generated"},"5b6da903-4926-4473-bb77-2b22280cff27":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer \u003cTOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"}},"required":["code","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"UNAUTHORIZED","message":"\u003cstring>","requestId":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"99f705f8-ef89-4c7a-9958-7680372d7290":{"description":"Read-only API keys cannot call this operation. Creating an activity or writing an activity type requires permission to manage activities (`activities.manage`). Replacing an activity requires that permission or write access to the activity. This status is also returned when the API key or OAuth access token cannot access the workspace in the URL. A token works only in the workspace it was issued for, and only while its user is a member of that workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"oneOf":[{"type":"string","uniqueKey":"error.details.items.[INDEX].path.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"error.details.items.[INDEX].path.items.[INDEX].oneOf.1","typeLabel":"number"}],"uniqueKey":"error.details.items.[INDEX].path.items.[INDEX]","typeLabel":"string | number"},"isRequired":true,"uniqueKey":"error.details.items.[INDEX].path","typeLabel":"(string | number)[]"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"},"resourceId":{"type":"string","uniqueKey":"error.details.items.[INDEX].resourceId","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"description":"Each request item you lack permission for, by its path in the request, when the operation identifies them. resourceId names an existing resource the failure concerns.","uniqueKey":"error.details","typeLabel":"object[]"}},"required":["code","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"FORBIDDEN","message":"\u003cstring>","requestId":"\u003cstring>","details":[{"path":["\u003cstring>"],"message":"\u003cstring>","resourceId":"\u003cstring>"}]}}}},"exampleType":"generated"}},"exampleType":"generated"},"7bd37908-99ad-4e69-8652-9656c4fe7214":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"oneOf":[{"type":"string","uniqueKey":"error.details.items.[INDEX].path.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"error.details.items.[INDEX].path.items.[INDEX].oneOf.1","typeLabel":"number"}],"uniqueKey":"error.details.items.[INDEX].path.items.[INDEX]","typeLabel":"string | number"},"isRequired":true,"uniqueKey":"error.details.items.[INDEX].path","typeLabel":"(string | number)[]"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"},"resourceId":{"type":"string","uniqueKey":"error.details.items.[INDEX].resourceId","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"description":"Request fields that caused the conflict, when the operation identifies them. resourceId names the existing resource that conflicts.","uniqueKey":"error.details","typeLabel":"object[]"}},"required":["code","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"CONFLICT","message":"\u003cstring>","requestId":"\u003cstring>","details":[{"path":["\u003cstring>"],"message":"\u003cstring>","resourceId":"\u003cstring>"}]}}}},"exampleType":"generated"}},"exampleType":"generated"},"07847ded-bdd3-49f0-9b97-07a163520d16":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as \u003climit>;w=\u003cseconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"}},"required":["code","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"RATE_LIMITED","message":"\u003cstring>","requestId":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"cbddd921-2568-49b6-bab4-9750dd27c878":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Use an API key or OAuth access token. Enter only the token in the authorization dialog; requests send it as `Authorization: Bearer \u003cTOKEN>`.\n\nCreate an API key in your workspace's **Settings → API keys**. Keys start with `wm_api_` and only work in the workspace where they were created. Read-only keys can read data; creating, updating, or deleting data requires a read-write key.\n\n```http\nAuthorization: Bearer wm_api_example\n```\n\nOAuth access tokens are issued for connected Windmill applications.\n\n```http\nAuthorization: Bearer \u003cOAUTH_ACCESS_TOKEN>\n```\n\nBoth token types use the authenticated user's workspace permissions. Each endpoint's permission requirements and the sharing settings of the requested items still apply.","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"d3918fe8-23b6-493a-bc1d-766e494d07c3":{"url":"https://api.gowindmill.com/api/v2"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Use an API key or OAuth access token. Enter only the token in the authorization dialog; requests send it as `Authorization: Bearer \u003cTOKEN>`.\n\nCreate an API key in your workspace's **Settings → API keys**. Keys start with `wm_api_` and only work in the workspace where they were created. Read-only keys can read data; creating, updating, or deleting data requires a read-write key.\n\n```http\nAuthorization: Bearer wm_api_example\n```\n\nOAuth access tokens are issued for connected Windmill applications.\n\n```http\nAuthorization: Bearer \u003cOAUTH_ACCESS_TOKEN>\n```\n\nBoth token types use the authenticated user's workspace permissions. Each endpoint's permission requirements and the sharing settings of the requested items still apply.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Use an API key or OAuth access token. Enter only the token in the authorization dialog; requests send it as `Authorization: Bearer \u003cTOKEN>`.\n\nCreate an API key in your workspace's **Settings → API keys**. Keys start with `wm_api_` and only work in the workspace where they were created. Read-only keys can read data; creating, updating, or deleting data requires a read-write key.\n\n```http\nAuthorization: Bearer wm_api_example\n```\n\nOAuth access tokens are issued for connected Windmill applications.\n\n```http\nAuthorization: Bearer \u003cOAUTH_ACCESS_TOKEN>\n```\n\nBoth token types use the authenticated user's workspace permissions. Each endpoint's permission requirements and the sharing settings of the requested items still apply.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"https://api.gowindmill.com/api/v2/openapi.json"},"subdomain":"windmill","siteName":"Windmill Help Site","title":"Create or replace activities - Windmill Help Site","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-12-02T17:33:25.479Z","originalFileLocation":"api-reference/activities/create-or-replace-activities.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Creates or replaces 1 to 1,000 activities: events from your systems, such as a scored sales call, each about zero or more employees. An activity is identified by its type and externalId. Sending the same pair again replaces the whole activity, and an omitted field takes its default. Sending an archived activity again restores it. List activity types in activityTypes to create or update them first, so one request can define a type and send its activities. Sending an activity of an archived type restores the type, but not the type\u0026#x27;s other activities. Each activity\u0026#x27;s access sets who can read and edit it: a preset, or an access object. Unless shareWithEmployees is false, the employees on the activity can read it too. Members with permission to manage activities (activities.manage) and the employee who created the activity can always read and edit it. Creating an activity requires permission to manage activities (activities.manage). Replacing an existing activity requires that permission or write access to the activity. Every activity type write also requires that permission: an activityTypes entry, or an activity of an archived type, which restores the type. Without the permission, an activity you cannot write fails with 403 whether or not it exists. An externalId, a type, and a tag are each limited to 512 characters. A field the request does not define fails validation, except the keys of properties, which you name. No text can contain the NUL character (U+0000) or a lone UTF-16 surrogate (U+D800 to U+DFFF). The request succeeds or fails as a whole: when any item fails, nothing is written. error.details lists every failing item, each with its path in the request and a message. For example, when the second activity names an email that no employee has, the request fails with 400 and error.details is [{ \u0026quot;path\u0026quot;: [\u0026quot;activities\u0026quot;, 1, \u0026quot;employees\u0026quot;, 0], \u0026quot;message\u0026quot;: \u0026quot;No employee has the email omar@acme.example.\u0026quot; }]. Validation errors, unknown types, employees, groups, or integrations, and ambiguous emails fail with 400. A write you may not make fails with 403, and its detail carries resourceId, the activity\u0026#x27;s id, only when you can read the activity. When both kinds occur, the status is 400 and details lists both. If your own employee record changes while the request is written, for example in an employee merge, the request fails with 409 and nothing is written; send it again. Repeating a request is safe: it replaces the same activities.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Windmill Help Site\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/windmill/W7N_zh2zYbm8zD54/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/windmill/W7N_zh2zYbm8zD54/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/windmill/W7N_zh2zYbm8zD54/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/windmill/W7N_zh2zYbm8zD54/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/windmill/W7N_zh2zYbm8zD54/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/windmill/W7N_zh2zYbm8zD54/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/windmill/W7N_zh2zYbm8zD54/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/windmill/W7N_zh2zYbm8zD54/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/windmill/W7N_zh2zYbm8zD54/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create or replace activities - Windmill Help Site\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates or replaces 1 to 1,000 activities: events from your systems, such as a scored sales call, each about zero or more employees. An activity is identified by its type and externalId. Sending the same pair again replaces the whole activity, and an omitted field takes its default. Sending an archived activity again restores it. List activity types in activityTypes to create or update them first, so one request can define a type and send its activities. Sending an activity of an archived type restores the type, but not the type\u0026#x27;s other activities. Each activity\u0026#x27;s access sets who can read and edit it: a preset, or an access object. Unless shareWithEmployees is false, the employees on the activity can read it too. Members with permission to manage activities (activities.manage) and the employee who created the activity can always read and edit it. Creating an activity requires permission to manage activities (activities.manage). Replacing an existing activity requires that permission or write access to the activity. Every activity type write also requires that permission: an activityTypes entry, or an activity of an archived type, which restores the type. Without the permission, an activity you cannot write fails with 403 whether or not it exists. An externalId, a type, and a tag are each limited to 512 characters. A field the request does not define fails validation, except the keys of properties, which you name. No text can contain the NUL character (U+0000) or a lone UTF-16 surrogate (U+D800 to U+DFFF). The request succeeds or fails as a whole: when any item fails, nothing is written. error.details lists every failing item, each with its path in the request and a message. For example, when the second activity names an email that no employee has, the request fails with 400 and error.details is [{ \u0026quot;path\u0026quot;: [\u0026quot;activities\u0026quot;, 1, \u0026quot;employees\u0026quot;, 0], \u0026quot;message\u0026quot;: \u0026quot;No employee has the email omar@acme.example.\u0026quot; }]. Validation errors, unknown types, employees, groups, or integrations, and ambiguous emails fail with 400. A write you may not make fails with 403, and its detail carries resourceId, the activity\u0026#x27;s id, only when you can read the activity. When both kinds occur, the status is 400 and details lists both. If your own employee record changes while the request is written, for example in an employee merge, the request fails with 409 and nothing is written; send it again. Repeating a request is safe: it replaces the same activities.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Windmill Help Center\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://help.gowindmill.com/api-reference/activities/create-or-replace-activities\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://windmill.mintlify.site/_mintlify/api/og/v2?division=Activities\u0026amp;title=Create+or+replace+activities\u0026amp;description=Creates+or+replaces+1+to+1%2C000+activities%3A+events+from+your+systems%2C+such+as+a+scored+sales+call%2C+each+about+zero+or+more+employees.+An+activity+is+identified+b\u0026amp;theme=819f4f407f94f51efe0e1a0f\u0026amp;signature=5c6c665cf9830849d5f74c9d89077c6151bfd4817a61724c595ee20ef8cb3220\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create or replace activities - Windmill Help Site\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates or replaces 1 to 1,000 activities: events from your systems, such as a scored sales call, each about zero or more employees. An activity is identified by its type and externalId. Sending the same pair again replaces the whole activity, and an omitted field takes its default. Sending an archived activity again restores it. List activity types in activityTypes to create or update them first, so one request can define a type and send its activities. Sending an activity of an archived type restores the type, but not the type\u0026#x27;s other activities. Each activity\u0026#x27;s access sets who can read and edit it: a preset, or an access object. Unless shareWithEmployees is false, the employees on the activity can read it too. Members with permission to manage activities (activities.manage) and the employee who created the activity can always read and edit it. Creating an activity requires permission to manage activities (activities.manage). Replacing an existing activity requires that permission or write access to the activity. Every activity type write also requires that permission: an activityTypes entry, or an activity of an archived type, which restores the type. Without the permission, an activity you cannot write fails with 403 whether or not it exists. An externalId, a type, and a tag are each limited to 512 characters. A field the request does not define fails validation, except the keys of properties, which you name. No text can contain the NUL character (U+0000) or a lone UTF-16 surrogate (U+D800 to U+DFFF). The request succeeds or fails as a whole: when any item fails, nothing is written. error.details lists every failing item, each with its path in the request and a message. For example, when the second activity names an email that no employee has, the request fails with 400 and error.details is [{ \u0026quot;path\u0026quot;: [\u0026quot;activities\u0026quot;, 1, \u0026quot;employees\u0026quot;, 0], \u0026quot;message\u0026quot;: \u0026quot;No employee has the email omar@acme.example.\u0026quot; }]. Validation errors, unknown types, employees, groups, or integrations, and ambiguous emails fail with 400. A write you may not make fails with 403, and its detail carries resourceId, the activity\u0026#x27;s id, only when you can read the activity. When both kinds occur, the status is 400 and details lists both. If your own employee record changes while the request is written, for example in an employee merge, the request fails with 409 and nothing is written; send it again. Repeating a request is safe: it replaces the same activities.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://windmill.mintlify.site/_mintlify/api/og/v2?division=Activities\u0026amp;title=Create+or+replace+activities\u0026amp;description=Creates+or+replaces+1+to+1%2C000+activities%3A+events+from+your+systems%2C+such+as+a+scored+sales+call%2C+each+about+zero+or+more+employees.+An+activity+is+identified+b\u0026amp;theme=819f4f407f94f51efe0e1a0f\u0026amp;signature=5c6c665cf9830849d5f74c9d89077c6151bfd4817a61724c595ee20ef8cb3220\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/windmill/W7N_zh2zYbm8zD54/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Windmill Help Site\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4084FB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://help.gowindmill.com/api-reference/activities/create-or-replace-activities\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/activities/create-or-replace-activities.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://help.gowindmill.com/#organization\",\"name\":\"Windmill Help Site\",\"url\":\"https://help.gowindmill.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/windmill/438SkEPmWnjrcDyT/logo/light.svg?fit=max\u0026auto=format\u0026n=438SkEPmWnjrcDyT\u0026q=85\u0026s=911e75d2985851400d148f9e5e20c94f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://help.gowindmill.com#website\",\"name\":\"Windmill Help Site\",\"url\":\"https://help.gowindmill.com\",\"publisher\":{\"@id\":\"https://help.gowindmill.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://help.gowindmill.com/api-reference/activities/create-or-replace-activities#webpage\",\"url\":\"https://help.gowindmill.com/api-reference/activities/create-or-replace-activities\",\"name\":\"Create or replace activities\",\"description\":\"Creates or replaces 1 to 1,000 activities: events from your systems, such as a scored sales call, each about zero or more employees. An activity is identified by its type and externalId. Sending the same pair again replaces the whole activity, and an omitted field takes its default. Sending an archived activity again restores it. List activity types in activityTypes to create or update them first, so one request can define a type and send its activities. Sending an activity of an archived type restores the type, but not the type's other activities. Each activity's access sets who can read and edit it: a preset, or an access object. Unless shareWithEmployees is false, the employees on the activity can read it too. Members with permission to manage activities (activities.manage) and the employee who created the activity can always read and edit it. Creating an activity requires permission to manage activities (activities.manage). Replacing an existing activity requires that permission or write access to the activity. Every activity type write also requires that permission: an activityTypes entry, or an activity of an archived type, which restores the type. Without the permission, an activity you cannot write fails with 403 whether or not it exists. An externalId, a type, and a tag are each limited to 512 characters. A field the request does not define fails validation, except the keys of properties, which you name. No text can contain the NUL character (U+0000) or a lone UTF-16 surrogate (U+D800 to U+DFFF). The request succeeds or fails as a whole: when any item fails, nothing is written. error.details lists every failing item, each with its path in the request and a message. For example, when the second activity names an email that no employee has, the request fails with 400 and error.details is [{ \\\"path\\\": [\\\"activities\\\", 1, \\\"employees\\\", 0], \\\"message\\\": \\\"No employee has the email omar@acme.example.\\\" }]. Validation errors, unknown types, employees, groups, or integrations, and ambiguous emails fail with 400. A write you may not make fails with 403, and its detail carries resourceId, the activity's id, only when you can read the activity. When both kinds occur, the status is 400 and details lists both. If your own employee record changes while the request is written, for example in an employee merge, the request fails with 409 and nothing is written; send it again. Repeating a request is safe: it replaces the same activities.\",\"dateModified\":\"2026-12-02T17:33:25.479Z\",\"isPartOf\":{\"@id\":\"https://help.gowindmill.com#website\"},\"breadcrumb\":{\"@id\":\"https://help.gowindmill.com/api-reference/activities/create-or-replace-activities#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://help.gowindmill.com/api-reference/activities/create-or-replace-activities#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://help.gowindmill.com/api-reference/tokens/get-token-information\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Activities\",\"item\":\"https://help.gowindmill.com/api-reference/activities-overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Create or replace activities\",\"item\":\"https://help.gowindmill.com/api-reference/activities/create-or-replace-activities\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://help.gowindmill.com/api-reference/activities/create-or-replace-activities#apireference\",\"headline\":\"Create or replace activities\",\"name\":\"Create or replace activities\",\"description\":\"Creates or replaces 1 to 1,000 activities: events from your systems, such as a scored sales call, each about zero or more employees. An activity is identified by its type and externalId. Sending the same pair again replaces the whole activity, and an omitted field takes its default. Sending an archived activity again restores it. List activity types in activityTypes to create or update them first, so one request can define a type and send its activities. Sending an activity of an archived type restores the type, but not the type's other activities. Each activity's access sets who can read and edit it: a preset, or an access object. Unless shareWithEmployees is false, the employees on the activity can read it too. Members with permission to manage activities (activities.manage) and the employee who created the activity can always read and edit it. Creating an activity requires permission to manage activities (activities.manage). Replacing an existing activity requires that permission or write access to the activity. Every activity type write also requires that permission: an activityTypes entry, or an activity of an archived type, which restores the type. Without the permission, an activity you cannot write fails with 403 whether or not it exists. An externalId, a type, and a tag are each limited to 512 characters. A field the request does not define fails validation, except the keys of properties, which you name. No text can contain the NUL character (U+0000) or a lone UTF-16 surrogate (U+D800 to U+DFFF). The request succeeds or fails as a whole: when any item fails, nothing is written. error.details lists every failing item, each with its path in the request and a message. For example, when the second activity names an email that no employee has, the request fails with 400 and error.details is [{ \\\"path\\\": [\\\"activities\\\", 1, \\\"employees\\\", 0], \\\"message\\\": \\\"No employee has the email omar@acme.example.\\\" }]. Validation errors, unknown types, employees, groups, or integrations, and ambiguous emails fail with 400. A write you may not make fails with 403, and its detail carries resourceId, the activity's id, only when you can read the activity. When both kinds occur, the status is 400 and details lists both. If your own employee record changes while the request is written, for example in an employee merge, the request fails with 409 and nothing is written; send it again. Repeating a request is safe: it replaces the same activities.\",\"url\":\"https://help.gowindmill.com/api-reference/activities/create-or-replace-activities\",\"mainEntityOfPage\":{\"@id\":\"https://help.gowindmill.com/api-reference/activities/create-or-replace-activities#webpage\"},\"dateModified\":\"2026-12-02T17:33:25.479Z\",\"publisher\":{\"@id\":\"https://help.gowindmill.com/#organization\"},\"isPartOf\":{\"@id\":\"https://help.gowindmill.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Windmill Help Site\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Windmill Help Site\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/activities/create-or-replace-activities.md","siteName":"Windmill Help Site","nav":{"global":null,"tabs":[{"tab":"Platform","pages":[{"title":"Platform","href":""}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/integrations"}]},{"tab":"API reference","groups":[{"group":"Getting started","icon":"code","pages":[{"title":"API overview","href":"/api-reference/overview"},{"title":"Authentication","href":"/api-reference/authentication"},{"title":"OAuth","href":"/api-reference/oauth"},{"title":"Making requests","href":"/api-reference/making-requests"},{"title":"Errors","href":"/api-reference/errors"},{"title":"Pagination","href":"/api-reference/pagination"},{"title":"Rate limits","href":"/api-reference/rate-limits"},{"title":"Versioning","href":"/api-reference/versioning"},{"title":"API changelog","href":"/api-reference/changelog"}]},{"group":"Endpoints","icon":"plug","pages":[{"group":"Tokens","pages":[{"title":"Get token information","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json get /token-info","href":"/api-reference/tokens/get-token-information"}]},{"group":"Employees","pages":[{"group":"Field sources","pages":[{"title":"List available employee field sources","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json get /c/{companyId}/field-sources/available-sources","href":"/api-reference/employee-field-sources/list-available-employee-field-sources"},{"title":"List company employee field defaults","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json get /c/{companyId}/field-sources/defaults","href":"/api-reference/employee-field-sources/list-company-employee-field-defaults"},{"title":"List employee field source overrides","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json get /c/{companyId}/employees/{employeeId}/field-sources","href":"/api-reference/employee-field-sources/list-employee-field-source-overrides"},{"title":"Resolve effective employee field sources","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/field-sources/resolve","href":"/api-reference/employee-field-sources/resolve-effective-employee-field-sources"},{"title":"Set a company employee field source","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json put /c/{companyId}/field-sources/defaults/{fieldKey}","href":"/api-reference/employee-field-sources/set-a-company-employee-field-source"},{"title":"Set an employee field source override","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json put /c/{companyId}/employees/{employeeId}/field-sources/{fieldKey}","href":"/api-reference/employee-field-sources/set-an-employee-field-source-override"},{"title":"Remove an employee field source override","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json delete /c/{companyId}/employees/{employeeId}/field-sources/{fieldKey}","href":"/api-reference/employee-field-sources/remove-an-employee-field-source-override"},{"title":"Remove a company employee field default","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json delete /c/{companyId}/field-sources/defaults/{fieldKey}","href":"/api-reference/employee-field-sources/remove-a-company-employee-field-default"}]},{"title":"Search employee profiles","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/employees/search","href":"/api-reference/employees/search-employee-profiles"},{"title":"Get an employee profile","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json get /c/{companyId}/employees/{employeeId}","href":"/api-reference/employees/get-an-employee-profile"},{"title":"Search employee IDs","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/employees/search/ids","href":"/api-reference/employees/search-employee-ids"},{"title":"Count matching employees","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/employees/count","href":"/api-reference/employees/count-matching-employees"},{"title":"Create an employee","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/employees","href":"/api-reference/employees/create-an-employee"},{"title":"Update an employee profile","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json patch /c/{companyId}/employees/{employeeId}","href":"/api-reference/employees/update-an-employee-profile"},{"title":"Set an employee's employment status","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json put /c/{companyId}/employees/{employeeId}/employment-status","href":"/api-reference/employees/set-an-employees-employment-status"},{"title":"Create employees in bulk","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/employees/bulk","href":"/api-reference/employees/create-employees-in-bulk"}]},{"group":"Groups","pages":[{"group":"Categories","pages":[{"title":"List employee group categories","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json get /c/{companyId}/groups/categories","href":"/api-reference/group-categories/list-employee-group-categories"},{"title":"Get an employee group category","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json get /c/{companyId}/groups/categories/{categoryId}","href":"/api-reference/group-categories/get-an-employee-group-category"},{"title":"Create an employee group category","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/groups/categories","href":"/api-reference/group-categories/create-an-employee-group-category"},{"title":"Update an employee group category","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json patch /c/{companyId}/groups/categories/{categoryId}","href":"/api-reference/group-categories/update-an-employee-group-category"},{"title":"Add employee groups to a category","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/groups/categories/{categoryId}/groups","href":"/api-reference/group-categories/add-employee-groups-to-a-category"},{"title":"Remove employee groups from a category","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/groups/categories/{categoryId}/groups/remove","href":"/api-reference/group-categories/remove-employee-groups-from-a-category"},{"title":"Delete an employee group category","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json delete /c/{companyId}/groups/categories/{categoryId}","href":"/api-reference/group-categories/delete-an-employee-group-category"}]},{"title":"List readable employee groups","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json get /c/{companyId}/groups","href":"/api-reference/groups/list-readable-employee-groups"},{"title":"Count readable employee groups","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json get /c/{companyId}/groups/count","href":"/api-reference/groups/count-readable-employee-groups"},{"title":"Get an employee group","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json get /c/{companyId}/groups/{groupId}","href":"/api-reference/groups/get-an-employee-group"},{"title":"Create an employee group","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/groups","href":"/api-reference/groups/create-an-employee-group"},{"title":"Update an employee group","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json patch /c/{companyId}/groups/{groupId}","href":"/api-reference/groups/update-an-employee-group"},{"title":"List employees in a group","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json get /c/{companyId}/groups/{groupId}/members","href":"/api-reference/groups/list-employees-in-a-group"},{"title":"Count employee group members","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json get /c/{companyId}/groups/{groupId}/members/count","href":"/api-reference/groups/count-employee-group-members"},{"title":"Add employees to a manual group","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/groups/{groupId}/members","href":"/api-reference/groups/add-employees-to-a-manual-group"},{"title":"Remove employees from a manual group","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/groups/{groupId}/members/remove","href":"/api-reference/groups/remove-employees-from-a-manual-group"},{"title":"Replace smart group employee rules","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json put /c/{companyId}/groups/{groupId}/rules","href":"/api-reference/groups/replace-smart-group-employee-rules"},{"title":"Refresh an employee group","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/groups/{groupId}/sync","href":"/api-reference/groups/refresh-an-employee-group"},{"title":"Replace employee group sharing","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json put /c/{companyId}/groups/{groupId}/access","href":"/api-reference/groups/replace-employee-group-sharing"},{"title":"Upload and review a group member CSV","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/groups/{groupId}/members/imports/uploads","href":"/api-reference/groups/upload-and-review-a-group-member-csv"},{"title":"Submit a reviewed group member import","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/groups/{groupId}/members/imports","href":"/api-reference/groups/submit-a-reviewed-group-member-import"},{"title":"Get group member import progress","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json get /c/{companyId}/groups/{groupId}/members/imports/{importId}","href":"/api-reference/groups/get-group-member-import-progress"},{"title":"Delete an employee group","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json delete /c/{companyId}/groups/{groupId}","href":"/api-reference/groups/delete-an-employee-group"}]},{"group":"Stats","pages":[{"group":"Views","pages":[{"title":"List stat views","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json get /c/{companyId}/stats/views","href":"/api-reference/stat-views/list-stat-views"},{"title":"Count stat views","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json get /c/{companyId}/stats/views/count","href":"/api-reference/stat-views/count-stat-views"},{"title":"Get a stat view","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json get /c/{companyId}/stats/views/{id}","href":"/api-reference/stat-views/get-a-stat-view"},{"title":"Create a stat view","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/stats/views","href":"/api-reference/stat-views/create-a-stat-view"},{"title":"Update a stat view","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json patch /c/{companyId}/stats/views/{id}","href":"/api-reference/stat-views/update-a-stat-view"},{"title":"Set stat view access","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json put /c/{companyId}/stats/views/{id}/access","href":"/api-reference/stat-views/set-stat-view-access"},{"title":"Delete a stat view","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json delete /c/{companyId}/stats/views/{id}","href":"/api-reference/stat-views/delete-a-stat-view"}]},{"title":"Search stat definitions","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/stats/metadata/search","href":"/api-reference/stats/search-stat-definitions"},{"title":"Count stat definitions","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/stats/metadata/count","href":"/api-reference/stats/count-stat-definitions"},{"title":"Search employee stat series","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/stats/search","href":"/api-reference/stats/search-employee-stat-series"},{"title":"Search employee stat totals","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/stats/employees/search","href":"/api-reference/stats/search-employee-stat-totals"},{"title":"Count employees matching stat totals","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/stats/employees/count","href":"/api-reference/stats/count-employees-matching-stat-totals"},{"title":"Export employee stats as CSV","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/stats/export/csv","href":"/api-reference/stats/export-employee-stats-as-csv"},{"title":"Create or replace a custom stat definition","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json put /c/{companyId}/stats/metadata","href":"/api-reference/stats/create-or-replace-a-custom-stat-definition"},{"title":"Upload custom employee stat values","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json put /c/{companyId}/stats/values","href":"/api-reference/stats/upload-custom-employee-stat-values"}]},{"group":"Activities","pages":[{"title":"Activities overview","sidebarTitle":"Overview","href":"/api-reference/activities-overview"},{"group":"Types","pages":[{"title":"List activity types","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json get /c/{companyId}/activity-types","href":"/api-reference/activities/list-activity-types"},{"title":"Create or update an activity type","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json put /c/{companyId}/activity-types/{externalId}","href":"/api-reference/activities/create-or-update-an-activity-type"},{"title":"Archive an activity type","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json delete /c/{companyId}/activity-types/{externalId}","href":"/api-reference/activities/archive-an-activity-type"}]},{"title":"Search activities","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/activities/search","href":"/api-reference/activities/search-activities"},{"title":"Count activities","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json post /c/{companyId}/activities/count","href":"/api-reference/activities/count-activities"},{"title":"Get an activity","description":"Returns one activity, with its employees, tags, properties, and access. With permission to manage activities (`activities.manage`), you can read every activity. Otherwise you can read an activity when its access grants you read or write access, for example as an employee on it, as one of their managers, or as the employee who created it. Activities shared with admins can be read with permission to view admin activities (`activities.view_admin`). Access granted to a permission reaches only members who have an employee record; permission to manage activities needs none. Archived activities are never returned. A missing, archived, or unreadable activity fails with 404.","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json get /c/{companyId}/activities/{activityId}","href":"/api-reference/activities/get-an-activity"},{"title":"Create or replace activities","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json put /c/{companyId}/activities","href":"/api-reference/activities/create-or-replace-activities"},{"title":"Archive an activity","description":"Archives the activity, which removes it from every read, search, and count. To restore it, send it again with PUT /c/{companyId}/activities. Requires permission to manage activities (`activities.manage`) or write access to the activity. An activity you can read but not write fails with 403. An activity that is already archived, and that you can write, succeeds with 204. A missing activity, or one you cannot read, fails with 404.","deprecated":null,"version":null,"openapi":"https://api.gowindmill.com/api/v2/openapi.json delete /c/{companyId}/activities/{activityId}","href":"/api-reference/activities/archive-an-activity"}]}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]},{"tab":"Best practices","pages":[{"title":"Best practices","href":"/introducing-windmill"}]}]},"basePath":"","title":"Create or replace activities - Windmill Help Site","deploymentId":"dpl_3VZr4zL4q2wbintGwWjSCGUgnuP7","buildId":"dpl_3VZr4zL4q2wbintGwWjSCGUgnuP7","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DUG0fxZu.js","snippetPresets-Ba5aWAdQ.js","utils-GxQLQihZ.js","style-to-object-BY3JEAdk.js","utils-WKMM_gjD.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-Bo9LYdaA.js","conditional-requirements-CFM0id0Q.js","cloneDeep-DwYjaFhs.js","_Uint8Array-DDE2Hehm.js","isObject-FP1Yky1u.js","ApiExamples-DhR-5ORn.js","usePlaygroundInputsStore-BaYqfAgH.js","shallow-BC7UwQwD.js","isEqual-gcN6MEQu.js","CodeSnippets-B8P54LrN.js","CodeSnippet-Czwn5OJE.js","use-playground-group-access-C3A6I116.js","Page-CUkc1DBo.js","api-description-markdown-CDE0Fpj5.js","DynamicMarkdown-F4EfLno9.js","SectionHeading-DMe18In2.js","MethodPill-CW7tTaiB.js","getPastedJson-DB5smC0Q.js","Check2Icon-DDdveNjm.js","axios-CsQoIw0U.js","Markdown-BLge-GTN.js","AssistantPageLink-BFI2wFhH.js","dist-C1RpOC6K.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}