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

# Save messages

> Save a new set of messages



## OpenAPI

````yaml https://dev.tight.com/v3/api-docs post /v6/messages
openapi: 3.0.1
info:
  title: Tight API
  contact:
    name: Hurdlr, Inc. (dba Tight)
    url: https://www.tight.com
    email: api@tight.com
  version: 6.0.0
servers:
  - url: https://sandbox.tight.com
    description: Staging Environment
  - url: https://prod.tight.com
    description: Production Environment
security:
  - EmbedToken: []
paths:
  /v6/messages:
    post:
      tags:
        - Messages
      summary: Save messages
      description: Save a new set of messages
      operationId: createMessage
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MultiParamMessagePostDto'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseListMultiResponseMessageGetDto'
        '207':
          description: Some messages failed to save. See response body for error details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseListMultiResponseMessageGetDto'
        '400':
          description: All messages failed to save.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseListMultiResponseMessageGetDto'
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                result: FAILURE
                error:
                  - type: INVALID_TOKEN
                    message: Invalid access token
        '403':
          description: Not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                result: FAILURE
                error:
                  - type: FORBIDDEN
                    message: Expired access token
        '404':
          description: Endpoint not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                result: FAILURE
                error:
                  - type: BAD_REQUEST
                    message: Resource not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                result: FAILURE
                error:
                  - type: UNKNOWN_ERROR
                    message: Something went wrong. Please try again later.
      security:
        - EmbedToken: []
components:
  schemas:
    MultiParamMessagePostDto:
      required:
        - data
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MessagePostDto'
    ResponseListMultiResponseMessageGetDto:
      type: object
      properties:
        result:
          type: string
          description: The result of the action performed.
          enum:
            - SUCCESS
            - FAILURE
        data:
          type: array
          description: The data generated by the action performed.
          items:
            $ref: '#/components/schemas/MultiResponseMessageGetDto'
        error:
          type: array
          items:
            $ref: '#/components/schemas/ErrorItem'
    ErrorResponse:
      type: object
      properties:
        result:
          type: string
          description: The result of the action performed.
          enum:
            - SUCCESS
            - FAILURE
        data:
          type: object
          description: The data generated by the action performed.
          nullable: true
        error:
          type: array
          items:
            $ref: '#/components/schemas/ErrorItem'
    MessagePostDto:
      required:
        - conversationId
      type: object
      properties:
        conversationId:
          type: string
          description: Id of the conversation to attach the message to
          example: con_12345
        text:
          maxLength: 65535
          minLength: 0
          type: string
          description: The contents of a message. Optional if attachmentIds are provided.
        attachmentIds:
          type: array
          description: >-
            List of attachment IDs to associate with this message. Optional if
            text is provided.
          items:
            type: string
            description: >-
              List of attachment IDs to associate with this message. Optional if
              text is provided.
    MultiResponseMessageGetDto:
      type: object
      properties:
        result:
          type: string
          description: The result of the action performed.
          enum:
            - SUCCESS
            - FAILURE
        statusCode:
          $ref: '#/components/schemas/HttpStatus'
        data:
          $ref: '#/components/schemas/MessageGetDto'
        error:
          type: array
          items:
            $ref: '#/components/schemas/ErrorItem'
      description: The data generated by the action performed.
    ErrorItem:
      type: object
      properties:
        type:
          type: string
          description: The type of the error. Safe for programmatic use.
          enum:
            - UNKNOWN_ERROR
            - INVALID_TOKEN
            - EXPIRED_TOKEN
            - FORBIDDEN
            - BAD_REQUEST
            - JSON_ERROR
            - DUPLICATE
            - REQUIRED
            - INVALID_VALUE
            - NOT_MODIFIABLE
            - INVALID_FORMAT
            - NOT_FOUND
        message:
          type: string
          description: >-
            A human-readable message providing more details about the error.
            Safe for displaying to a user.
        param:
          type: string
          description: >-
            If the error is parameter-specific, the parameter related to the
            error. This can be used to display a message near the correct form
            field.
      description: Errors associated with the action performed, if applicable.
    HttpStatus:
      type: integer
      description: The HTTP status code for the action performed.
      format: int32
      enum:
        - 200
        - 400
        - 401
        - 403
        - 404
        - 500
    MessageGetDto:
      required:
        - attachments
        - author
        - conversationId
        - createdDateTime
        - id
        - lastUpdatedDateTime
        - reactions
        - status
        - text
      type: object
      properties:
        id:
          type: string
          description: Id of the message, required when updating an existing message
          example: msg_67890
        conversationId:
          type: string
          description: Id of the conversation associated with this message
        author:
          $ref: '#/components/schemas/AuthorInfo'
        text:
          type: string
          description: Content of the message
          example: Let's discuss the new feature requirements
        status:
          type: string
          description: Status of the message
          example: ACTIVE
          enum:
            - ACTIVE
            - INACTIVE
            - REMOVED
        createdDateTime:
          type: string
          description: Timestamp of when the message was created
          format: date-time
        lastUpdatedDateTime:
          type: string
          description: Timestamp of when the message was last updated
          format: date-time
        reactions:
          type: array
          description: Reactions on this message
          items:
            $ref: '#/components/schemas/ReactionSummaryDto'
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/MessageAttachmentExpanded'
      description: The data generated by the action performed.
    AuthorInfo:
      required:
        - email
        - userId
      type: object
      properties:
        userId:
          type: string
          description: Id of the author
        email:
          type: string
          description: Email of the author
          nullable: true
          example: user@example.com
      description: List of authors who used this reaction
    ReactionSummaryDto:
      required:
        - authorInfo
        - emojiCode
      type: object
      properties:
        emojiCode:
          type: string
          description: Emoji code for this reaction
          enum:
            - thumbs_up
            - thumbs_down
            - eyes
            - red_heart
            - hundred_points
        authorInfo:
          type: array
          description: List of authors who used this reaction
          items:
            $ref: '#/components/schemas/AuthorInfo'
      description: Reactions on this message
    MessageAttachmentExpanded:
      required:
        - id
      type: object
      properties:
        id:
          type: string
          description: Id of the attachment
          example: att_894321
        url:
          type: string
          description: URL at which the attachment is located
          example: https://files.example.com/attachment/receipt.pdf
        fileName:
          type: string
          description: File name of attachment
          example: receipt.pdf
        fileSize:
          type: string
          description: File size of attachment
          example: 24 KB
        createdDateTime:
          type: string
          description: Date that attachment was uploaded
          format: date-time
        iconUrl:
          type: string
          description: Icon URL based on file extension
          example: https://cdn.sandbox.tight.com/icons/attachments/pdf.svg
      description: List of attachments associated with this message
  securitySchemes:
    EmbedToken:
      type: http
      description: >-
        Bearer authentication header of the form `Bearer <token>`, see
        [Authentication for more
        detail](/api-reference/authentication#partner-level-authentication).
      scheme: bearer

````