> ## 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 manage consumer SMS

> Send a manual SMS from the EcoMail Hub manage-consumer detail page. The endpoint respects consumer text permissions and opt-outs, applies a short per-user recipient cooldown, sends through Twilio, and records communication history after Twilio accepts the message.



## OpenAPI

````yaml /api/ecomailhub.openapi.yaml post /manage-consumers/{consumer}/sms
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:
  /manage-consumers/{consumer}/sms:
    post:
      tags:
        - Manage Consumers
      summary: Send manage consumer SMS
      description: >-
        Send a manual SMS from the EcoMail Hub manage-consumer detail page. The
        endpoint respects consumer text permissions and opt-outs, applies a
        short per-user recipient cooldown, sends through Twilio, and records
        communication history after Twilio accepts the message.
      operationId: ecomailhubSendManageConsumerSms
      parameters:
        - name: consumer
          in: path
          required: true
          schema:
            type: integer
          description: Representative consumer ID from the manage consumers list.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendManageConsumerSmsRequest'
            example:
              content: Hello, please review your notice response.
      responses:
        '200':
          description: SMS sent and communication history recorded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendManageConsumerSmsResponse'
              example:
                message: Message sent.
                data:
                  communication_history_id: 790
                  recipient_phone: '+19005090050'
                  sms_segment_count: 1
                  cost: 0.0123
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: >-
            SMS cannot be sent because the consumer is deactivated, has no
            usable phone number, disabled text permission, or opted out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                disabledTextPermission:
                  value:
                    message: This consumer has disabled text permission.
                missingPhone:
                  value:
                    message: This consumer does not have a phone number to send sms.
                optedOut:
                  value:
                    message: This consumer has opted out of SMS communications.
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          description: SMS cooldown is active for this EcoMail Hub user and consumer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              example:
                message: >-
                  Please wait 10 seconds before sending another SMS to this
                  recipient.
        '502':
          description: Twilio failed to accept the outbound SMS.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              example:
                message: >-
                  Communications error. We aren't able to send your
                  Communication. Please email help@younegotiate.com so we can
                  fix this.
      security:
        - bearerAuth: []
components:
  schemas:
    SendManageConsumerSmsRequest:
      type: object
      required:
        - content
      properties:
        content:
          type: string
          description: >-
            Plain-text SMS body to send to the consumer. The backend calculates
            segment count and cost from the Twilio response when available.
          example: Hello, please review your notice response.
    SendManageConsumerSmsResponse:
      type: object
      required:
        - message
        - data
      properties:
        message:
          type: string
          example: Message sent.
        data:
          type: object
          required:
            - communication_history_id
            - recipient_phone
            - sms_segment_count
            - cost
          properties:
            communication_history_id:
              type: integer
              example: 790
            recipient_phone:
              type: string
              example: '+19005090050'
            sms_segment_count:
              type: integer
              minimum: 1
              example: 1
            cost:
              type: number
              format: float
              example: 0.0123
    MessageResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ValidationErrorResponse:
      type: object
      required:
        - message
        - errors
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
  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

````