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

# Send Email

> Send an Email



## OpenAPI

````yaml POST /email/send
openapi: 3.0.1
info:
  title: OpenAPI Simpu API
  description: Simpu API Documentation
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.simpu.co
security:
  - apiKeyAuth: []
paths:
  /email/send:
    post:
      description: Send an Email
      requestBody:
        description: Email object
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailSendRequest'
        required: true
      responses:
        '200':
          description: Email response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Email'
        '400':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    EmailSendRequest:
      required:
        - recipients
        - sender_id
      type: object
      properties:
        recipients:
          description: Recipients of the Email, comma-separated list of emails
          type: string
          example: john@acme.com,mack@acme.com
          minLength: 4
        sender_id:
          description: Sender ID of the Email
          type: string
          example: jane@acme.com
        content:
          description: >-
            Content of the Email , this is required if a template ID is not
            specified
          type: string
          example: Hello, this is just a test.
        from_name:
          description: The name of the sender of the Email
          type: string
          example: John from Acme
        subject:
          description: Subject of the Email
          type: string
          example: This is a test!!!
        reply_to:
          description: The Email address a response should be sent to
          type: string
          example: no-reply@acme.com
        external_ref:
          description: This is a reference to the message in your system
          type: string
          example: 674535b2b39158b9aae90188fcec23eb
        callback:
          description: This is the URL to receive delivery reports for the email
          type: string
          example: https://example.com/email/delivery_report
        template_id:
          description: >-
            Template ID of the Email, this is required if content is not
            specified
          type: string
          example: 674535b2b39158b9aae90188fcec23eb
        personalisation:
          description: 'Personalisation of the Email '
          type: array
          items:
            $ref: '#/components/schemas/PersonalisationEmail'
    Email:
      required:
        - id
        - sender_id
        - recipients
      type: object
      properties:
        id:
          description: 'Unique ID of the Email '
          type: string
          example: 674535b2b39158b9aae90188fcec23eb
        recipients:
          description: Recipients of the Email
          type: array
          example:
            - mack@acme.com
        sender_id:
          description: Sender ID of the Email
          type: string
          example: john@acme.com
        external_ref:
          description: This is a reference to the email in your system
          type: string
          example: 674535b2b39158b9aae90188fcec23eb
        callback:
          description: This is the URL to receive delivery reports for the message
          type: string
          example: https://example.com/email/delivery_report
        template_id:
          description: Template ID of the Email message
          type: string
          example: 674535b2b39158b9aae90188fcec23eb
        from_name:
          description: The sender of the email.
          type: string
          example: John from Acme
        personalisation:
          description: Personalisation of the Email message
          type: array
          items:
            $ref: '#/components/schemas/PersonalisationEmail'
        created_datetime:
          description: Date and time the Email was created
          type: string
          example: '2024-06-28T23:56:38.128604+00:00'
        updated_datetime:
          description: Date and time the Email  was last updated, if any
          type: string
          example: '2024-06-28T23:56:38.128604+00:00'
        meta:
          $ref: '#/components/schemas/MetaEmail'
    Error:
      required:
        - status
        - message
      type: object
      properties:
        status:
          type: integer
          format: int32
          example: 200
        message:
          type: string
          example: Invalid request
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                example: name
              message:
                type: string
                example: 'Error in field: ''name'' Field required.'
              type:
                type: string
                example: missing
    PersonalisationEmail:
      required:
        - to
        - substitutions
      type: object
      properties:
        to:
          description: Recipient of the personalisation
          type: string
          example: mack@acme.com
        substitutions:
          description: Substitutions of the personalisation
          type: object
          example:
            name: Mack from Acme
    MetaEmail:
      required:
        - method
        - resource
      type: object
      properties:
        method:
          description: The HTTP method used to make the request
          type: string
          example: POST
        resource:
          description: The resource requested
          type: string
          example: /email/send
        estimate:
          $ref: '#/components/schemas/EstimateEmail'
    EstimateEmail:
      required:
        - available_balance
        - charge
      type: object
      properties:
        available_balance:
          description: Available balance for the request
          type: number
          example: 1000.5
        charge:
          description: Charge for the request
          type: number
          example: 0.33
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: An API key to authenticate requests

````