# Fin Agent Conversation Metadata

> This is a subset of the full specification, limited to the `fin_agent_conversation_metadata` schema.
>
> You can find the full specification here: /_bundle/docs/references/@2.15/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.15'
  description: This is a subset of the full specification, limited to the `fin_agent_conversation_metadata` schema.
  contact:
    name: Intercom Developer Hub
    url: https://developers.intercom.com
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
servers:
  - url: https://api.intercom.io
    description: The production API server
  - url: https://api.eu.intercom.io
    description: The european API server
  - url: https://api.au.intercom.io
    description: The australian API server
security:
  - bearerAuth: []
paths: {}
components:
  schemas:
    fin_agent_message:
      title: Fin Agent Message
      type: object
      description: A message exchanged within a Fin Agent conversation.
      x-tags:
        - Fin Agent
      properties:
        author:
          type: string
          enum:
            - user
            - agent
            - fin
          description: The author that created the message.
          example: user
        body:
          type: string
          description: |
            The body of the message. Accepts both plain text and HTML format.
            When sending a message to Fin, this should contain the user's message.
            Fin's response will be returned as HTML.
          example: How can I see my account details?
        timestamp:
          type: string
          format: date-time
          description: |
            The timestamp when the message was created.
            Used to deduplicate messages sent within a 5 minute window.
            Ideally should include milliseconds for higher precision.
          example: '2025-01-24T10:01:20.000Z'
        timestamp_ms:
          type: string
          format: date-time
          description: |
            The timestamp when the message was created, with millisecond precision.
            Only present in webhook event responses (fin_replied).
          example: '2025-01-24T10:01:20.456Z'
      required:
        - author
        - body
        - timestamp
    fin_agent_conversation_metadata:
      title: Fin Agent Conversation Metadata
      type: object
      description: Metadata about the conversation, including history and attributes.
      x-tags:
        - Fin Agent
      properties:
        history:
          type: array
          description: |
            An array of previous messages in the conversation before Fin is initialized.
            This data provides context to Fin and helps generate a better answer.
            Limit to the last 10 messages.
          maxItems: 10
          items:
            $ref: '#/components/schemas/fin_agent_message'
        attributes:
          type: object
          description: |
            A hash of attributes associated with the conversation.
            These attributes can be used by Fin to provide more contextual responses.
            Limit to 20 attributes.
          maxProperties: 20
          additionalProperties: true
          example:
            priority_level: high
            department: sales
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
