Skip to content

There is no way to create email campaigns with current endpoints #19

@nestorvc

Description

@nestorvc

Right now there is no easy way to achieve creating custom email campaigns as described on the official Emarsys docs: https://dev.emarsys.com/suite/emails/email_create.html This is pretty helpful in many ways, such as creating custom content for dynamic newsletters.

I think it can be resolved as simple as this on the following file /api/endpoints/email/index.js adding this code:

/**
 * new
 * Creates a new email campaign with custom data
 * customerId<String>: the customer id
 * options<Object>: as seen on https://dev.emarsys.com/suite/emails/email_create.html
 * returns: <Object>
 * Example:
 * {
 *  "replyCode": 0,
 *  "replyText": "OK",
 *  "data":
 *  {
 *    "id": 2140
 *  }
 *}
 */
Email.prototype.new = function(customerId, options) {
  logger.log('email_new');
  return this._request.post(customerId, '/email', options);
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions