REST API - Accessing Emails

Version 2

    An email is a commonly used asset in your Eloqua application. You can create, update, retrieve and delete emails using the REST API.

     

    Accessing Emails

    • GET  /assets/email/{id}?depth={depth}

     

    Response

    The response from this call looks as follows :

     

    {
      "type": "Email",
      "currentStatus": "Draft",
      "id": "4821",
      "createdAt": "1352550182",
      "createdBy": "340",
      "depth": "complete",
      "folderId": "42",
      "name": "sample email",
      "permissions": "fullControl",
      "updatedAt": "1352550182",
      "updatedBy": "340",
      "bounceBackEmail": "bounced@eloqua.com",
      "emailGroupId": "1",
      "htmlContent": {
        "type": "RawHtmlContent",
        "html": "<html><head><\/head><body>sample content<\/body><\/html>"
      },
      "isPlainTextEditable": "false",
      "isTracked": "false",
      "plainText": "sample content",
      "replyToEmail": "fred.sakr@eloqua.com",
      "replyToName": "Eloqua, Inc.",
      "sendPlainTextOnly": "false",
      "senderEmail": "fred.sakr@eloqua.com",
      "senderName": "Eloqua, Inc.",
      "style": "",
      "subject": "sample"
    } 
    

     

    Properties

     

    Name

    Type

    Description

    Validations

    type"Email"
    bounceBackEmailstringEmailAddressRequirement
    emailGroupIdintegerThe unique id of the email groupIdRequirement
    htmlContentHtmlContentThe raw html for the content of the email
    isPlainTextEditablebooleanBooleanRequirement
    isTrackedbooleanIdentifies whether the email is trackedBooleanRequirement
    plainTextstringThe plain text version of this email
    replyToEmailstringEmailAddressRequirement
    replyToNamestring
    senderEmailstringEmailAddressRequirement
    senderNamestring
    sendPlainTextOnlybooleanIdentifies whether the plain text version should be sentBooleanRequirement
    subjectstring
    accessedAtintegerDateRequirement
    createdAtintegerDateRequirement
    createdByintegerIdRequirement
    currentStatusstring
    depthRequestDepthEnumRequirement
    descriptionString
    folderIdintegerIdRequirement
    idintegerIdRequirement
    namestring
    permissionsInstancePermissionsEnumRequirement
    updatedAtintegerDateRequirement
    updatedByintegerIdRequirement

     

     

    Related Operations

    • POST :  /assets/email
    • PUT :  /assets/email/{id}
    • DELETE :  /assets/email/{id}
    • GET (list) :  /assets/emails?search={searchTerm}&page={page}&count={count}&orderBy={orderBy}&lastUpdatedAt={lastUpdatedAt}

     

    Sample Code