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

# Log an Activity on an Account

> Log an activity (note, call, meeting, email, task) on an account.

Mirrors POST /deals/{id}/activities. Reuses rpc_create_activity since
accounts have no last_activity_at column to bump (unlike deals).

TODO: when an activity has account_id but no deal_id, a future Temporal
workflow can suggest deal candidates by matching attendees / context.

Logs a note, call, meeting, email, or task against this account. This is the account-scoped twin of `POST /deals/{id}/activities`; unlike the deal version, there's no `last_activity_at` column on accounts to bump. The `type` field isn't restricted to a fixed enum at the API layer — any string is accepted, though in practice it's one of `note`, `call`, `meeting`, `email`, or `task`.

<Note>The shared activity body also accepts a `direction` field (used by the deals version of this endpoint), but this account endpoint silently ignores it — it's never passed through to the database write, so it has no effect here.</Note>

### Auth

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

### Response

| Field | Type            | Description            |
| ----- | --------------- | ---------------------- |
| `id`  | `string` (uuid) | The new activity's id. |


## OpenAPI

````yaml POST /accounts/{account_id}/activities
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:
  /accounts/{account_id}/activities:
    post:
      tags:
        - Accounts
      summary: Log Account Activity
      description: |-
        Log an activity (note, call, meeting, email, task) on an account.

        Mirrors POST /deals/{id}/activities. Reuses rpc_create_activity since
        accounts have no last_activity_at column to bump (unlike deals).

        TODO: when an activity has account_id but no deal_id, a future Temporal
        workflow can suggest deal candidates by matching attendees / context.
      operationId: log_account_activity_accounts__account_id__activities_post
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: string
            description: The account's id.
            title: Account Id
          description: The account's id.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActivityBody'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ActivityBody:
      properties:
        type:
          type: string
          title: Type
          description: 'Activity type: note, call, meeting, email, or task.'
          default: note
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
          description: Short headline for the activity; stored as the subject column.
        body:
          anyOf:
            - type: string
            - type: 'null'
          title: Body
          description: Free-text body/notes content.
        direction:
          anyOf:
            - type: string
            - type: 'null'
          title: Direction
          description: Direction for calls/emails, e.g. inbound or outbound.
        contact_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact Id
          description: Contact this activity is associated with.
        due_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Due At
          description: >-
            ISO 8601 scheduled time. Persisted for any activity type, not just
            meetings, and it drives the generated effective_time column
            (COALESCE(due_at, created_at)) that the activity feed sorts by and
            that exclude_future filters on.
        duration_minutes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Minutes
          description: >-
            Duration in minutes. Persisted for any activity type, not just
            meetings.
        attendees:
          anyOf:
            - items:
                $ref: '#/components/schemas/MeetingAttendee'
              type: array
            - type: 'null'
          title: Attendees
          description: >-
            Attendee list, stored in metadata. Persisted for any activity type,
            not just meetings.
        transcript:
          anyOf:
            - type: string
            - type: 'null'
          title: Transcript
          description: >-
            Transcript text, stored in metadata. Persisted for any activity
            type, not just meetings.
        recording_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Recording Url
          description: >-
            Absolute http(s) URL to a recording, stored in metadata. Persisted
            for any activity type, not just meetings.
        location:
          anyOf:
            - type: string
            - type: 'null'
          title: Location
          description: >-
            Location or video-call link, stored in metadata. Persisted for any
            activity type, not just meetings.
        provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider
          description: >-
            Source provider, e.g. gcal, zoom, teams, or manual, stored in
            metadata. Persisted for any activity type, not just meetings.
      type: object
      title: ActivityBody
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MeetingAttendee:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Attendee's display name.
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
          description: Attendee's email address.
      type: object
      title: MeetingAttendee
    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

````