> ## Documentation Index
> Fetch the complete documentation index at: https://portkey-docs-chore-model-provisioning-beta-feature-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Modify message



## OpenAPI

````yaml https://raw.githubusercontent.com/PaloAltoNetworks/openapi/refs/heads/main/openapi.yaml post /threads/{thread_id}/messages/{message_id}
openapi: 3.0.0
info:
  title: Prisma AIRS AI Gateway API
  version: 3.0.0
  description: ''
servers:
  - url: https://aigw.portkey.ai/v1
    description: Managed
  - url: https://self-hosted-gateway-url.example.com/v1
    description: Self-hosted -- replace with your own gateway host
security:
  - Authorization: []
tags:
  - name: Assistants
    description: ''
  - name: Audio
    description: ''
  - name: Batch
    description: ''
  - name: Chat
    description: ''
  - name: Completions
    description: ''
  - name: Embeddings
    description: ''
  - name: Files
    description: ''
  - name: Fine-Tuning
    description: ''
  - name: Images
    description: ''
  - name: Model Pricing
    description: ''
  - name: Models
    description: ''
  - name: Moderations
    description: ''
  - name: OCR
    description: ''
  - name: Realtime
    description: ''
  - name: Rerank
    description: ''
  - name: Responses
    description: ''
  - name: Vector Stores
    description: ''
  - name: Configs
    description: ''
  - name: Guardrails
    description: ''
  - name: Integrations
    description: ''
  - name: Integrations > Models
    description: ''
  - name: Integrations > Workspaces
    description: ''
  - name: Providers
    description: ''
  - name: Secret References
    description: ''
  - name: MCP Integrations
    description: ''
  - name: MCP Integrations > Capabilities
    description: ''
  - name: MCP Integrations > Metadata
    description: ''
  - name: MCP Integrations > Workspaces
    description: ''
  - name: MCP Servers
    description: ''
  - name: MCP Servers > Capabilities
    description: ''
  - name: MCP Servers > Connections
    description: ''
  - name: MCP Servers > User Access
    description: ''
  - name: API Keys
    description: ''
  - name: Deployments
    description: ''
  - name: Org Guardrails
    description: ''
  - name: Rate Limit Policies
    description: ''
  - name: Usage Limit Policies
    description: ''
  - name: Analytics > Graphs
    description: ''
  - name: Analytics > Groups
    description: ''
  - name: Analytics > Summary
    description: ''
  - name: Feedback
    description: ''
  - name: Logs
    description: ''
paths:
  /threads/{thread_id}/messages/{message_id}:
    post:
      tags:
        - Assistants
      operationId: modifyMessage
      parameters:
        - in: path
          name: thread_id
          required: true
          schema:
            type: string
        - in: path
          name: message_id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModifyMessageRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageObject'
components:
  schemas:
    ModifyMessageRequest:
      type: object
      additionalProperties: false
      properties:
        metadata:
          type: object
          x-oaiTypeLabel: map
          nullable: true
    MessageObject:
      type: object
      title: The message object
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - thread.message
        created_at:
          type: integer
        thread_id:
          type: string
        status:
          type: string
          enum:
            - in_progress
            - incomplete
            - completed
        incomplete_details:
          type: object
          properties:
            reason:
              type: string
              enum:
                - content_filter
                - max_tokens
                - run_cancelled
                - run_expired
                - run_failed
          nullable: true
          required:
            - reason
        completed_at:
          type: integer
          nullable: true
        incomplete_at:
          type: integer
          nullable: true
        role:
          type: string
          enum:
            - user
            - assistant
        content:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MessageContentImageFileObject'
              - $ref: '#/components/schemas/MessageContentImageUrlObject'
              - $ref: '#/components/schemas/MessageContentTextObject'
            x-oaiExpandable: true
        assistant_id:
          type: string
          nullable: true
        run_id:
          type: string
          nullable: true
        attachments:
          type: array
          items:
            type: object
            properties:
              file_id:
                type: string
              tools:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/AssistantToolsCode'
                    - $ref: '#/components/schemas/AssistantToolsFileSearchTypeOnly'
                  x-oaiExpandable: true
          nullable: true
        metadata:
          type: object
          x-oaiTypeLabel: map
          nullable: true
      required:
        - id
        - object
        - created_at
        - thread_id
        - status
        - incomplete_details
        - completed_at
        - incomplete_at
        - role
        - content
        - assistant_id
        - run_id
        - attachments
        - metadata
    MessageContentImageFileObject:
      title: Image file
      type: object
      properties:
        type:
          type: string
          enum:
            - image_file
        image_file:
          type: object
          properties:
            file_id:
              type: string
            detail:
              type: string
              enum:
                - auto
                - low
                - high
              default: auto
          required:
            - file_id
      required:
        - type
        - image_file
    MessageContentImageUrlObject:
      title: Image URL
      type: object
      properties:
        type:
          type: string
          enum:
            - image_url
        image_url:
          type: object
          properties:
            url:
              type: string
              format: uri
            detail:
              type: string
              enum:
                - auto
                - low
                - high
              default: auto
          required:
            - url
      required:
        - type
        - image_url
    MessageContentTextObject:
      title: Text
      type: object
      properties:
        type:
          type: string
          enum:
            - text
        text:
          type: object
          properties:
            value:
              type: string
            annotations:
              type: array
              items:
                oneOf:
                  - $ref: >-
                      #/components/schemas/MessageContentTextAnnotationsFileCitationObject
                  - $ref: >-
                      #/components/schemas/MessageContentTextAnnotationsFilePathObject
                x-oaiExpandable: true
          required:
            - value
            - annotations
      required:
        - type
        - text
    AssistantToolsCode:
      type: object
      title: Code interpreter tool
      properties:
        type:
          type: string
          enum:
            - code_interpreter
      required:
        - type
    AssistantToolsFileSearchTypeOnly:
      type: object
      title: FileSearch tool
      properties:
        type:
          type: string
          enum:
            - file_search
      required:
        - type
    MessageContentTextAnnotationsFileCitationObject:
      title: File citation
      type: object
      properties:
        type:
          type: string
          enum:
            - file_citation
        text:
          type: string
        file_citation:
          type: object
          properties:
            file_id:
              type: string
            quote:
              type: string
          required:
            - file_id
            - quote
        start_index:
          type: integer
          minimum: 0
        end_index:
          type: integer
          minimum: 0
      required:
        - type
        - text
        - file_citation
        - start_index
        - end_index
    MessageContentTextAnnotationsFilePathObject:
      title: File path
      type: object
      properties:
        type:
          type: string
          enum:
            - file_path
        text:
          type: string
        file_path:
          type: object
          properties:
            file_id:
              type: string
          required:
            - file_id
        start_index:
          type: integer
          minimum: 0
        end_index:
          type: integer
          minimum: 0
      required:
        - type
        - text
        - file_path
        - start_index
        - end_index
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````