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

# Send email to recipient lists

> # Description

Send an email and/or sms to every recipient set on the campaign. It will also send a delivery notification to every member of the project.

# Validations

- If campaign is not found the response will be an error with 404 status code.
- If there is a problem communicating with project service will return an error with 404 status code.

# Response

No response with 204 status.

# Body

The body for the request is an object that contains the property `channels` where:  
- `channels`: Array of strings that can contain the strings  `email` or `sms`.

If only `email` is received only emails will be sent (Recipients without emails will be ignored). If only `sms` is received only sms will be sent (Recipients without sms will be ignored). If both are received sms and email will be sent to every recipient. If the recipient doesn't have an email or a phone it will ignore the email or the sms respectively.

# Description

Send an email and/or sms to every recipient set on the campaign. It will also send a delivery notification to every member of the project.

# Validations

* If campaign is not found the response will be an error with 404 status code.
* If there is a problem communicating with project service will return an error with 404 status code.

# Response

No response with 204 status.

# Body

The body for the request is an object that contains the property `channels` where:

* `channels`: Array of strings that can contain the strings  `email` or `sms`.

If only `email` is received only emails will be sent (Recipients without emails will be ignored). If only `sms` is received only sms will be sent (Recipients without sms will be ignored). If both are received sms and email will be sent to every recipient. If the recipient doesn't have an email or a phone it will ignore the email or the sms respectively.


## OpenAPI

````yaml POST /campaigns-service/v1/campaigns/{campaignId}/send
openapi: 3.0.3
info:
  title: SightX API
  version: 1.0.0
  description: >-
    SightX REST API documentation. Most responses are JSON; some export
    endpoints return files. API access is a paid add-on — contact
    sales@sightx.io for details.
servers:
  - url: https://auth.admin.sightx.io
    description: Authentication (Production)
  - url: https://auth.staging-admin.sightx.io
    description: Authentication (Staging)
security:
  - AuthorizationHeader: []
paths:
  /campaigns-service/v1/campaigns/{campaignId}/send:
    post:
      summary: Send email to recipient lists
      description: >-
        # Description


        Send an email and/or sms to every recipient set on the campaign. It will
        also send a delivery notification to every member of the project.


        # Validations


        - If campaign is not found the response will be an error with 404 status
        code.

        - If there is a problem communicating with project service will return
        an error with 404 status code.


        # Response


        No response with 204 status.


        # Body


        The body for the request is an object that contains the property
        `channels` where:  

        - `channels`: Array of strings that can contain the strings  `email` or
        `sms`.


        If only `email` is received only emails will be sent (Recipients without
        emails will be ignored). If only `sms` is received only sms will be sent
        (Recipients without sms will be ignored). If both are received sms and
        email will be sent to every recipient. If the recipient doesn't have an
        email or a phone it will ignore the email or the sms respectively.
      operationId: >-
        send-email-to-recipient-lists-post-campaigns-service-v1-campaigns-campaignid-send
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
            example:
              channels:
                - email
                - sms
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      servers:
        - url: https://campaigns.sightx.io
components:
  securitySchemes:
    AuthorizationHeader:
      type: apiKey
      in: header
      name: Authorization
      description: Access token obtained from the m2m-token endpoint.

````