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

# Prepare reply

> Prepares one reviewable reply for a conversation, either with Extrovert or from supplied text. It returns the exact dmId required for Send reply and never sends in the same call.



## OpenAPI

````yaml https://api.goextrovert.com/client/v2/docs-json post /client/v2/dm-conversations/{connectionId}/replies
openapi: 3.0.0
info:
  title: Extrovert Client API
  description: >-
    Public API for Extrovert platform integration. Use your API key for
    authentication.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.goextrovert.com/
    description: API Server
security: []
tags: []
paths:
  /client/v2/dm-conversations/{connectionId}/replies:
    post:
      tags:
        - Direct Messages
      summary: Prepare reply
      description: >-
        Prepares one reviewable reply for a conversation, either with Extrovert
        or from supplied text. It returns the exact dmId required for Send reply
        and never sends in the same call.
      operationId: DmConversationsClientApiController_prepareReply
      parameters:
        - name: connectionId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrepareReplyRequestDto'
      responses:
        '200':
          description: >-
            The connection's existing queued draft was promoted in place instead
            of creating a new reply.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrepareReplyResponseDto'
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrepareReplyResponseDto'
        '401':
          description: Invalid or missing API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientApiErrorResponseDto'
      security:
        - api-key: []
components:
  schemas:
    PrepareReplyRequestDto:
      type: object
      properties:
        connectionId:
          type: string
          format: uuid
          description: Conversation (connection) ID the action addresses.
        mode:
          type: string
          enum:
            - Extrovert-generated
            - Agent-authored
          description: >-
            Extrovert-generated prepares the reply with Extrovert;
            Agent-authored prepares the exact supplied text.
        campaignId:
          type: string
          description: >-
            Accessible campaign whose Voice should be used. Only valid for
            Extrovert-generated mode. Without it, selection remains
            deterministic inside the selected workspace.
          format: uuid
        text:
          type: string
          description: >-
            Exact reply text to prepare without Extrovert generation. Required
            for Agent-authored mode.
          minLength: 1
          maxLength: 1250
      required:
        - connectionId
        - mode
    PrepareReplyResponseDto:
      type: object
      properties:
        status:
          type: string
          description: Response status
          enum:
            - success
        data:
          type: object
          properties:
            dmId:
              type: string
              format: uuid
              description: Exact reply ID required by Improve, Edit, Send, and Recover.
              example: 8d256aa6-9b12-49a7-93ee-bf41634b5b60
            connectionId:
              type: string
              format: uuid
              description: Conversation this reply belongs to.
              example: 8d256aa6-9b12-49a7-93ee-bf41634b5b60
            text:
              type: string
              minLength: 1
              description: Effective reply text.
            source:
              type: string
              enum:
                - Extrovert-generated
                - Agent-authored
                - Edited
              description: >-
                Extrovert-generated when no authored override exists;
                Agent-authored when created without generation; Edited when
                custom text overrides a generated reply.
            state:
              type: string
              enum:
                - No draft
                - Suggested
                - Draft ready
                - Generating
                - Sending
                - Sent
                - History changed
                - Error
                - Paused
                - Skipped
            allowedActions:
              type: array
              items:
                type: string
                enum:
                  - prepare-reply
                  - improve-reply
                  - edit-reply
                  - send-reply
                  - recover-draft
              description: Actions valid for the current state.
            reason:
              type: string
              enum:
                - Relevant post
                - Conversation inactive
                - New connection
                - Manual
                - External connection
              description: >-
                Why Extrovert prepared this reply, or null when no trigger
                reason applies.
              nullable: true
            relevantPost:
              type: object
              properties:
                postId:
                  type: string
                  format: uuid
                  description: >-
                    Extrovert post ID, or null when only the LinkedIn snapshot
                    remains.
                  nullable: true
                summary:
                  type: string
                  description: Stored post summary, or null when none was persisted.
                  nullable: true
                linkedInUrl:
                  type: string
                  format: uri
                  description: LinkedIn URL of the post that triggered the reply.
                publishedAt:
                  type: string
                  description: When the post was published on LinkedIn.
                  example: '2025-06-30T14:02:07.456Z'
              required:
                - postId
                - summary
                - linkedInUrl
                - publishedAt
              description: >-
                Post that triggered the reply, or null when the trigger was not
                a post.
              nullable: true
            error:
              type: object
              properties:
                code:
                  type: string
                  description: >-
                    Stable public error code suitable for branching. It is not a
                    raw provider or backend status.
                message:
                  type: string
                  description: >-
                    Safe explanation of what failed and what the caller should
                    do next.
                retryable:
                  type: boolean
                  description: >-
                    Whether retrying may succeed after the stated condition is
                    resolved.
                occurredAt:
                  type: string
                  description: >-
                    When this failure was recorded, or null when no reliable
                    timestamp exists.
                  nullable: true
                  example: '2025-06-30T14:02:07.456Z'
              required:
                - code
                - message
                - retryable
                - occurredAt
              description: >-
                Current send/workflow failure, or null when no failure is
                active.
              nullable: true
            createdAt:
              type: string
              description: Date and time in ISO 8601 format
              example: '2025-06-30T14:02:07.456Z'
            updatedAt:
              type: string
              description: Date and time in ISO 8601 format
              example: '2025-06-30T14:02:07.456Z'
            sentAt:
              type: string
              description: LinkedIn send time, or null before successful delivery.
              nullable: true
              example: '2025-06-30T14:02:07.456Z'
        message:
          type: string
          description: Success message
          example: Operation completed successfully
      required:
        - status
        - data
        - message
    ClientApiErrorResponseDto:
      type: object
      properties:
        status:
          type: string
          description: Response status
          example: error
          enum:
            - error
        data:
          type: object
          description: Response data
          example: null
          nullable: true
        message:
          type: string
          description: Error message
          example: An error occurred while processing the request
      required:
        - status
        - data
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-API-Key
      description: API Key for authentication

````