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

# Send communication campaign now

> Queue an immediate EcoMail Hub email campaign for the selected template and group. When campaign_id is supplied, that campaign is updated before sending.



## OpenAPI

````yaml /api/ecomailhub.openapi.yaml post /communications/campaigns/send-now
openapi: 3.1.0
info:
  title: YouNegotiate EcoMail Hub API
  version: '2.0'
  description: Stateless API endpoints for EcoMail Hub / EcoPortal users.
servers:
  - url: https://api.ecomailhub.younegotiate.com
    description: Production
security: []
tags:
  - name: System
    description: Public EcoMail Hub domain system and health endpoints.
  - name: Authentication
    description: EcoMail Hub login, logout, password reset, and password change endpoints.
  - name: Profile
    description: Authenticated EcoMail Hub user profile endpoints.
  - name: Dashboard
    description: EcoMail Hub dashboard summary and notice-response bucket endpoints.
  - name: Manage Consumers
    description: >-
      EcoMail Hub consumer identity grouping and notice-response count
      endpoints.
  - name: Manage Creditors
    description: >-
      EcoMail Hub creditor profile and company-only member profile table
      endpoints.
  - name: Import Creditor Profiles
    description: EcoMail Hub creditor profile CSV import endpoints.
  - name: Manage Notice Response
    description: >-
      EcoMail Hub top-level notice-response review, reassignment, and close
      endpoints.
  - name: Manage Users
    description: EcoMail Hub user account management endpoints.
  - name: Reports
    description: EcoMail Hub one-time and scheduled CSV report endpoints.
  - name: Communications
    description: EcoMail Hub communication template editor endpoints.
paths:
  /communications/campaigns/send-now:
    post:
      tags:
        - Communications
      summary: Send communication campaign now
      description: >-
        Queue an immediate EcoMail Hub email campaign for the selected template
        and group. When campaign_id is supplied, that campaign is updated before
        sending.
      operationId: ecomailhubSendCommunicationCampaignNow
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/SendNowEcomailhubCommunicationCampaignRequest
            example:
              template_id: 15
              group_id: 21
      responses:
        '201':
          description: Communication campaign queued.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/EcomailhubCommunicationCampaignMutationResponse
              example:
                message: >-
                  Your campaign has been successfully created and is now being
                  processed.
                data:
                  id: 33
                  template_id: 15
                  group_id: 21
                  template:
                    id: 15
                    name: Welcome Creditor
                  group:
                    id: 21
                    name: Active Members
                  frequency:
                    value: once
                    label: Once
                  start_date: '2026-07-06'
                  end_date: null
                  day_of_week: null
                  day_of_month: null
                  terms: One time on Jul 06, 2026
                  is_run_immediately: true
                  created_at: '2026-07-06T12:00:00.000000Z'
                  updated_at: '2026-07-06T12:00:00.000000Z'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
        - bearerAuth: []
components:
  schemas:
    SendNowEcomailhubCommunicationCampaignRequest:
      type: object
      required:
        - template_id
        - group_id
      properties:
        campaign_id:
          type:
            - integer
            - 'null'
          example: 33
        template_id:
          type: integer
          example: 15
        group_id:
          type: integer
          example: 21
    EcomailhubCommunicationCampaignMutationResponse:
      allOf:
        - $ref: '#/components/schemas/MessageResponse'
        - type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/EcomailhubCommunicationCampaign'
    MessageResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    EcomailhubCommunicationCampaign:
      type: object
      required:
        - id
        - template_id
        - group_id
        - template
        - group
        - frequency
        - start_date
        - end_date
        - day_of_week
        - day_of_month
        - terms
        - is_run_immediately
        - created_at
        - updated_at
      properties:
        id:
          type: integer
          example: 33
        template_id:
          type: integer
          example: 15
        group_id:
          type: integer
          example: 21
        template:
          oneOf:
            - $ref: '#/components/schemas/EcomailhubCommunicationCampaignRelation'
            - type: 'null'
        group:
          oneOf:
            - $ref: '#/components/schemas/EcomailhubCommunicationCampaignRelation'
            - type: 'null'
        frequency:
          $ref: '#/components/schemas/EcomailhubCommunicationCampaignStringOption'
        start_date:
          type:
            - string
            - 'null'
          format: date
          example: '2026-07-13'
        end_date:
          type:
            - string
            - 'null'
          format: date
          example: '2026-08-13'
        day_of_week:
          type:
            - integer
            - 'null'
          minimum: 0
          maximum: 6
          example: 1
        day_of_month:
          type:
            - integer
            - 'null'
          minimum: 0
          maximum: 31
          example: null
        terms:
          type: string
          example: Weekly on Monday
        is_run_immediately:
          type: boolean
          example: false
        created_at:
          type:
            - string
            - 'null'
          format: date-time
          example: '2026-07-06T12:00:00.000000Z'
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
          example: '2026-07-06T12:05:00.000000Z'
    ValidationErrorResponse:
      type: object
      required:
        - message
        - errors
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    EcomailhubCommunicationCampaignRelation:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: integer
          example: 15
        name:
          type: string
          example: Welcome Creditor
    EcomailhubCommunicationCampaignStringOption:
      type: object
      required:
        - value
        - label
      properties:
        value:
          type: string
          example: weekly
        label:
          type: string
          example: Weekly
  responses:
    Unauthenticated:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
          example:
            message: Unauthenticated.
    NotFound:
      description: Requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
          example:
            message: Not Found.
    ValidationError:
      description: Request validation failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
          example:
            message: The given data was invalid.
            errors:
              email:
                - The email field is required.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum

````