Ask about anything in DailyStory Developer Documentation

Type a question in your own words below. Answers are written from our published articles and cite the ones they came from.

Recently updated

    Dashboard
    Edit Article Logout

    Create or Update an Email


    Creates a new email, or updates an existing email when the posted body includes a non-zero emailId. The URL path id is required by the route but is ignored by the endpoint — the server uses the emailId value from the JSON body. See Get Email for the full shape of the Email object.

    Path Parameters
    idnumberrequired
    Placeholder in the route. The actual target is taken from emailId in the request body; you can pass 0 here when creating.
    HTTP Request Examples
    Create a new email
    { "emailId": 0, "name": "Welcome Email", "campaignId": 69, "parentId": 0, "status": "Active", "from": "hello@example.com", "subject": "Welcome to Acme", "preheader": "Thanks for signing up", "body": "<p>Welcome!</p>", "plaintext": "Welcome!", "isEnabled": true, "isOpenTrackingEnabled": true, "isClickTrackingEnabled": true }
    Update an existing email
    { "emailId": 128, "name": "Welcome Email (v2)", "subject": "Welcome to Acme — updated" }
    HTTP Request Parameters
    emailIdnumber
    Id of the email to update. Omit or set to 0 to create a new email.
    namestring
    Display name of the email. Required.
    campaignIdnumber
    Id of the campaign this email belongs to. Required when creating.
    parentIdnumber
    Id of the parent email (used when replying "on top of" another email). Set to 0 for standalone emails.
    statusstring
    Email status. One of: Active, Paused, Archived, Deleted.
    subject, preheader, from, replyTo, to, cc, bccstring
    Standard email header fields. from is required for non-transactional sends; to is populated automatically at send time.
    bodystring
    The rendered HTML body of the email.
    plaintextstring
    Optional plaintext version of the body.
    cssstring
    Optional CSS stylesheet applied to the email.
    componentsstring
    Optional JSON payload used by the DailyStory email designer to round-trip structured edits.
    ampstring
    Optional AMP-for-Email variant.
    descriptionstring
    Internal description shown in the email list.
    isEnabled, isWebViewEnabled, isOpenTrackingEnabled, isClickTrackingEnabled, isTransactional, isIgnoreAutoReplyboolean
    Feature flags. isTransactional = true bypasses opt-out checks at send time.
    HTTP Response Examples
    200
    { "Status": true, "Message": "", "Response": { "id": "128" } }
    HTTP Response Parameters
    idstring
    The id of the created or updated email, returned as a string.

    How helpful was this article?

    👍 or 👎

    Related Articles

    Markdown Version