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

# Get an activity

> 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.



## OpenAPI

````yaml https://api.gowindmill.com/api/v2/openapi.json get /c/{companyId}/activities/{activityId}
openapi: 3.1.0
info:
  title: Windmill API
  version: 2.0.0
  description: >-
    Use the Windmill API to integrate your systems, automate workflows, and
    build applications on your organization's data. Authenticate with an API key
    or OAuth access token. Each request uses the authenticated user's
    permissions within the selected workspace.
servers:
  - url: https://api.gowindmill.com/api/v2
security:
  - bearerAuth: []
paths:
  /c/{companyId}/activities/{activityId}:
    get:
      tags:
        - Activities
      summary: 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.
      operationId: activities.get
      parameters:
        - 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
          required: true
          description: >-
            Company ID. A URL slug is also accepted. The caller must have access
            to this company.
          name: companyId
          in: path
        - schema:
            type: string
            description: >-
              Windmill's identifier for the activity, as returned by PUT
              /c/{companyId}/activities or POST
              /c/{companyId}/activities/search.
            example: 019a2f7c-8842-7e3f-9a4b-5c6d7e8f9a0b
          required: true
          description: >-
            Windmill's identifier for the activity, as returned by PUT
            /c/{companyId}/activities or POST /c/{companyId}/activities/search.
          name: activityId
          in: path
      responses:
        '200':
          description: The activity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Activity'
        '401':
          description: >-
            Authentication is missing or invalid. Send a valid API key or OAuth
            access token in the Authorization: Bearer <TOKEN> header before
            retrying.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - UNAUTHORIZED
                      message:
                        type: string
                      requestId:
                        type: string
                    required:
                      - code
                      - message
                      - requestId
                required:
                  - error
        '403':
          description: >-
            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
                      message:
                        type: string
                      requestId:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                            message:
                              type: string
                            resourceId:
                              type: string
                          required:
                            - path
                            - message
                        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.
                    required:
                      - code
                      - message
                      - requestId
                required:
                  - error
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - NOT_FOUND
                      message:
                        type: string
                      requestId:
                        type: string
                    required:
                      - code
                      - message
                      - requestId
                required:
                  - error
        '429':
          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
                <limit>;w=<seconds>.
              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
                      message:
                        type: string
                      requestId:
                        type: string
                    required:
                      - code
                      - message
                      - requestId
                required:
                  - error
      security:
        - bearerAuth: []
components:
  schemas:
    Activity:
      type: object
      properties:
        id:
          type: string
          description: Windmill's identifier for the activity.
          example: 019a2f7c-8842-7e3f-9a4b-5c6d7e8f9a0b
        type:
          type: string
          description: The externalId of the activity's type.
          example: call-score
        externalId:
          type: string
          description: Your identifier for the event, unique within its type.
          example: call-8842
        employees:
          type: array
          items:
            type: object
            properties:
              employeeId:
                type: string
                description: Windmill's identifier for the employee.
              email:
                type:
                  - string
                  - 'null'
                description: >-
                  The employee's primary email address, or null when they have
                  none.
            required:
              - employeeId
              - email
          description: Every employee the activity is about.
        title:
          type: string
          description: A short summary of the event.
        body:
          type:
            - string
            - 'null'
          description: Longer text about the event, or null.
        url:
          type:
            - string
            - 'null'
          description: A URL to the event in its source system, or null.
        occurredAt:
          type: string
          format: date-time
          description: When the event happened.
        properties:
          $ref: '#/components/schemas/ActivityProperties'
        tags:
          type: array
          items:
            type: string
          description: Tag names, in ascending order.
        integrationId:
          type:
            - string
            - 'null'
          description: The integration the event came from, or null.
        access:
          $ref: '#/components/schemas/ActivityAccess'
        createdByEmployeeId:
          type:
            - string
            - 'null'
          description: The employee who created the activity, or null when unknown.
        lastUpdatedByEmployeeId:
          type:
            - string
            - 'null'
          description: The employee who last changed the activity, or null when unknown.
        createdAt:
          type: string
          format: date-time
          description: When the activity was first written.
        updatedAt:
          type: string
          format: date-time
          description: When the activity was last written.
      required:
        - id
        - type
        - externalId
        - employees
        - title
        - body
        - url
        - occurredAt
        - properties
        - tags
        - integrationId
        - access
        - createdByEmployeeId
        - lastUpdatedByEmployeeId
        - createdAt
        - updatedAt
    ActivityProperties:
      type: object
      additionalProperties:
        anyOf:
          - type: string
          - type: number
          - type: boolean
          - type: 'null'
          - type: array
            items:
              anyOf:
                - type: string
                - type: number
                - type: boolean
                - type: '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
    ActivityAccess:
      type: object
      properties:
        companyAccess:
          type: string
          enum:
            - none
            - read
            - write
          default: none
          description: '`write` can read and edit; `none` removes the grant.'
        allManagersAccess:
          type: string
          enum:
            - none
            - read
            - write
          default: none
          description: Every employee with at least one report.
        employeeAccess:
          type: array
          items:
            type: object
            properties:
              employeeId:
                type: string
                minLength: 1
              access:
                type: string
                enum:
                  - none
                  - read
                  - write
                description: '`write` can read and edit; `none` removes the grant.'
            required:
              - employeeId
              - access
          default: []
        groupAccess:
          type: array
          items:
            type: object
            properties:
              groupId:
                type: string
                minLength: 1
              access:
                type: string
                enum:
                  - none
                  - read
                  - write
                description: '`write` can read and edit; `none` removes the grant.'
            required:
              - groupId
              - access
          default: []
        subtreeAccess:
          type: array
          items:
            type: object
            properties:
              employeeId:
                type: string
                minLength: 1
              access:
                type: string
                enum:
                  - none
                  - read
                  - write
                description: '`write` can read and edit; `none` removes the grant.'
            required:
              - employeeId
              - access
          default: []
          description: Everyone who reports to the employee, directly or not.
        capabilitiesAccess:
          type: array
          items:
            type: object
            properties:
              capability:
                type: string
                minLength: 1
                description: A workspace member capability.
              access:
                type: string
                enum:
                  - none
                  - read
                  - write
                description: '`write` can read and edit; `none` removes the grant.'
            required:
              - capability
              - access
          default: []
        automationAccess:
          type: array
          items:
            type: object
            properties:
              companyAutomationId:
                type: string
                minLength: 1
              access:
                type: string
                enum:
                  - none
                  - read
                  - write
                description: '`write` can read and edit; `none` removes the grant.'
            required:
              - companyAutomationId
              - access
          default: []
        relationshipAccess:
          type: array
          items:
            type: object
            properties:
              relationship:
                type: string
                enum:
                  - DIRECT_MANAGER
                  - MANAGER_HIERARCHY
                  - EMPLOYEE_AND_MANAGER_HIERARCHY
              employeeId:
                type: string
                minLength: 1
              access:
                type: string
                enum:
                  - none
                  - read
                  - write
                description: '`write` can read and edit; `none` removes the grant.'
            required:
              - relationship
              - employeeId
              - access
          default: []
          description: A grant to whoever holds a reporting relationship to the employee.
      description: >-
        Who can read and edit the activity, as grants. A preset comes back as
        the grants it stands for, and shareWithEmployees as a read grant for
        each employee on the activity. Access always includes write access for
        members with permission to manage activities (`activities.manage`) and,
        when known, for the employee who created the activity.
  securitySchemes:
    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
        <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.


        ```http

        Authorization: Bearer wm_api_example

        ```


        OAuth access tokens are issued for connected Windmill applications.


        ```http

        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.

````

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