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

# Delete a message



## OpenAPI

````yaml /api-reference/openapi.json delete /v1/channels/{channelId}/messages/{messageId}
openapi: 3.1.0
info:
  title: Mantle Platform API
  version: 1.0.0-beta.1
  description: >-
    Agents and their change sets, task runs, agent responses, outbound webhooks,
    and bots that post with their own tokens. Most endpoints take a workspace
    API key; bot endpoints take a bot token.
servers:
  - url: https://api.mantle.chat
    description: Production
security: []
tags:
  - name: Agents
  - name: Agent drafts
  - name: Agent change-set mutations
  - name: Agent change sets
  - name: Tasks
  - name: Runs
  - name: Agent responses
    description: >-
      Single-turn private responses using a saved agent. Requires explicit
      invoke/read scopes and workspace pilot enablement. No browser conversation
      or task is created.
  - name: Webhooks
  - name: Bots
paths:
  /v1/channels/{channelId}/messages/{messageId}:
    delete:
      tags:
        - Bots
      summary: Delete a message
      operationId: bot.deleteChannelMessage
      parameters:
        - name: channelId
          in: path
          schema:
            type: string
            allOf:
              - pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
                format: uuid
          required: true
        - name: messageId
          in: path
          schema:
            type: string
            allOf:
              - pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
                format: uuid
          required: true
      responses:
        '204':
          description: <No Content>
        '401':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        anyOf:
                          - type: string
                            enum:
                              - invalid_token
                      message:
                        type: string
                        allOf:
                          - minLength: 1
                          - maxLength: 256
                      requestId:
                        type: string
                        allOf:
                          - minLength: 1
                          - maxLength: 128
                      details:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                              allOf:
                                - maxLength: 256
                            - anyOf:
                                - type: number
                                - type: string
                                  enum:
                                    - NaN
                                - type: string
                                  enum:
                                    - Infinity
                                - type: string
                                  enum:
                                    - '-Infinity'
                            - type: boolean
                            - type: 'null'
                    required:
                      - code
                      - message
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '403':
          description: Error
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - not_in_channel
                              - not_author
                          message:
                            type: string
                            allOf:
                              - minLength: 1
                              - maxLength: 256
                          requestId:
                            type: string
                            allOf:
                              - minLength: 1
                              - maxLength: 128
                          details:
                            type: object
                            additionalProperties:
                              anyOf:
                                - type: string
                                  allOf:
                                    - maxLength: 256
                                - anyOf:
                                    - anyOf:
                                        - type: number
                                        - type: string
                                          enum:
                                            - NaN
                                        - type: string
                                          enum:
                                            - Infinity
                                        - type: string
                                          enum:
                                            - '-Infinity'
                                    - type: string
                                      enum:
                                        - Infinity
                                        - '-Infinity'
                                        - NaN
                                - type: boolean
                                - type: 'null'
                        required:
                          - code
                          - message
                          - requestId
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - app_paused
                              - insufficient_scope
                              - workspace_not_enabled
                          message:
                            type: string
                            allOf:
                              - minLength: 1
                              - maxLength: 256
                          requestId:
                            type: string
                            allOf:
                              - minLength: 1
                              - maxLength: 128
                          details:
                            type: object
                            additionalProperties:
                              anyOf:
                                - type: string
                                  allOf:
                                    - maxLength: 256
                                - anyOf:
                                    - type: number
                                    - type: string
                                      enum:
                                        - NaN
                                    - type: string
                                      enum:
                                        - Infinity
                                    - type: string
                                      enum:
                                        - '-Infinity'
                                - type: boolean
                                - type: 'null'
                        required:
                          - code
                          - message
                          - requestId
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
        '404':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - channel_not_found
                          - message_not_found
                      message:
                        type: string
                        allOf:
                          - minLength: 1
                          - maxLength: 256
                      requestId:
                        type: string
                        allOf:
                          - minLength: 1
                          - maxLength: 128
                      details:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                              allOf:
                                - maxLength: 256
                            - anyOf:
                                - anyOf:
                                    - type: number
                                    - type: string
                                      enum:
                                        - NaN
                                    - type: string
                                      enum:
                                        - Infinity
                                    - type: string
                                      enum:
                                        - '-Infinity'
                                - type: string
                                  enum:
                                    - Infinity
                                    - '-Infinity'
                                    - NaN
                            - type: boolean
                            - type: 'null'
                    required:
                      - code
                      - message
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '409':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        anyOf:
                          - type: string
                            enum:
                              - channel_archived
                      message:
                        type: string
                        allOf:
                          - minLength: 1
                          - maxLength: 256
                      requestId:
                        type: string
                        allOf:
                          - minLength: 1
                          - maxLength: 128
                      details:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                              allOf:
                                - maxLength: 256
                            - anyOf:
                                - anyOf:
                                    - type: number
                                    - type: string
                                      enum:
                                        - NaN
                                    - type: string
                                      enum:
                                        - Infinity
                                    - type: string
                                      enum:
                                        - '-Infinity'
                                - type: string
                                  enum:
                                    - Infinity
                                    - '-Infinity'
                                    - NaN
                            - type: boolean
                            - type: 'null'
                    required:
                      - code
                      - message
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '429':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        anyOf:
                          - type: string
                            enum:
                              - rate_limited
                      message:
                        type: string
                        allOf:
                          - minLength: 1
                          - maxLength: 256
                      requestId:
                        type: string
                        allOf:
                          - minLength: 1
                          - maxLength: 128
                      details:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                              allOf:
                                - maxLength: 256
                            - anyOf:
                                - type: number
                                - type: string
                                  enum:
                                    - NaN
                                - type: string
                                  enum:
                                    - Infinity
                                - type: string
                                  enum:
                                    - '-Infinity'
                            - type: boolean
                            - type: 'null'
                    required:
                      - code
                      - message
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '500':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        anyOf:
                          - type: string
                            enum:
                              - delete_failed
                      message:
                        type: string
                        allOf:
                          - minLength: 1
                          - maxLength: 256
                      requestId:
                        type: string
                        allOf:
                          - minLength: 1
                          - maxLength: 128
                      details:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                              allOf:
                                - maxLength: 256
                            - anyOf:
                                - anyOf:
                                    - type: number
                                    - type: string
                                      enum:
                                        - NaN
                                    - type: string
                                      enum:
                                        - Infinity
                                    - type: string
                                      enum:
                                        - '-Infinity'
                                - type: string
                                  enum:
                                    - Infinity
                                    - '-Infinity'
                                    - NaN
                            - type: boolean
                            - type: 'null'
                    required:
                      - code
                      - message
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '503':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        anyOf:
                          - type: string
                            enum:
                              - service_unavailable
                      message:
                        type: string
                        allOf:
                          - minLength: 1
                          - maxLength: 256
                      requestId:
                        type: string
                        allOf:
                          - minLength: 1
                          - maxLength: 128
                      details:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                              allOf:
                                - maxLength: 256
                            - anyOf:
                                - type: number
                                - type: string
                                  enum:
                                    - NaN
                                - type: string
                                  enum:
                                    - Infinity
                                - type: string
                                  enum:
                                    - '-Infinity'
                            - type: boolean
                            - type: 'null'
                    required:
                      - code
                      - message
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.