RegisterEmail API

Registers an email message as a document in infoRouter at the specified path. The email body, metadata (sender, recipients, CC, BCC, subject, sent date), and any attachments are stored as a single .EMAIL document in the target folder. Use this API to archive emails directly from an email client or integration.

Endpoint

/srv.asmx/RegisterEmail

Methods

Parameters

Parameter Type Required Description
AuthenticationTicket string Yes Authentication ticket obtained from AuthenticateUser.
TargetPath string Yes Full infoRouter path including the document name (e.g. /Finance/Emails/Meeting-Notes.EMAIL). The folder portion must exist. The file name portion becomes the document name. If you pass only .EMAIL as the file name, the system automatically prefixes the generated document ID.
Senders string Yes Sender email address(es). Multiple addresses may be separated by a semicolon.
Recipients string Yes Primary recipient address(es). Multiple addresses may be separated by a semicolon.
CCAddress string No CC address(es). Multiple addresses may be separated by a semicolon. Pass empty string or omit if not applicable.
BCCAddress string No BCC address(es). Multiple addresses may be separated by a semicolon. Pass empty string or omit if not applicable.
SentDate DateTime Yes Date and time the email was sent. Format: yyyy-MM-ddTHH:mm:ss (ISO 8601). Used as the document's creation and modification date.
Subject string No Email subject line. Pass empty string or omit if not applicable.
header string No Raw email header block. Pass empty string or omit if not applicable.
htmlBody string No HTML body content of the email. Pass empty string or omit if not applicable.
textBody string No Plain text body content of the email. Pass empty string or omit if not applicable.
AttachmentHandlers string No Semicolon-separated list of email attachment descriptors. Each entry has the format {filename}:{upload-handler-guid}. See the Attachments section below. Pass empty string or omit if there are no attachments.

Attachments

Email attachments must be pre-uploaded using CreateUploadHandler and UploadFileChunk before calling RegisterEmail. Each uploaded file is identified by its upload handler GUID.

The AttachmentHandlers parameter format is:

{filename1}:{handler-guid1};{filename2}:{handler-guid2}

Example:

Invoice.pdf:3f2504e0-4f89-11d3-9a0c-0305e82c3301;Contract.docx:7b3504e0-4f89-11d3-9a0c-0305e82c3302

Response

Success Response

<response success="true" error="" DocumentID="1051" DocumentName="Meeting-Notes.EMAIL" />
Attribute Description
success "true" on success.
error Empty string on success.
DocumentID The infoRouter document ID assigned to the newly registered email document.
DocumentName The actual document name used (may differ from TargetPath if auto-naming was applied).

Error Response

<response success="false" error="Folder not found." />

Required Permissions

The calling user must be authenticated (anonymous users cannot register emails). The user must have add document permission on the target folder.


Example

POST Request

POST /srv.asmx/RegisterEmail HTTP/1.1
Content-Type: application/x-www-form-urlencoded

AuthenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
&TargetPath=/Finance/Emails/Q1-Budget-Meeting.EMAIL
&Senders=alice@example.com
&Recipients=bob@example.com;carol@example.com
&CCAddress=manager@example.com
&BCCAddress=
&SentDate=2024-03-15T14:30:00
&Subject=Q1 Budget Meeting Notes
&header=
&htmlBody=<html><body><p>Please find the meeting notes attached.</p></body></html>
&textBody=Please find the meeting notes attached.
&AttachmentHandlers=MeetingNotes.pdf:3f2504e0-4f89-11d3-9a0c-0305e82c3301

GET Request

GET /srv.asmx/RegisterEmail
  ?AuthenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
  &TargetPath=/Finance/Emails/Q1-Budget-Meeting.EMAIL
  &Senders=alice@example.com
  &Recipients=bob@example.com
  &CCAddress=
  &BCCAddress=
  &SentDate=2024-03-15T14:30:00
  &Subject=Q1+Budget+Meeting+Notes
  &header=
  &htmlBody=
  &textBody=Please+find+the+meeting+notes+attached.
  &AttachmentHandlers=
HTTP/1.1

SOAP Request

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:tns="http://tempuri.org/">
  <soap:Body>
    <tns:RegisterEmail>
      <tns:AuthenticationTicket>3f2504e0-4f89-11d3-9a0c-0305e82c3301</tns:AuthenticationTicket>
      <tns:TargetPath>/Finance/Emails/Q1-Budget-Meeting.EMAIL</tns:TargetPath>
      <tns:Senders>alice@example.com</tns:Senders>
      <tns:Recipients>bob@example.com</tns:Recipients>
      <tns:CCAddress></tns:CCAddress>
      <tns:BCCAddress></tns:BCCAddress>
      <tns:SentDate>2024-03-15T14:30:00</tns:SentDate>
      <tns:Subject>Q1 Budget Meeting Notes</tns:Subject>
      <tns:header></tns:header>
      <tns:htmlBody></tns:htmlBody>
      <tns:textBody>Please find the meeting notes attached.</tns:textBody>
      <tns:AttachmentHandlers></tns:AttachmentHandlers>
    </tns:RegisterEmail>
  </soap:Body>
</soap:Envelope>

Workflow — register email with attachments

1. For each attachment file:
   POST /srv.asmx/CreateUploadHandler?... → returns handler GUID (e.g. "abc123...")
   POST /srv.asmx/UploadFileChunk (repeat until all chunks uploaded)

2. POST /srv.asmx/RegisterEmail
   AttachmentHandlers=Invoice.pdf:abc123...;Contract.docx:def456...

3. On success, response includes DocumentID and DocumentName of the new .EMAIL document

Notes



Error Codes

Error Description
[900] Authentication failed Invalid or missing authentication ticket.
[901] Session expired or Invalid ticket The ticket has expired or does not exist.
Anonymous users cannot perform this action The authenticated user is an anonymous/guest user.
Folder not found The folder portion of TargetPath does not exist.
Upload handler not found One of the specified attachment handler GUIDs is invalid or has expired.
Invalid attachment handler format The AttachmentHandlers string is malformed (missing : separator or invalid GUID).
Duplicate email An email with the same document name and Message-ID already exists in the target folder.
Access denied The user does not have add document permission on the target folder.
SystemError:... An unexpected server-side error occurred.

For detailed documentation visit: https://support.inforouter.com/api-docs/RegisterEmail