List broadcasts
The broadcasts of the workspace, newest first, by status and audience.
opensend.broadcasts.list(input?)opensend broadcasts listInput
qstringText to search for. Only items that contain it are returned. Up to 40 characters.
limitintegerHow many items to return, from 1 to 100. Without it you get 25.
offsetintegerHow many items to skip. Use it with
limitto read the next page. Default:0.afterstringThe id of the last item you have. The answer starts with the item that follows it, which reads a long list without skipping or repeating when it changes meanwhile. Up to 64 characters.
beforestringThe id of the first item you have. The answer ends with the item just before it. Give this or
after, not both. Up to 64 characters.statusstringOnly broadcasts in this state:
draft,scheduled,sendingorsent.One of
draftscheduledsentsendingaudienceIdstringOnly broadcasts for this audience. Up to 64 characters.
Returns
The call resolves to the answer, already parsed. A call the API refuses throws OpenSendError with the code and the message of the answer. SDK lists the errors of the client itself.
object"list"Always
list.dataobject[]The items on this page.
data[].object"broadcast"Always
broadcast.data[].idstringThe id of the broadcast.
data[].namestringThe name of the broadcast. Recipients never see it.
data[].subjectstringThe subject line.
data[].audienceIdstringThe id of the audience it goes to.
data[].audienceNamestringThe name of that audience.
data[].topicIdstring | nullThe id of the topic it is sent on, or
null. On a topic it only reaches the contacts who get that topic.data[].statusstringdraftuntil it is sent or scheduled,scheduleduntil its time,sendingwhile it goes out,sentafter that.One of
draftscheduledsentsendingdata[].scheduledAtstring | nullWhen it starts sending, or
nullwhen no time is set.data[].sentAtstring | nullWhen the last message was handed over, or
null.data[].recipientsintegerHow many people are subscribed to its audience.
data[].deliveredintegerHow many messages were delivered.
data[].failedintegerHow many could not be sent.
data[].fromstringThe sender, such as
Acme <news@mail.example.com>.data[].replyTostringThe address replies go to. Empty when it is the default of the workspace, or the sender when there is none.
data[].htmlstring | nullThe HTML of the message, or
null.data[].textstring | nullThe plain text of the message, or
null.data[].designobject | nullThe blocks the broadcast is built from, or
nullfor a broadcast written as HTML. When it is set,htmlandtextare made from it.data[].design.previewstringOptionalThe line a mail app shows beside the subject before the message is opened.
{{NAME}}marks a variable.data[].design.styleRecord<string, string | number>OptionalCSS for the whole message, by property name. A background colour fills the page, a
maxWidthcentres the content, andfontFamily,fontSizeandlineHeightare what text gets unless a block sets its own.data[].design.darkRecord<string, string | number>OptionalColours for the whole message for a reader in dark mode, by property name:
backgroundColorfills the page, andcolorandborderColorgo to the content. It takes: color, backgroundColor, borderColor.data[].design.fontsobject[]OptionalFonts the message loads from an address of your own, 4 at most. A block or the page uses one by naming its
familyinfontFamily, and gets itsfallbackadded for the mail apps that load no web fonts.data[].design.fonts[].familystringThe name of the font, such as
Inter. A block or the page uses the font by naming it infontFamily.data[].design.fonts[].fallbackstringThe fonts to use where this one does not load, the one you want most first, such as
Helvetica, Arial, sans-serif. Pick fonts every device has.data[].design.fonts[].urlstringThe full
httpsaddress of the font file, on your own domain or a CDN. It cannot be a variable.data[].design.fonts[].formatstringThe format of the file:
woff2,woff,truetypeoropentype.One of
woff2wofftruetypeopentypedata[].design.fonts[].weightnumber | stringOptionalThe weight this file holds: a number from 100 to 900 in hundreds, or
normalorbold. Without it, 400.data[].design.fonts[].stylestringOptionalThe style this file holds:
normaloritalic. Without it,normal.One of
normalitalicdata[].design.cssstringOptionalCSS of your own for the whole message, up to 20000 characters. It goes into the head after the rules the design makes, and reaches a block by its
className. A rule that has to beat the style a block carries needs!important.</style,@import,expression(,javascript:,behavior:,-moz-bindingare refused.data[].design.bodyobject[]The blocks of the message, from top to bottom.
data[].design.body[].kindstringWhat the block is.
Section,Row,ColumnandContainerhold other blocks.Text,Heading,Button,Link,Markdown,CodeBlockandCodeInlinehold text.Imgis an image,Hra line andHtmlcustom code: HTML of your own that goes into the message as it is.One of
SectionRowColumnContainerTextHeadingButtonLinkImgHrMarkdownCodeBlockCodeInlineHtmldata[].design.body[].idstringThe id of the block. No other block of the design has it.
data[].design.body[].styleRecord<string, string | number>OptionalCSS for the block, by property name, such as
{ "fontSize": "16px", "color": "#111111" }. Only properties that work in mail are taken.data[].design.body[].alignstringOptionalWhere the block sits across its line:
left,centerorright.One of
leftcenterrightdata[].design.body[].classNamestringOptionalClass names for the block, one or several with one space between them, such as
hero wide, 200 characters at most. Thecssof the design reaches the block by them. A name cannot start withr-.data[].design.body[].onlystringOptionalThe one kind of screen the block shows on:
desktophides it on a phone, andphoneshows it on a phone and nowhere else. Without it, the block shows everywhere.One of
desktopphonedata[].design.body[].phoneRecord<string, string | number>OptionalCSS that takes the place of the style of the block on a phone, a screen up to 600 pixels wide, by property name, such as
{ "fontSize": "14px", "padding": "12px" }. It takes: fontSize, lineHeight, textAlign, padding, paddingTop, paddingRight, paddingBottom, paddingLeft, margin, marginTop, marginRight, marginBottom, marginLeft, width, maxWidth, height.data[].design.body[].darkRecord<string, string | number>OptionalColours that take the place of the ones of the block for a reader in dark mode, by property name, such as
{ "color": "#f4f4f5" }. It takes: color, backgroundColor, borderColor.data[].design.body[].textstringOptionalThe words of a block that holds text, up to 20000 characters.
{{NAME}}marks a variable. AMarkdownblock takes Markdown here, aCodeBlocktakes the code and anHtmlblock takes its HTML, up to 60000 characters.data[].design.body[].childrenunknown[]OptionalThe blocks inside a
Section, aRow, aColumnor aContainer, each shaped like a block ofbody. ARowtakesColumnblocks only, and aColumnsits in aRowonly.data[].design.body[].hrefstringOptionalWhere a
Buttonor aLinkleads: a full address, or one variable as the whole value, such as{{URL}}.data[].design.body[].targetstringOptionalWhere the link opens:
_blankfor a new tab or_self. Without it,_blank.One of
_blank_selfdata[].design.body[].srcstringOptionalThe address of the picture of an
Img: a full address, or one variable as the whole value.data[].design.body[].altstringOptionalWhat the picture of an
Imgshows, in words, for someone who cannot see it.data[].design.body[].widthstring | numberOptionalThe width of an
Imgor aColumn: a number of pixels, or a length such as50%.data[].design.body[].heightstring | numberOptionalThe height of an
Img: a number of pixels, or a length.data[].design.body[].valignstringOptionalWhere the content of a
Columnsits:top,middleorbottom.One of
topmiddlebottomdata[].design.body[].asstringOptionalThe level of a
Heading, fromh1toh6. Without it,h1.One of
h1h2h3h4h5h6data[].design.body[].languagestringOptionalThe language of a
CodeBlock, such astypescriptorbash. One it does not know is shown as plain text.data[].design.body[].themestringOptionalThe colours of a
CodeBlock:oneDark,oneLight,dracula,nord,vscDarkPlus,vs,ghcolorsormaterialLight. Without it,oneDark.data[].design.body[].lineNumbersbooleanOptionalWhether a
CodeBlocknumbers its lines.data[].design.body[].stackbooleanOptionaltrueputs the columns of aRowunder each other on a phone. Only aRowtakes it.data[].createdAtstringWhen the broadcast was made.
totalintegerHow many items match in all, on every page together.
hasMorebooleanWhether more items follow this page.