# Create Conversation

Called when a new conversation has been created via the Fin Messenger.
Note we provide the initial message from the conversation as we know many help desks require this to be provided when creating a conversation.
The response requires both the conversation object and the message object so that these can be mapped correctly to their Fin equivalents.

Endpoint: POST /conversation
Version: 0.0.1
Security: BearerAuth

## Request fields (application/json):

  - `title` (string)
    Conversation title (may be blank)
    Example: Question about pricing

  - `user_id` (string)
    ID of the end-user in your system
    Example: user_123

  - `object_id` (string)
    Unique identifier for the conversation in our system
    Example: 123456

  - `initial_message` (object)

  - `initial_message.conversation_id` (string)
    ID of the parent conversation
    Example: conv_456

  - `initial_message.message_type` (string)
    Type of message
    Enum: "comment"

  - `initial_message.body` (string)
    Message content in HTML format.
Supported HTML tags are:
- Paragraphs `<p>`
- Heading 1, Heading 2 `<h1>` `<h2>` (note h3 to h6 appears as a h2)
- Bold `<b>`
- Italic `<i>`
- Links `<a>`
- Images `<img>` (can be linked)
- Line breaks `<br>`
- Code blocks `<code>`
- Unordered lists `<ul>`
- Ordered lists `<ol>`
    Example: <p>Hi! I'd like to know more about your pricing plans.</p>

  - `initial_message.author` (object)
    The user who authored the message.

  - `initial_message.author.id` (string)
    Unique identifier for the user in your system
    Example: user_123456

  - `initial_message.author.user_type` (string)
    Type of user
    Enum: "end_user", "agent"

  - `initial_message.visibility` (string)
    Message visibility
    Enum: "public", "private"

  - `initial_message.created_at` (string)
    ISO 8601 timestamp
    Example: 2025-10-27T14:30:00.000Z

  - `initial_message.object_id` (string)
    Unique identifier for the message in our system
    Example: 123456

  - `initial_message.attachments` (array)
    Array of attachments (can be empty)

  - `initial_message.attachments.url` (string)
    URL where the attachment can be accessed.
Must be HTTPS. Consider using signed URLs with expiration for sensitive files.
    Example: https://example.com/files/pricing-guide.pdf

  - `initial_message.attachments.filetype` (string)
    File type/extension.
    Example: pdf

  - `initial_message.attachments.filename` (string)
    Display name for the file
    Example: Pricing Guide 2025

## Response 201 fields (application/json):

  - `conversation` (object, required)

  - `conversation.id` (string, required)
    Unique identifier for the conversation in your system
    Example: conv_456

  - `conversation.status` (string, required)
    Current conversation status:
- `open` - Conversation is actively ongoing with the end-user
- `resolved` - Conversation is resolved by Fin
- `closed` - Conversation is finished/archived
- `ended` - Conversation is ended by the end-user or agent
    Enum: "open", "resolved", "closed", "ended"

  - `conversation.user` (object, required)
    End user having a conversation with Fin or with an agent.

  - `conversation.user.id` (string, required)
    Unique identifier for the user in your system
    Example: user_123456

  - `conversation.user.user_type` (string, required)
    Type of user
    Enum: "end_user"

  - `conversation.user.name` (string)
    User's display name
    Example: Jane Doe

  - `conversation.user.email` (string)
    User's email address
    Example: jane.doe@example.com

  - `conversation.user.photo_url` (string)
    URL to user's avatar/profile picture (displayed in Fin Messenger)
    Example: https://example.com/avatars/jane.jpg

  - `conversation.title` (string)
    Conversation title or subject
    Example: Question about pricing plans

  - `conversation.tags` (array)
    List of tags associated with the conversation in your system. Can be used to power routing within the Fin workflow among other things.
    Example: ["pricing","sales"]

  - `conversation.assignee` (object)
    Agent having a conversation with an end-user.

  - `conversation.assignee.id` (string)
    Unique identifier for the user in your system
    Example: agent_123456

  - `conversation.assignee.user_type` (string)
    Type of user
    Enum: "agent"

  - `conversation.assignee.name` (string)
    User's display name
    Example: Jane Doe

  - `conversation.assignee.email` (string)
    User's email address
    Example: jane.doe@example.com

  - `conversation.assignee.photo_url` (string)
    URL to user's avatar/profile picture (displayed in Fin Messenger)
    Example: https://example.com/avatars/jane.jpg

  - `conversation.assignee.alias` (string)
    Agent's display alias (shown to end-users instead of real name)
    Example: Support Jane

  - `conversation.created_at` (string, required)
    When the conversation was created (ISO 8601 UTC)
    Example: 2025-10-27T14:30:00.000Z

  - `conversation.updated_at` (string, required)
    When the conversation was last updated (ISO 8601 UTC)
    Example: 2025-10-27T15:45:00.000Z

  - `initial_message` (object, required)

  - `initial_message.id` (string, required)
    Unique identifier for the message in your system
    Example: msg_001

  - `initial_message.conversation_id` (string, required)
    ID of the parent conversation
    Example: conv_456

  - `initial_message.message_type` (string, required)
    Type of message
    Enum: "comment"

  - `initial_message.body` (string, required)
    Message content in HTML format
    Example: <p>Thank you for reaching out! I'd be happy to explain our pricing plans.</p>

  - `initial_message.author` (any, required)
    The user who authored the message.

  - `initial_message.visibility` (string, required)
    Who can see the message:
- `public` - Visible to end-users (appears in Fin Messenger)
- `private` - Only visible to agents (internal notes)
    Enum: "public", "private"

  - `initial_message.created_at` (string, required)
    When the message was created (ISO 8601 UTC)
    Example: 2025-10-27T14:35:00.000Z

  - `initial_message.attachments` (array)
    Files attached to the message

  - `initial_message.attachments.url` (string)
    URL where the attachment can be accessed.
Must be HTTPS. Consider using signed URLs with expiration for sensitive files.
    Example: https://example.com/files/pricing-guide.pdf

  - `initial_message.attachments.filetype` (string)
    File type/extension.
    Example: pdf

  - `initial_message.attachments.filename` (string)
    Display name for the file
    Example: Pricing Guide 2025

