Assets

Create an asset

Create an asset. Can either be a email or landing page, and must be associated with a campaign.

post/assets

Request

Request body

namestring required
type'email' | 'landing' required
campaign_idstring required
from_namestring nullable
from_emailstring email nullable
reply_emailstring email nullable
subjectstring nullable
preview_textstring nullable
theme_idstring nullable
tagsstring[]

Example request

{
  "name": "test",
  "type": "email",
  "campaign_id": "609d7ce223411",
  "from_name": "Sender",
  "from_email": "email@knak.com",
  "reply_email": "reply_email@knak.com",
  "subject": "Email Subject",
  "preview_text": "This is the preview text.",
  "theme_id": "609d7ce223411",
  "custom_fields": [
    {
      "name": "custom_field_key_1",
      "value": "field value 1"
    }
  ],
  "tags": [
    "tag 1"
  ]
}

Response

OK

Example response

{
  "data": {
    "type": "asset",
    "id": "609d7ce223411",
    "attributes": {
      "id": "609d7ce223411",
      "creator_id": "611e7cf243412",
      "subject": "Spring Newsletter",
      "from_name": "John Doe",
      "from_email": "john.doe@email.com",
      "reply_email": "john.doe@email.com",
      "type": "email",
      "name": "Spring Newsletter",
      "folder_path": "Sample Brand/Folder 1/Folder 2/Sample Campaign",
      "campaign": "Sample Campaign",
      "brand": "Sample Brand",
      "language_code": "es",
      "version": "1.0",
      "parent_asset_id": "609d7ce22341c",
      "approval_status": "approved"
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.