Skip to main content

kobana dashboards email-layouts

Commands of kobana dashboards email-layouts. Every global option (Global options) applies here.

CommandHTTPDescription
email-layouts listGET /v1/email_layoutsList email layouts
email-layouts createPOST /v1/email_layoutsCreate email layout
email-layouts init-defaultsPOST /v1/email_layouts/init_defaultsCreate default layout
email-layouts getGET /v1/email_layouts/{id}Get email layout
email-layouts updatePATCH /v1/email_layouts/{id}Update email layout
email-layouts deleteDELETE /v1/email_layouts/{id}Delete email layout

email-layouts list​

List email layouts

kobana dashboards email-layouts list [OPTIONS]

GET /v1/email_layouts

Lists the organization's email layouts, default first. Returns the whole set, unpaginated.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200The organization's layouts.
404Resource not found in the current organization.

email-layouts create​

Create email layout

kobana dashboards email-layouts create [OPTIONS]

POST /v1/email_layouts

Creates a layout. The HTML must contain the {{content}} placeholder.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
namestringyesLayout name (required on create).
html_bodystringyesHTML document containing the {{content}} placeholder (required on create; without it, 422).
is_defaultbooleannoMakes this the default layout; the previous default stops being one.

More fields and nested objects: kobana schema dashboards.email-layouts.create.

Responses

HTTPDescription
201Layout created.
400Invalid request (missing required field, invalid type or variables).
404Resource not found in the current organization.
422Request body failed validation.

email-layouts init-defaults​

Create default layout

kobana dashboards email-layouts init-defaults [OPTIONS]

POST /v1/email_layouts/init_defaults

Makes sure the organization has a default layout: returns the current one or creates the built-in one. Never overwrites a layout.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200The default layout.
404Resource not found in the current organization.

email-layouts get​

Get email layout

kobana dashboards email-layouts get [ID] [OPTIONS]

GET /v1/email_layouts/{id}

Returns a layout of the organization.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200The layout.
404Resource not found in the current organization.

email-layouts update​

Update email layout

kobana dashboards email-layouts update [ID] [OPTIONS]

PATCH /v1/email_layouts/{id}

Updates the name, HTML (which must keep {{content}}), default or active flag. Only the fields sent change.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
namestringnoLayout name (required on create).
html_bodystringnoHTML document containing the {{content}} placeholder (required on create; without it, 422).
is_defaultbooleannoMakes this the default layout; the previous default stops being one.
is_activebooleannoActivates or deactivates the layout.

More fields and nested objects: kobana schema dashboards.email-layouts.update.

Responses

HTTPDescription
200Layout updated.
400Invalid request (missing required field, invalid type or variables).
404Resource not found in the current organization.
422Request body failed validation.

email-layouts delete​

Delete email layout

kobana dashboards email-layouts delete [ID] [OPTIONS]

DELETE /v1/email_layouts/{id}

Permanently deletes a layout. Emails fall back to the default layout (or the built-in one).

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Layout deleted.
404Resource not found in the current organization.