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

# Edit message

> Edits a message you sent. LinkedIn allows it for a short time after sending.



## OpenAPI

````yaml /openapi.json patch /conversations/{conversationId}/messages/{messageId}
openapi: 3.1.0
info:
  title: ReachHunt API
  version: 1.0.0
  description: >-
    The ReachHunt API gives your own apps and scripts programmatic access to
    your workspace: accounts, campaigns, lead lists, conversations, messages,
    tags and statuses.


    Send your API key in the `Authorization` header: `Authorization: Bearer
    YOUR_API_KEY`. The key decides the workspace, so no path or parameter names
    one.


    Every response has the same envelope: `{ "status": true, "data": ...,
    "error": null }`.
servers:
  - url: https://api.reachhunt.ai/api/v1
    description: Production
security: []
tags:
  - name: Workspaces
    description: Your workspace and the people in it.
  - name: Accounts
    description: The X and LinkedIn accounts you connected.
  - name: Analytics
    description: Activity over time.
  - name: Credits
    description: AI credits and how they were used.
  - name: Campaigns
    description: Outreach that messages your leads step by step.
  - name: Agents
    description: AI agents that reply to your leads.
  - name: Tags
    description: Labels you put on conversations.
  - name: Statuses
    description: Pipeline stages you put conversations in.
  - name: Leads
    description: The people in your lead lists.
  - name: Lead lists
    description: Lists of people you collect to message.
  - name: Conversations
    description: The conversations in your inbox.
  - name: Messages
    description: The messages in a conversation.
  - name: Conversation details
    description: Your team's record of the person in a conversation.
  - name: Internal notes
    description: Notes only your team sees.
  - name: Scheduled messages
    description: Messages set to send later.
  - name: Templates
    description: Saved messages you can reuse.
  - name: Webhook events
    description: What each event sends.
paths:
  /conversations/{conversationId}/messages/{messageId}:
    patch:
      tags:
        - Messages
      summary: Edit message
      description: >-
        Edits a message you sent. LinkedIn allows it for a short time after
        sending.
      operationId: messages.edit
      parameters:
        - name: conversationId
          in: path
          required: true
          description: 'The conversation ID. URL-encode it in paths: X IDs contain `:`.'
          schema:
            type: string
        - name: messageId
          in: path
          required: true
          description: The message ID.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                accountId:
                  type: string
                  description: The connected account the conversation belongs to.
                text:
                  type: string
                  description: The new text.
              required:
                - accountId
                - text
      responses:
        '200':
          description: 'OK. Check `status`: errors the API handles itself also return 200.'
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - data
                  - error
                properties:
                  status:
                    type: boolean
                    description: '`true` when the request succeeded.'
                  data:
                    type: object
                    properties:
                      message:
                        $ref: '#/components/schemas/Message'
                    required:
                      - message
                  error:
                    type: 'null'
                    description: Always `null` on success.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PlanRequired'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - bearerAuth: []
components:
  schemas:
    Message:
      type: object
      required:
        - messageId
        - seqId
        - senderPlatformId
        - fromMe
        - text
        - edited
        - deleted
        - reactions
        - attachments
        - replyTo
        - seen
        - seenAt
        - createdAt
      properties:
        messageId:
          type: string
          description: The message ID.
        seqId:
          type:
            - string
            - 'null'
          description: The network's own reference for the message.
        senderPlatformId:
          type:
            - string
            - 'null'
          description: The network ID of whoever sent it.
        fromMe:
          type: boolean
          description: '`true` when the connected account sent it.'
        text:
          type:
            - string
            - 'null'
          description: The message text.
        edited:
          type: boolean
          description: Whether it was edited.
        deleted:
          type: boolean
          description: Whether it was deleted.
        reactions:
          type: array
          items:
            $ref: '#/components/schemas/Reaction'
          description: Reactions on the message.
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/Attachment'
          description: Files, images and other media on the message.
        replyTo:
          type:
            - object
            - 'null'
          additionalProperties: true
          description: The message this one replies to. `null` when it is not a reply.
        seen:
          type:
            - boolean
            - 'null'
          description: >-
            `true` when the other person has read it. `null` when that is not
            known.
        seenAt:
          type:
            - string
            - 'null'
          format: date-time
          description: When the other person read it, in ISO 8601 UTC.
        createdAt:
          type:
            - string
            - 'null'
          format: date-time
          description: When it was sent, in ISO 8601 UTC.
        sentBy:
          $ref: '#/components/schemas/SentBy'
    Reaction:
      type: object
      additionalProperties: true
      properties:
        emoji:
          type: string
          description: The emoji.
        senderPlatformId:
          type:
            - string
            - 'null'
          description: The network ID of whoever reacted.
    Attachment:
      type: object
      additionalProperties: true
      description: A file or media item. Fields depend on the kind.
      properties:
        kind:
          type: string
          description: What it is, such as `media` or `card`.
        type:
          type:
            - string
            - 'null'
          description: The media type, such as `image`, `video` or `file`.
        url:
          type:
            - string
            - 'null'
          description: Link to download it.
        filename:
          type:
            - string
            - 'null'
        width:
          type:
            - integer
            - 'null'
        height:
          type:
            - integer
            - 'null'
    SentBy:
      type:
        - object
        - 'null'
      description: >-
        Who on your side sent it: a teammate, a campaign or an agent. `null` for
        incoming messages or ones sent outside ReachHunt.
      properties:
        type:
          type: string
          enum:
            - member
            - campaign
            - agent
          description: Who sent it.
        id:
          type:
            - string
            - 'null'
          description: The teammate, campaign or agent ID.
        name:
          type:
            - string
            - 'null'
        avatarUrl:
          type:
            - string
            - 'null'
    Failure:
      type: object
      required:
        - status
        - data
        - error
      properties:
        status:
          type: boolean
          description: Always `false` for an error.
        data:
          type: 'null'
          description: Always `null` for an error.
        error:
          type: string
          description: What went wrong, in plain words.
  responses:
    Unauthorized:
      description: The API key is missing or not valid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Failure'
          example:
            status: false
            data: null
            error: Not authenticated
    PlanRequired:
      description: The workspace has no active plan, or its trial has ended.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Failure'
          example:
            status: false
            data: null
            error: Your free trial has ended. Pick a plan to continue.
    ServerError:
      description: Something failed on our side. Try again.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Failure'
          example:
            status: false
            data: null
            error: Something went wrong. Please try again.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: Bearer
      description: >-
        Your API key, sent as `Authorization: Bearer YOUR_API_KEY`. Create one
        in **Settings → API**.
      x-default: Bearer YOUR_API_KEY

````

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