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

# List activities

> Retrieve an activity timeline for the org, sorted by creation date (newest first). Filter by any combination of contact, table, record, actor, assistant, or segment.



## OpenAPI

````yaml https://api.useinvent.com/openapi.json get /orgs/{org_id}/activities
openapi: 3.1.0
info:
  version: 1.0.0
  title: Invent API
servers:
  - url: https://api.useinvent.com
security:
  - bearerAuth: []
paths:
  /orgs/{org_id}/activities:
    get:
      tags:
        - Orgs Activities
      summary: List activities
      description: >-
        Retrieve an activity timeline for the org, sorted by creation date
        (newest first). Filter by any combination of contact, table, record,
        actor, assistant, or segment.
      parameters:
        - schema:
            type: string
          required: true
          description: Org ID
          name: org_id
          in: path
        - schema:
            $ref: '#/components/schemas/ActivityTypeSchema'
          required: false
          description: Schema for the type of an activity event
          name: type
          in: query
        - schema:
            type: string
            description: Filter to activities scoped to this contact.
          required: false
          description: Filter to activities scoped to this contact.
          name: contact_id
          in: query
        - schema:
            type: string
            description: Filter to activities scoped to this table.
          required: false
          description: Filter to activities scoped to this table.
          name: table_id
          in: query
        - schema:
            type: string
            description: Filter to activities scoped to this table record.
          required: false
          description: Filter to activities scoped to this table record.
          name: record_id
          in: query
        - schema:
            type: string
            description: Filter to activities performed by this user.
          required: false
          description: Filter to activities performed by this user.
          name: actor_id
          in: query
        - schema:
            type: string
            description: Filter to activities performed by this assistant.
          required: false
          description: Filter to activities performed by this assistant.
          name: assistant_id
          in: query
        - schema:
            type: string
            description: Filter to activities involving this segment.
          required: false
          description: Filter to activities involving this segment.
          name: segment_id
          in: query
        - schema:
            type: number
          required: false
          description: Page number
          name: page
          in: query
        - schema:
            type: number
          required: false
          description: Number of items to take
          name: take
          in: query
        - schema:
            type: string
          required: false
          description: Next page token (Only used on special endpoints)
          name: next
          in: query
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ActivitySchema'
components:
  schemas:
    ActivityTypeSchema:
      type: string
      enum:
        - comment_created
        - file_uploaded
        - segment_added
        - segment_removed
        - contact_blocked
        - contact_unblocked
        - contact_unsubscribed
        - contact_resubscribed
        - contact_ai_replies_disabled
        - contact_ai_replies_enabled
        - contact_updated
      description: Schema for the type of an activity event
    ActivitySchema:
      type: object
      properties:
        id:
          type: string
        type:
          $ref: '#/components/schemas/ActivityTypeSchema'
        actor:
          allOf:
            - $ref: '#/components/schemas/UserLimitedSchema'
            - description: Schema for a limited user
        assistant:
          $ref: '#/components/schemas/ActivityAssistantSchema'
        segment:
          $ref: '#/components/schemas/SegmentSchema'
        broadcast:
          allOf:
            - $ref: '#/components/schemas/BroadcastPublicSchema'
            - description: Public information about a broadcast
        comment:
          type:
            - string
            - 'null'
          description: Comment body when type='comment' (null/undefined otherwise)
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/FileSchema'
          description: Files attached to the comment when type='comment'
        file:
          $ref: '#/components/schemas/FileSchema'
        metadata:
          $ref: '#/components/schemas/ActivityMetadataSchema'
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - type
        - created_at
        - updated_at
      description: Schema for a timeline activity event
    UserLimitedSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type:
            - string
            - 'null'
        email:
          type: string
          format: email
        avatar:
          type:
            - string
            - 'null'
        seen_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - name
        - email
        - avatar
        - seen_at
      description: The assigned user for the conversation
    ActivityAssistantSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        avatar_url:
          type:
            - string
            - 'null'
      required:
        - id
        - name
        - avatar_url
      description: Schema for an assistant actor in an activity
    SegmentSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        color:
          $ref: '#/components/schemas/ColorNameSchema'
        contacts_count:
          type: number
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - name
        - color
        - contacts_count
        - created_at
        - updated_at
      description: Schema for the segment
    BroadcastPublicSchema:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the broadcast
        name:
          type: string
          description: Name of the broadcast
      required:
        - id
        - name
      description: Affected broadcast
    FileSchema:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the file
        file_path:
          type: string
          maxLength: 2048
          description: Path to the file in the storage system
        file_filename:
          type: string
          maxLength: 255
          description: Name of the file
          example: document.pdf
        file_size:
          type: number
          description: Size of the file in bytes
          example: 1024
        file_mimetype:
          type: string
          maxLength: 255
          description: MIME type of the file
          example: application/pdf
        file_url:
          type: string
          maxLength: 2048
          description: URL to access the file
        created_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Timestamp when the file was created
      required:
        - id
        - file_path
        - file_filename
        - file_size
        - file_mimetype
        - file_url
        - created_at
      description: Detailed information about a file
    ActivityMetadataSchema:
      oneOf:
        - $ref: '#/components/schemas/ContactUpdatedMetadataSchema'
      discriminator:
        propertyName: type
        mapping:
          contact_updated:
            $ref: '#/components/schemas/ContactUpdatedMetadataSchema'
      description: >-
        Activity metadata payload. Discriminated by `type`, which mirrors the
        parent activity row `type`.
    ColorNameSchema:
      type: string
      enum:
        - red
        - orange
        - amber
        - yellow
        - lime
        - green
        - teal
        - cyan
        - sky
        - blue
        - indigo
        - violet
        - purple
        - fuchsia
        - pink
        - rose
        - neutral
      description: The name of the color to use in the UI
    ContactUpdatedMetadataSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - contact_updated
        changes:
          type: array
          items:
            $ref: '#/components/schemas/ContactUpdatedChangeSchema'
          minItems: 1
      required:
        - type
        - changes
      description: Metadata payload for the `contact_updated` activity type
    ContactUpdatedChangeSchema:
      type: object
      properties:
        key:
          type: string
          description: >-
            Field key. Built-in fields use `name`/`email`/`phone`. Custom
            contact properties are prefixed with `properties.` (e.g.
            `properties.dob`).
        old_value: {}
        new_value: {}
      required:
        - key
      description: A single field change recorded on a contact_updated activity
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer token authentication using your API key

````