Skip to content

Commit

Permalink
Allow setting json_body in campaigns via the API
Browse files Browse the repository at this point in the history
  • Loading branch information
wmnnd committed Jun 12, 2024
1 parent 90e3e5d commit f159ed4
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion lib/keila_web/api/schemas/mailings_campaign.ex
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ defmodule KeilaWeb.Api.Schemas.MailingsCampaign do
{% endfor %}
"""
},
json_body: %{
type: :map,
example: """
{
"blocks": [{
"id":"ff0011",
"type":"paragraph",
"data": {"text": "Hello, I am a block campaign!"}
}]
}
"""
},
data: %{
type: :map,
example: %{
Expand All @@ -38,7 +50,7 @@ defmodule KeilaWeb.Api.Schemas.MailingsCampaign do
type: %{
type: :string,
required: true,
enum: ["markdown", "text"],
enum: ["markdown", "text", "block"],
example: "markdown"
}
}
Expand Down Expand Up @@ -101,6 +113,7 @@ defmodule KeilaWeb.Api.Schemas.MailingsCampaign.Params do
@allowed_properties [
:subject,
:text_body,
:json_body,
:settings,
:template_id,
:sender_id,
Expand Down

0 comments on commit f159ed4

Please sign in to comment.