# Ingest external inbound email

Endpoint: POST /email
Version: 3.0.0
Security: bearerAuth, apiKeyAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer Token

  - `apiKeyAuth` (unknown)
    apiKey in header Key

## Request fields (application/json):

  - `accountUserId` (string)

  - `from` (string, required)
    Sender email address

  - `to` (string)
    Primary recipient email address

  - `cc` (array)
    CC recipient email addresses

  - `bcc` (array)
    BCC recipient email addresses

  - `brandPost` (boolean)
    Whether the email is a brand post

  - `subject` (string, required)
    Email subject

  - `body` (string, required)
    Email body

  - `sentTime` (integer)
    Sent time in epoch milliseconds

  - `attachments` (array)
    Attachments: provide url or base64EncodedContent. For local file uploads use the multipart variant of this endpoint.

  - `attachments.fileName` (string)
    The name of the file attachment

  - `attachments.contentType` (string)
    The MIME type of the file attachment

  - `attachments.url` (string)
    The URL where the attachment can be accessed

  - `attachments.base64EncodedContent` (string)
    The base64 encoded content of the file attachment

  - `customProperties` (object)

## Response 200:

  - `200` (unknown)
    Success

## Response 400:

  - `400` (unknown)
    Bad request

## Response 400 fields (application/json):

  - `data` (object)

  - `errors` (array)

  - `errors.id` (string, required)
    24-character hex ObjectId

  - `errors.code` (integer, required)

  - `errors.message` (string, required)
    Dotted error key (e.g. account.not.found)

  - `metadata` (object)

## Response 401:

  - `401` (unknown)
    Missing or invalid authentication

## Response 401 fields (application/json):

  - `data` (object)

  - `errors` (array)

  - `errors.id` (string, required)
    24-character hex ObjectId

  - `errors.code` (integer, required)

  - `errors.message` (string, required)
    Dotted error key (e.g. account.not.found)

  - `metadata` (object)

## Response 403:

  - `403` (unknown)
    Insufficient permissions

## Response 403 fields (application/json):

  - `data` (object)

  - `errors` (array)

  - `errors.id` (string, required)
    24-character hex ObjectId

  - `errors.code` (integer, required)

  - `errors.message` (string, required)
    Dotted error key (e.g. account.not.found)

  - `metadata` (object)

## Response 404:

  - `404` (unknown)
    Resource not found

## Response 404 fields (application/json):

  - `data` (object)

  - `errors` (array)

  - `errors.id` (string, required)
    24-character hex ObjectId

  - `errors.code` (integer, required)

  - `errors.message` (string, required)
    Dotted error key (e.g. account.not.found)

  - `metadata` (object)

