# Create mail

Create a new mail

Endpoint: POST /mail
Version: 0.9.74
Security: bearer, apiKey, apiSecret

## Header parameters:

  - `Authorization` (string, required)

## Request fields (application/json):

  - `nonce` (string)

  - `imap` (object)

  - `imap.name` (string)

  - `imap.host` (string)

  - `imap.port` (string)

  - `imap.username` (string)

  - `imap.password` (string)

  - `imap.enabled` (boolean)

  - `imap.useOAuth` (boolean)

  - `contentId` (string)

  - `messageNumber` (integer)

  - `receivedDate` (string)

  - `sentDate` (string)

  - `read` (boolean)

  - `subject` (string)

  - `plainText` (string)

  - `text` (string)

  - `sender` (object)

  - `sender.name` (string)

  - `sender.email` (string)

  - `sender.smtpCredentials` (object)

  - `sender.smtpCredentials.nonce` (string)
    Nonce, a field that is not saved and returns exactly the same value you sent. This ensures you can identify your object that has been updated or created.

  - `sender.smtpCredentials.host` (string)

  - `sender.smtpCredentials.port` (string)

  - `sender.smtpCredentials.username` (string)

  - `sender.smtpCredentials.password` (string)

  - `sender.imap` (object)

  - `recipients` (array)

  - `attachments` (array)

  - `attachments.nonce` (string)
    Nonce, a field that is not saved and returns exactly the same value you sent. This ensures you can identify your object that has been updated or created.

  - `attachments.uuid` (string, required)

  - `attachments.primaryPlatformId` (string, required)

  - `attachments.language` (object)
    circular reference

  - `attachments.url` (string)

  - `attachments.path` (string)

  - `attachments.name` (string)

  - `attachments.originalName` (string)

  - `attachments.size` (integer)

  - `attachments.purpose` (string)

  - `attachments.type` (string)
    Enum: "IMAGE", "VIDEO", "MUSIC", "WORD", "EXCEL", "CSV", "PDF", "EMAIL", "JSON"

  - `attachments.mimeType` (string)

  - `attachments.extension` (string)

  - `attachments.identifiers` (array)

  - `attachments.identifiers.nonce` (string)
    Nonce, a field that is not saved and returns exactly the same value you sent. This ensures you can identify your object that has been updated or created.

  - `attachments.identifiers.uuid` (string, required)

  - `attachments.identifiers.primaryPlatformId` (string, required)

  - `attachments.identifiers.language` (object)
    circular reference

  - `attachments.identifiers.name` (string)

  - `attachments.identifiers.system` (string)

  - `attachments.identifiers.value` (string)

  - `attachments.identifiers.expiredAt` (string)

  - `attachments.bucket` (object)

  - `attachments.bucket.nonce` (string)
    Nonce, a field that is not saved and returns exactly the same value you sent. This ensures you can identify your object that has been updated or created.

  - `attachments.bucket.uuid` (string, required)

  - `attachments.bucket.primaryPlatformId` (string, required)

  - `attachments.bucket.language` (object)
    circular reference

  - `attachments.bucket.name` (string)

  - `attachments.uploadedAt` (string)

  - `attachments.tempFile` (string)

  - `attachments.contentMatrix` (array)

## Response 200 fields (application/json):

  - `success` (boolean)

  - `message` (string)

  - `code` (integer)

  - `mail` (object)

  - `mail.id` (string, required)
    Uniquely identifies this entity. A ID can be assigned  or will be generated by the server if the request doesn't provide it. Once assigned, the ID can't be changed

  - `mail.nonce` (string)
    Nonce, a field that is not saved and returns exactly the same value you sent. This ensures you can identify your object that has been updated or created.

  - `mail.uuid` (string, required)

  - `mail.primaryPlatformId` (string, required)

  - `mail.createdAt` (string)
    The date and time this Entity has been created

  - `mail.updatedAt` (string)
    The date and time this Entity has been updated

  - `mail.language` (object)
    circular reference

  - `mail.imap` (object)

  - `mail.imap.id` (string, required)
    Uniquely identifies this entity. A ID can be assigned  or will be generated by the server if the request doesn't provide it. Once assigned, the ID can't be changed

  - `mail.imap.nonce` (string)
    Nonce, a field that is not saved and returns exactly the same value you sent. This ensures you can identify your object that has been updated or created.

  - `mail.imap.uuid` (string, required)

  - `mail.imap.primaryPlatformId` (string, required)

  - `mail.imap.createdAt` (string)
    The date and time this Entity has been created

  - `mail.imap.updatedAt` (string)
    The date and time this Entity has been updated

  - `mail.imap.language` (object)
    circular reference

  - `mail.imap.name` (string)

  - `mail.imap.host` (string)

  - `mail.imap.port` (string)

  - `mail.imap.username` (string)

  - `mail.imap.password` (string)

  - `mail.imap.enabled` (boolean)

  - `mail.contentId` (string)

  - `mail.messageNumber` (integer)

  - `mail.receivedDate` (string)

  - `mail.sentDate` (string)

  - `mail.read` (boolean)

  - `mail.starred` (boolean)

  - `mail.subject` (string)

  - `mail.plainText` (string)

  - `mail.text` (string)

  - `mail.sender` (object)

  - `mail.sender.id` (string, required)
    Uniquely identifies this entity. A ID can be assigned  or will be generated by the server if the request doesn't provide it. Once assigned, the ID can't be changed

  - `mail.sender.nonce` (string)
    Nonce, a field that is not saved and returns exactly the same value you sent. This ensures you can identify your object that has been updated or created.

  - `mail.sender.uuid` (string, required)

  - `mail.sender.primaryPlatformId` (string, required)

  - `mail.sender.createdAt` (string)
    The date and time this Entity has been created

  - `mail.sender.updatedAt` (string)
    The date and time this Entity has been updated

  - `mail.sender.language` (object)
    circular reference

  - `mail.sender.name` (string)

  - `mail.sender.email` (string)

  - `mail.sender.smtp` (object)

  - `mail.sender.smtp.id` (string, required)
    Uniquely identifies this entity. A ID can be assigned  or will be generated by the server if the request doesn't provide it. Once assigned, the ID can't be changed

  - `mail.sender.smtp.nonce` (string)
    Nonce, a field that is not saved and returns exactly the same value you sent. This ensures you can identify your object that has been updated or created.

  - `mail.sender.smtp.uuid` (string, required)

  - `mail.sender.smtp.primaryPlatformId` (string, required)

  - `mail.sender.smtp.createdAt` (string)
    The date and time this Entity has been created

  - `mail.sender.smtp.updatedAt` (string)
    The date and time this Entity has been updated

  - `mail.sender.smtp.language` (object)
    circular reference

  - `mail.sender.smtp.name` (string)

  - `mail.sender.smtp.host` (string)

  - `mail.sender.smtp.port` (string)

  - `mail.sender.smtp.username` (string)

  - `mail.sender.smtp.password` (string)

  - `mail.sender.smtp.useOAuth` (boolean)

  - `mail.sender.smtp.tenantId` (string)

  - `mail.sender.smtp.clientId` (string)

  - `mail.sender.smtp.clientSecret` (string)

  - `mail.sender.smtp.oauthScopes` (string)

  - `mail.sender.imap` (object)

  - `mail.recipients` (array)

  - `mail.attachments` (array)

  - `mail.threadId` (string)

  - `mail.parentMessageId` (string)

  - `mail.linkedTransportOrderIds` (array)

  - `mail.linkedConsignmentIds` (array)

## Response 400 fields (application/json):

  - `success` (boolean)

  - `message` (string)

  - `code` (integer)

  - `errors` (array)

  - `suggestion` (string)


