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.

  • Name
    to
    Type
    string
    Description

    To email address.

  • Name
    reply_to
    Type
    string
    Description

    Reply to email address.

  • 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
    array
    Description

    Included headers within the message.
    Example: ['header name' => 'header value']

Request

POST
/v1/emails
curl https://api.emailit.com/v1/emails \
  -H "Authorization: Bearer {api_key}" \
  -d from="[email protected]" \
  -d to="[email protected]" \
  -d reply_to="[email protected]" \
  -d subject="Hello World" \
  -d html="<h1>Hello World</h1>"

Was this page helpful?