# Compose New Email 

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /unibox/emails/compose:
    post:
      summary: 'Compose New Email '
      deprecated: false
      description: >-
        This endpoint allows you to compose a new email to any lead


        IMPORTANT:

        The body field accepts HTML, so any quotes or special characters inside
        it must be escaped when sending as JSON.
      operationId: Unibox_unibox/reply-to-an-email
      tags:
        - Unibox
        - Unibox
      parameters:
        - name: workspace_id
          in: query
          description: Workspace ID
          required: true
          schema:
            type: string
            description: Workspace ID
            default: ''
            examples:
              - 65f3c92d3dbe5dbb35374a9a
        - name: x-api-key
          in: header
          description: |
            Your PlusVibe.ai account's API Key
          required: true
          example: ''
          schema:
            type: string
            description: |
              Your PlusVibe.ai account's API Key
            default: ''
            examples:
              - your-api-key
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                subject:
                  type: string
                  description: ''
                  examples:
                    - 'Re: Summer Promotion Campaign'
                from:
                  type: string
                  description: ''
                  format: email
                  examples:
                    - sender@account.com
                body:
                  type: string
                  description: ''
                  examples:
                    - Please see the video link attached.
                cc:
                  type: string
                  description: ''
                  format: email
                  examples:
                    - cc@example.com
                bcc:
                  type: string
                  description: ''
                  format: email
                  examples:
                    - bcc@example.com
                lead_id:
                  type: string
                  examples:
                    - 66b9d78ff91fabf920f6964d
                  description: lead id
                camp_id:
                  type: string
                  description: campaign id of the lead
              required:
                - lead_id
                - subject
                - from
                - body
                - camp_id
              x-apidog-orders:
                - lead_id
                - camp_id
                - subject
                - from
                - body
                - cc
                - bcc
            example:
              lead_id: 686917da327549d53404231f
              camp_id: 68691682327549d5340422f1
              subject: 'Re: Summer Promotion Campaign'
              from: yaro@plusvibe.ai
              body: <p title="promo">See attached video.</p>
              cc: cc@pipl.ai
              bcc: bcc@pipl.ai
      responses:
        '200':
          description: Successful reply
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: ''
                    examples:
                      - success
                  id:
                    type: string
                    description: ''
                    examples:
                      - 66b9d78ff91fabf920f6964d
                x-apidog-orders:
                  - status
                  - id
              example:
                status: success
                id: 66b9d78ff91fabf920f6964d
          headers: {}
          x-apidog-name: OK
        '400':
          description: Validation or other error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: ''
                    examples:
                      - Invalid message ID
                  error:
                    type: string
                    description: ''
                    examples:
                      - Invalid message ID
                x-apidog-orders:
                  - message
                  - error
          headers: {}
          x-apidog-name: Bad Request
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties: {}
                x-apidog-orders: []
          headers: {}
          x-apidog-name: Server Error
      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-21409197-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: []

```
