Skip to content

Commit 925cdf2

Browse files
committed
Add visual template and new permissions to docs.
1 parent 1599957 commit 925cdf2

File tree

3 files changed

+33
-23
lines changed

3 files changed

+33
-23
lines changed

docs/docs/content/apis/campaigns.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ Retrieve all campaigns.
6666
"subject": "Welcome to listmonk",
6767
"from_email": "No Reply <noreply@yoursite.com>",
6868
"body": "<h3>Hi {{ .Subscriber.FirstName }}!</h3>\n\t\t\tThis is a test e-mail campaign. Your second name is {{ .Subscriber.LastName }} and you are from {{ .Subscriber.Attribs.city }}.",
69+
"body_source": null,
6970
"send_at": "2020-03-15T17:36:41.293233+01:00",
7071
"status": "draft",
7172
"content_type": "richtext",
@@ -128,6 +129,7 @@ curl -u "api_user:token" -X GET 'http://localhost:9000/api/campaigns/1'
128129
"subject": "Welcome to listmonk",
129130
"from_email": "No Reply <noreply@yoursite.com>",
130131
"body": "<h3>Hi {{ .Subscriber.FirstName }}!</h3>\n\t\t\tThis is a test e-mail campaign. Your second name is {{ .Subscriber.LastName }} and you are from {{ .Subscriber.Attribs.city }}.",
132+
"body_source": null,
131133
"send_at": "2020-03-15T17:36:41.293233+01:00",
132134
"status": "draft",
133135
"content_type": "richtext",
@@ -286,21 +288,22 @@ Create a new campaign.
286288

287289
##### Parameters
288290

289-
| Name | Type | Required | Description |
290-
|:-------------|:----------|:---------|:----------------------------------------------------------------------------------------|
291-
| name | string | Yes | Campaign name. |
292-
| subject | string | Yes | Campaign email subject. |
293-
| lists | number\[\] | Yes | List IDs to send campaign to. |
294-
| from_email | string | | 'From' email in campaign emails. Defaults to value from settings if not provided. |
295-
| type | string | Yes | Campaign type: 'regular' or 'optin'. |
296-
| content_type | string | Yes | Content type: 'richtext', 'html', 'markdown', 'plain'. |
297-
| body | string | Yes | Content body of campaign. |
298-
| altbody | string | | Alternate plain text body for HTML (and richtext) emails. |
299-
| send_at | string | | Timestamp to schedule campaign. Format: 'YYYY-MM-DDTHH:MM:SSZ'. |
300-
| messenger | string | | 'email' or a custom messenger defined in settings. Defaults to 'email' if not provided. |
301-
| template_id | number | | Template ID to use. Defaults to default template if not provided. |
302-
| tags | string\[\] | | Tags to mark campaign. |
303-
| headers | JSON | | Key-value pairs to send as SMTP headers. Example: \[{"x-custom-header": "value"}\]. |
291+
| Name | Type | Required | Description |
292+
|:-------------|:-----------|:---------|:----------------------------------------------------------------------------------------|
293+
| name | string | Yes | Campaign name. |
294+
| subject | string | Yes | Campaign email subject. |
295+
| lists | number\[\] | Yes | List IDs to send campaign to. |
296+
| from_email | string | | 'From' email in campaign emails. Defaults to value from settings if not provided. |
297+
| type | string | Yes | Campaign type: 'regular' or 'optin'. |
298+
| content_type | string | Yes | Content type: 'richtext', 'html', 'markdown', 'plain', 'visual'. |
299+
| body | string | Yes | Content body of campaign. |
300+
| body_source | string | | If content_type is `visual`, the JSON block source of the body. |
301+
| altbody | string | | Alternate plain text body for HTML (and richtext) emails. |
302+
| send_at | string | | Timestamp to schedule campaign. Format: 'YYYY-MM-DDTHH:MM:SSZ'. |
303+
| messenger | string | | 'email' or a custom messenger defined in settings. Defaults to 'email' if not provided. |
304+
| template_id | number | | Template ID to use. Defaults to default template if not provided. |
305+
| tags | string\[\] | | Tags to mark campaign. |
306+
| headers | JSON | | Key-value pairs to send as SMTP headers. Example: \[{"x-custom-header": "value"}\]. |
304307

305308
##### Example request
306309

@@ -332,6 +335,7 @@ curl -u "api_user:token" 'http://localhost:9000/api/campaigns' -X POST -H 'Conte
332335
"subject": "Hello, world",
333336
"from_email": "listmonk \u003cnoreply@listmonk.yoursite.com\u003e",
334337
"body": "",
338+
"body_source": null,
335339
"altbody": null,
336340
"send_at": null,
337341
"status": "draft",

docs/docs/content/apis/templates.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ curl -u "api_user:token" -X GET 'http://localhost:9000/api/templates'
3434
"updated_at": "2020-03-14T17:36:41.288578+01:00",
3535
"name": "Default template",
3636
"body": "{{ template \"content\" . }}",
37+
"body_source": null,
3738
"type": "campaign",
3839
"is_default": true
3940
}
@@ -69,6 +70,7 @@ curl -u "api_user:token" -X GET 'http://localhost:9000/api/templates/1'
6970
"updated_at": "2020-03-14T17:36:41.288578+01:00",
7071
"name": "Default template",
7172
"body": "{{ template \"content\" . }}",
73+
"body_source": null,
7274
"type": "campaign",
7375
"is_default": true
7476
}
@@ -118,12 +120,13 @@ Create a template.
118120

119121
##### Parameters
120122

121-
| Name | Type | Required | Description |
122-
|:--------|:----------|:---------|:----------------------------------------------|
123-
| name | string | Yes | Name of the template |
124-
| type | string | Yes | Type of the template (`campaign` or `tx`) |
125-
| subject | string | | Subject line for the template (only for `tx`) |
126-
| body | string | Yes | HTML body of the template |
123+
| Name | Type | Required | Description |
124+
|:------------|:-------|:---------|:------------------------------------------------------------------------------|
125+
| name | string | Yes | Name of the template |
126+
| type | string | Yes | Type of the template (`campaign`, `campaign_visual`, or `tx`) |
127+
| subject | string | | Subject line for the template (only for `tx`) |
128+
| body_source | string | | If type is `campaign_visual`, the JSON source for the email-builder tempalate |
129+
| body | string | Yes | HTML body of the template |
127130

128131
##### Example Request
129132

@@ -149,6 +152,7 @@ curl -u "api_user:token" -X POST 'http://localhost:9000/api/templates' \
149152
"updated_at": "2020-03-14T17:36:41.288578+01:00",
150153
"name": "Default template",
151154
"body": "{{ template \"content\" . }}",
155+
"body_source": null,
152156
"type": "campaign",
153157
"is_default": true
154158
}
@@ -192,6 +196,7 @@ curl -u "api_user:token" -X PUT 'http://localhost:9000/api/templates/1/default'
192196
"updated_at": "2020-03-14T17:36:41.288578+01:00",
193197
"name": "Default template",
194198
"body": "{{ template \"content\" . }}",
199+
"body_source": null,
195200
"type": "campaign",
196201
"is_default": true
197202
}

docs/docs/content/roles-and-permissions.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ A user role is a collection of user related permissions. User roles are attached
66

77
| Group | Permission | Description |
88
| ----------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
9-
| lists | lists:get_all | Get details of all lists |
9+
| lists | lists:get_all | Get details of all lists |
1010
| | lists:manage_all | Create, update, and delete all lists |
1111
| subscribers | subscribers:get | Get individual subscriber details |
1212
| | subscribers:get_all | Get all subscribers and their details |
1313
| | subscribers:manage | Add, update, and delete subscribers |
1414
| | subscribers:import | Import subscribers from external files |
1515
| | subscribers:sql_query | Run SQL queries on subscriber data. **WARNING:** This permission will allow the querying of all lists and subscribers directly from the database with SQL expressions, superceding individual list and subscriber permissions above. |
1616
| | tx:send | Send transactional messages to subscribers |
17-
| campaigns | campaigns:get | Get campaign details |
17+
| campaigns | campaigns:get | Get and view campaigns belonging to permitted lists |
18+
| | campaigns:get_all | Get and view campaigns across all lists |
1819
| | campaigns:get_analytics | Access campaign performance metrics |
1920
| | campaigns:manage | Create, update, and delete campaigns |
2021
| bounces | bounces:get | Get email bounce records |

0 commit comments

Comments
 (0)