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

# Send a message

> Send a message on a thread. The channel (email, Slack, live chat, Microsoft Teams) is auto-detected from the thread's origin and the response includes the channel that was used. Returns 400 with code `validation_failed` when the matching integration is not configured for the workspace. Requires the messages:write scope.



## OpenAPI

````yaml openapi-v2.json post /threads/{thread_id}/messages
openapi: 3.0.3
info:
  title: Productlane API
  description: Productlane API v2.
  version: 2.0.0
servers:
  - url: https://productlane.com/api/v2
security: []
paths:
  /threads/{thread_id}/messages:
    post:
      tags:
        - threads
      summary: Send a message
      description: >-
        Send a message on a thread. The channel (email, Slack, live chat,
        Microsoft Teams) is auto-detected from the thread's origin and the
        response includes the channel that was used. Returns 400 with code
        `validation_failed` when the matching integration is not configured for
        the workspace. Requires the messages:write scope.
      operationId: threads-sendMessage
      parameters:
        - name: thread_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  minLength: 1
                  description: Message body (HTML).
                cc:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        default: ''
                      email:
                        type: string
                        format: email
                        maxLength: 254
                      mailboxHash:
                        type: string
                        default: ''
                    required:
                      - email
                    additionalProperties: false
                  description: Applied only to email-channel threads.
                bcc:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        default: ''
                      email:
                        type: string
                        format: email
                        maxLength: 254
                      mailboxHash:
                        type: string
                        default: ''
                    required:
                      - email
                    additionalProperties: false
                  description: Applied only to email-channel threads.
                attachments:
                  type: array
                  items:
                    type: object
                    properties:
                      Name:
                        type: string
                        minLength: 1
                      ContentType:
                        type: string
                        minLength: 1
                      Content:
                        type: string
                        description: Publicly fetchable https URL of the file to attach.
                      ContentLength:
                        type: integer
                        minimum: 0
                        nullable: true
                      ContentID:
                        type: string
                    required:
                      - Name
                      - ContentType
                      - Content
                    additionalProperties: false
                  description: Applied only to email-channel threads.
                channel_id:
                  type: string
                  description: >-
                    Slack channel id. Required for Slack threads unless one is
                    stored on the thread.
              required:
                - content
              additionalProperties: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  thread_id:
                    type: string
                  channel:
                    type: string
                    enum:
                      - email
                      - slack
                      - live_chat
                      - teams
                required:
                  - id
                  - thread_id
                  - channel
                additionalProperties: false
        default:
          $ref: '#/components/responses/error'
      security:
        - Authorization: []
components:
  responses:
    error:
      description: Error response
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              code:
                type: string
              issues:
                type: array
                items:
                  type: object
                  properties:
                    message:
                      type: string
                  required:
                    - message
                  additionalProperties: false
            required:
              - message
              - code
            additionalProperties: false
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````