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

# Create a new draft

Creates a message draft within the specified conversation, allowing the author and optional target agent to be set by ID or email.


## OpenAPI

````yaml https://api.getfernand.com/openapi.json post /conversations/{conv_id}/drafts
openapi: 3.0.3
info:
  title: Fernand API Documentation
  version: '3.0'
  description: This is the documentation for the [Fernand](https://getfernand.com) API.
  termsOfService: https://getfernand.com/terms
  contact:
    name: Fernand Support
    url: https://getfernand.com
    email: support@getfernand.com
  x-logo:
    url: https://app.getfernand.com/images/favicon/icon_128.png
servers:
  - url: https://api.getfernand.com
    description: ''
    x-last-modified: 1764750693905
security:
  - apiKeyHeader: []
externalDocs:
  description: You can access our documentation online by visiting https://api.fernand.help
  url: https://api.fernand.help
paths:
  /conversations/{conv_id}/drafts:
    post:
      tags:
        - Conversation Drafts
      summary: Create a new draft
      description: >-
        Creates a message draft within the specified conversation, allowing the
        author and optional target agent to be set by ID or email.
      operationId: createDraft
      parameters:
        - name: conv_id
          in: path
          required: true
          schema:
            type: integer
          description: ID of the conversation to create the draft in.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                author_id:
                  type: integer
                  description: >-
                    ID of the agent authoring the draft (optional if
                    author_email is provided).
                  example: 123
                author_email:
                  type: string
                  description: >-
                    Email of the agent authoring the draft (optional if
                    author_id is provided).
                  example: jared.dunns@piedpiper.com
                target_id:
                  type: integer
                  description: ID of the agent the draft is targeted to (optional).
                target_email:
                  type: string
                  description: Email of the agent the draft is targeted to (optional).
                  example: richard.hendricks@piedpiper.com
                title:
                  type: string
                  description: Title of the draft (optional).
                  example: Lawyer response
                content:
                  type: object
                  description: >
                    JSON object containing the draft content and metadata
                    (required).

                    Example:
                        {
                            "content": "string",
                            "attachments": [
                                {
                                    "type": "application/pdf",
                                    "name": "report.pdf",
                                    "content": "<... base64 encoded content ...>"
                                }
                            ],
                            "inlines": [
                                {
                                    "type": "image/png",
                                    "name": "screenshot.png",
                                    "content": "<... base64 encoded content ...>",
                                    "cid": "random-cid-12345"
                                }
                            ],
                            "actions": [
                                {
                                    "name": "status.close",
                                    "snippet_id": 123,
                                    "data": {}
                                }
                            ]
                        }
              required:
                - content
      responses:
        '200':
          description: Draft created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageDraft'
        '400':
          description: Invalid input or referenced agent not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '404':
          description: Conversation not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
components:
  schemas:
    MessageDraft:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Unique identifier for the message draft
        title:
          type: string
          maxLength: 250
          nullable: true
          description: Optional title for the draft
        content:
          type: object
          description: |
            JSON object containing the draft content and metadata.
            Example:
                {
                    "content": "string",
                    "attachments": [
                        {
                            "type": "application/pdf",
                            "name": "report.pdf",
                            "content": "<... base64 encoded content ...>"
                        }
                    ],
                    "inlines": [
                        {
                            "type": "image/png",
                            "name": "screenshot.png",
                            "content": "<... base64 encoded content ...>",
                            "cid": "random-cid-12345"
                        }
                    ],
                    "actions": [
                        {
                            "name": "status.close",
                            "snippet_id": 123,
                            "data": {}
                        }
                    ]
                }
        created:
          type: string
          format: date-time
          description: Timestamp when the draft was created (UTC)
        last_updated:
          type: string
          format: date-time
          description: Timestamp when the draft was last updated (UTC)
        conversation_id:
          type: integer
          format: int64
          description: Conversation ID this draft belongs to
        author_id:
          type: integer
          format: int64
          nullable: true
          description: Agent ID who created the draft
        target_id:
          type: integer
          format: int64
          nullable: true
          description: Agent ID to whom the draft is targeted (null means everyone)
      required:
        - conversation_id
        - created
        - last_updated
      x-computed-hash: 8c8367becf2ed235e0c256a8de0c4821b45ded56aa5429e19da093b7c10e2094
      x-last-modified: 1769075325
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      description: >-
        Authenticate your account by including your secret key in API requests.

        You can manage your API keys in the
        [Dashboard](https://app.getfernand.com/).


        Authentication to the API is performed by using the HTTP Header
        X-API-Key.
      name: X-API-Key
      in: header
      x-last-modified: 1764750344730

````