# Link email

Link an email to a transport order or consignment

Endpoint: POST /mail/{id}/link
Version: 0.9.74
Security: bearer, apiKey, apiSecret

## Header parameters:

  - `Authorization` (string, required)

## Path parameters:

  - `id` (string, required)
    Mail ID

## Request fields (application/json):

  - `nonce` (string)

  - `entityId` (string)

  - `entityType` (string)

## 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.attachments.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.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.

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

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

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

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

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

  - `mail.attachments.url` (string)

  - `mail.attachments.path` (string)

  - `mail.attachments.name` (string)

  - `mail.attachments.originalName` (string)

  - `mail.attachments.size` (integer)

  - `mail.attachments.purpose` (string)

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

  - `mail.attachments.mimeType` (string)

  - `mail.attachments.extension` (string)

  - `mail.attachments.identifiers` (array)

  - `mail.attachments.identifiers.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.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.

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

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

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

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

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

  - `mail.attachments.identifiers.name` (string)

  - `mail.attachments.identifiers.system` (string)

  - `mail.attachments.identifiers.value` (string)

  - `mail.attachments.identifiers.expiredAt` (string)

  - `mail.attachments.bucket` (object)

  - `mail.attachments.bucket.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.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.

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

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

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

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

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

  - `mail.attachments.bucket.name` (string)

  - `mail.attachments.uploadedAt` (string)

  - `mail.attachments.tempFile` (string)

  - `mail.attachments.contentMatrix` (array)

  - `mail.threadId` (string)

  - `mail.parentMessageId` (string)

  - `mail.linkedTransportOrderIds` (array)

  - `mail.linkedConsignmentIds` (array)

## Response 401 fields (application/json):

  - `success` (boolean)

  - `message` (string)

  - `code` (integer)

  - `errors` (array)

  - `suggestion` (string)


