# Save Email as Draft

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v1/unibox/emails/save-as-draft:
    post:
      summary: Save Email as Draft
      deprecated: false
      description: >
        Saves an email message as a draft in the Unibox for the specified
        workspace. The draft can later be edited or sent by the user. No email
        is delivered to recipients when using this endpoint.
      operationId: saveEmailAsDraft
      tags:
        - Unibox
        - Unibox
      parameters:
        - name: workspace_id
          in: query
          description: Unique identifier of the workspace where the draft should be saved.
          required: true
          schema:
            type: string
            examples:
              - 65099a0dd96fae8ab61130c0
        - name: x-api-key
          in: header
          description: ''
          required: false
          example: Your PlusVibe.ai account's API Key
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - parent_message_id
                - from
                - subject
                - body
              properties:
                parent_message_id:
                  type: string
                  description: >
                    ID of the original email message this draft belongs to. You
                    may find this ID in the unibox/emails endpoint (field: id)
                  examples:
                    - 694377904741b0899e1d8c03
                from:
                  type: string
                  format: email
                  description: Sender email account (must already connected to Plusvibe)
                  examples:
                    - yaro@plusvibeteam.com
                subject:
                  type: string
                  description: Email subject line
                  examples:
                    - Following up on our demo
                body:
                  type: string
                  description: Email body content (HTML)
                  examples:
                    - |-
                      Hi John,

                      Just following up on our conversation from yesterday.

                      Best regards,
                      Yaro
                to:
                  type: array
                  description: Primary recipients of the email.
                  items:
                    type: string
                    format: email
                  examples:
                    - - john.doe@gmail.com
                cc:
                  type: array
                  description: CC recipients.
                  items:
                    type: string
                    format: email
                  examples:
                    - - team@company.com
                bcc:
                  type: array
                  description: BCC recipients.
                  items:
                    type: string
                    format: email
                  examples:
                    - - audit@plusvibe.ai
              x-apidog-orders:
                - parent_message_id
                - from
                - subject
                - body
                - to
                - cc
                - bcc
            example:
              parent_message_id: 694377904741b0899e1d8c02
              from: yaro@plusvibeteam.com
              subject: Following up on our demo
              body: >-
                Hi John,


                Just following up on our conversation from yesterday. Let me
                know if you have any questions.


                Best regards,

                Yaro
              to:
                - john.doe@gmail.com
              cc:
                - sales@plusvibe.ai
              bcc:
                - audit@plusvibe.ai
      responses:
        '200':
          description: Draft saved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Operation result.
                    examples:
                      - success
                x-apidog-orders:
                  - status
          headers: {}
          x-apidog-name: ''
        '400':
          description: Invalid request payload or missing parameters.
          headers: {}
          x-apidog-name: ''
        '401':
          description: Unauthorized – authentication required.
          headers: {}
          x-apidog-name: ''
        '403':
          description: Forbidden – user does not have access to the workspace.
          headers: {}
          x-apidog-name: ''
        '500':
          description: Internal server error.
          headers: {}
          x-apidog-name: ''
      security:
        - ApiKeyAuth: []
          x-apidog:
            schemeGroups:
              - id: uS5KiuC4wfZHK42AzOfA_
                schemeIds:
                  - ApiKeyAuth
            required: true
            use:
              id: uS5KiuC4wfZHK42AzOfA_
            scopes:
              uS5KiuC4wfZHK42AzOfA_:
                ApiKeyAuth: []
      x-apidog-folder: Unibox
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/929054/apis/api-25824244-run
components:
  schemas: {}
  securitySchemes:
    ApiKeyAuth:
      type: apikey
      in: header
      name: x-api-key
      description: |
        API key issued in the PlusVibe dashboard. The server reads it
        from the `x-api-key` header and injects it into the request as
        the `api_key` query parameter, which is why you will see
        `api_key` referenced in validation errors.
    apiKey:
      type: apikey
      in: body
      name: api_key
      description: API key passed in request body
servers:
  - url: https://api.plusvibe.ai/api/v1
    description: Prod Env
security:
  - ApiKeyAuth: []
    x-apidog:
      schemeGroups:
        - id: uS5KiuC4wfZHK42AzOfA_
          schemeIds:
            - ApiKeyAuth
      required: true
      use:
        id: uS5KiuC4wfZHK42AzOfA_
      scopes:
        uS5KiuC4wfZHK42AzOfA_:
          ApiKeyAuth: []

```
