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

# Get a contact's sentiment history

> Returns the contact's conversation sentiment over the last 30 days, merged into a
single series across every channel in the company and keyed off the addresses in the
contact's `email` array.

One point per day, oldest first. `score` is the average of the day's streams — each
stream contributes one score, so a long conversation does not outweigh a short one —
rounded to a whole number on a 0-100 scale. `overall` is the recency-weighted average
across the window: today counts fully, a day at the edge of the window counts half.
`totalStreams` counts the distinct conversations in the window, so a conversation
spanning several days is counted once.

A contact with no email addresses, or with no scored conversations in the window,
returns `overall: null` and an empty `history`.




## OpenAPI

````yaml /openapi.yaml get /api/contacts/{contactId}/sentiment
openapi: 3.0.3
info:
  title: Aptly API
  version: '1.0'
  description: |
    The Aptly API lets external systems work with boards, contacts, inboxes,
    tasks, files, and other Aptly resources.

    Most endpoints accept an API key in the `x-token` header. Some endpoints
    also accept a delegate token or partner bearer token, as shown in each
    operation's security requirements, and explicitly public endpoints require
    no credential. API keys are scoped to a company and may be restricted to
    specific boards and read, insert, or update permissions; requests outside
    those restrictions receive a 403 `FORBIDDEN` response.
servers:
  - url: https://core-api.getaptly.com
    description: Production
security:
  - ApiKeyHeader: []
paths:
  /api/contacts/{contactId}/sentiment:
    get:
      tags:
        - Contacts
      summary: Get a contact's sentiment history
      description: >
        Returns the contact's conversation sentiment over the last 30 days,
        merged into a

        single series across every channel in the company and keyed off the
        addresses in the

        contact's `email` array.


        One point per day, oldest first. `score` is the average of the day's
        streams — each

        stream contributes one score, so a long conversation does not outweigh a
        short one —

        rounded to a whole number on a 0-100 scale. `overall` is the
        recency-weighted average

        across the window: today counts fully, a day at the edge of the window
        counts half.

        `totalStreams` counts the distinct conversations in the window, so a
        conversation

        spanning several days is counted once.


        A contact with no email addresses, or with no scored conversations in
        the window,

        returns `overall: null` and an empty `history`.
      operationId: getContactSentiment
      parameters:
        - name: contactId
          in: path
          required: true
          schema:
            type: string
          description: The contact's `_id`.
      responses:
        '200':
          description: Sentiment history for the contact.
          content:
            application/json:
              schema:
                type: object
                properties:
                  overall:
                    type: integer
                    nullable: true
                    description: Recency-weighted average score (0-100) across the window.
                  totalStreams:
                    type: integer
                    description: Distinct conversations behind the window.
                  history:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                          format: date-time
                        score:
                          type: integer
                          description: Average score (0-100) for the day.
                        streams:
                          type: integer
                          description: Distinct conversations behind the day.
              example:
                overall: 76
                totalStreams: 2
                history:
                  - date: '2026-08-15T00:00:00.000Z'
                    score: 40
                    streams: 2
                  - date: '2026-09-04T00:00:00.000Z'
                    score: 100
                    streams: 1
        '401':
          description: Invalid or missing API key.
        '404':
          description: Contact not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyHeader: []
        - DelegateToken: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-token
    DelegateToken:
      type: apiKey
      in: header
      name: Authorization
      description: 'Delegate token issued by the platform. Format: `DelegateToken <token>`'

````