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

# List an Account's Activities

> List activities for an account.

Used by the deal "link existing account activity" picker: pass
unlinked_only=true to only return activities that don't already have a
deal_id, so the user can attach orphan account activities to this deal.

Lists activities for one account. Pass `unlinked_only=true` to only return activities that don't already have a `deal_id` — useful for finding account activities that haven't yet been attached to any deal. Rows are a narrower projection than the other list endpoints — no embeds, no `metadata`/`completed_at`/`source`/`direction`.

Returns a bare JSON array — no total-count header, no pagination envelope. `limit` is capped at `500` server-side regardless of what you pass.

### Auth

Requires a CRM read [scope](/authentication#scopes) and an active organization on the token. Any of `contacts:read`, `deals:read`, `companies:read`, or `activities:read` qualifies, as does any `*:manage` scope — manage implies read.

### Response

Array of activity objects, ordered by `created_at` descending:

| Field        | Type                           | Description                                                             |
| ------------ | ------------------------------ | ----------------------------------------------------------------------- |
| `id`         | `string` (uuid)                | Primary key.                                                            |
| `type`       | `string`                       | `note`, `call`, `meeting`, `email`, `task`, or a system-generated type. |
| `subject`    | `string \| null`               | Short headline.                                                         |
| `body`       | `string \| null`               | Free-text content.                                                      |
| `owner_id`   | `string \| null`               | Logto user sub of the owning rep.                                       |
| `deal_id`    | `string \| null` (uuid)        | Linked deal, if any.                                                    |
| `contact_id` | `string \| null` (uuid)        | Linked contact, if any.                                                 |
| `created_at` | `string` (timestamptz)         | Row creation time.                                                      |
| `due_at`     | `string \| null` (timestamptz) | Scheduled time, if set.                                                 |


## OpenAPI

````yaml GET /activities/by-account/{account_id}
openapi: 3.1.0
info:
  title: anycrm-api
  version: 0.0.1
servers: []
security: []
tags:
  - name: Customer Intelligence
    description: >-
      Company research and ICP-fit scoring — create a research run, track its
      progress, and read back scored companies as leads.
  - name: Outreach
    description: >-
      The cold-email management console — domains, mailboxes, and campaigns — as
      a thin control plane over the SalesForge stack.
  - name: AnyCard
    description: >-
      Authenticated CRUD for AnyCard, the org's digital business-card /
      lead-capture product.
  - name: AnyCard Events
    description: >-
      Event-attribution analytics for AnyCard — which captured leads converted,
      broken down by source, owner, and deal.
  - name: AnyCard Share Links
    description: >-
      Unauthenticated endpoints reached by anyone who scans a QR code or opens a
      shared AnyCard link.
  - name: AI
    description: >-
      A streaming (SSE) AI chat endpoint with account-commit actions it can take
      on the caller's behalf.
  - name: Analytics Assistant
    description: >-
      The natural-language analytics assistant — a guarded text-to-SQL loop
      (SSE) that answers ad-hoc questions over the org's CRM data as a
      least-privilege, read-only database role.
  - name: Account Readiness
    description: >-
      Account Readiness Profiles — AI-scored signals on whether an account is
      ready for outreach or expansion, computed via a Temporal workflow.
  - name: Integrations
    description: >-
      Pipedream Connect — issuing connect tokens and managing the org's
      connected third-party accounts.
  - name: Feedback
    description: >-
      User-submitted platform feedback (bug reports, feature requests) — global,
      not scoped to one organization.
  - name: Public Media
    description: >-
      Unauthenticated image reads for publicly-embeddable assets (card photos,
      inline email images) — allowlisted by key shape; everything else in the
      storage bucket stays private.
  - name: Service Health
    description: Service liveness.
paths:
  /activities/by-account/{account_id}:
    get:
      tags:
        - Activities
      summary: List Activities By Account
      description: |-
        List activities for an account.

        Used by the deal "link existing account activity" picker: pass
        unlinked_only=true to only return activities that don't already have a
        deal_id, so the user can attach orphan account activities to this deal.
      operationId: list_activities_by_account_activities_by_account__account_id__get
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: string
            description: The account whose activities to list.
            title: Account Id
          description: The account whose activities to list.
        - name: unlinked_only
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              If true, only return activities with no deal_id — orphan account
              activities available to attach to a deal.
            default: false
            title: Unlinked Only
          description: >-
            If true, only return activities with no deal_id — orphan account
            activities available to attach to a deal.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            description: Maximum rows to return; capped at 500 server-side.
            default: 100
            title: Limit
          description: Maximum rows to return; capped at 500 server-side.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  additionalProperties: true
                  type: object
                title: >-
                  Response List Activities By Account Activities By Account 
                  Account Id  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````