Emails

Email Messages are the core part of our API. These endpoints allow you to send emails and retrieve them.


POST/v1/emails

Send Emails

This endpoint allows you to send email messages.

Required attributes

  • Name
    from
    Type
    string
    Description

    From email address. Example: Name <[email protected]> or [email protected].

  • Name
    to
    Type
    string
    Description

    To email address. Example: [email protected].

  • Name
    reply_to
    Type
    string
    Description

    Reply to email address. Example: [email protected].

  • Name
    subject
    Type
    string
    Description

    Subject line

  • Name
    html
    Type
    string
    Description

    HTML content part

  • Name
    text
    Type
    string
    Description

    Text content part

  • Name
    attachments[]
    Type
    array
    Description

    Included files with the email message.

  • Name
    attachments[][filename]
    Type
    string
    Description

    Attachment file name my_file.pdf.

  • Name
    attachments[][content]
    Type
    string
    Description

    Attachment file content as string.

  • Name
    attachments[][content_type]
    Type
    string
    Description

    Attachment file content as string.

  • Name
    headers
    Type
    object
    Description

    Included headers within the message.
    Example: {'header name': 'header value'}

Request

POST
/v1/emails
curl -X POST 'https://api.emailit.com/v1/emails' \
  -H "Authorization: Bearer {api_key}" \
  -H "Content-Type: application/json" \
  -d $'{
    "from": "Name <[email protected]>",
    "to": "[email protected]",
    "reply_to": "[email protected]",
    "subject": "Hello World",
    "html": "<h1>Hello World</h1>"
  }'

Was this page helpful?