Skip to content
View as Markdown

GET Dynamic Posts​

GET
/campaigns-pro/posts

Retrieve WordPress posts for use in dynamic email content blocks. Supports filtering by post type, taxonomy terms, date range, and custom ordering. Returns post data along with available post types. Used by the email builder's dynamic post block.

Authorizations​

ApplicationPasswords

WordPress Application Passwords — use Basic auth with your WordPress username and an application password in the format: username:application_password

Type
API Key (header: Authorization)

Parameters​

Query Parameters

post_type

WordPress post type to query (e.g., 'post', 'page', or any custom post type).

Type
string
Default
"post"
per_page

Number of posts to return.

Type
integer
orderBy

Field to order posts by (e.g., 'date', 'title', 'modified').

Type
string
order

Sort direction.

Type
string
Valid values
"ASC""DESC"
days

Only include posts from the last N days. Use '0' or omit for no date restriction.

Type
string
excerptLength

Number of words for the post excerpt.

Type
string
Default
"55"
taxTypes

Taxonomy filter. Nested array where each entry maps taxonomy slugs to arrays of term names.

Type
array
operator

Logical operator for combining taxonomy queries.

Type
string
Valid values
"OR""AND"
Default
"OR"

Responses​

List of posts and available post types.

application/json
JSON
{
"posts": [
{
"post_title": "string",
"post_excerpt": "string",
"comment_count": 0,
"date": "string",
"thumbnail": "string",
"author_avatar": "string",
"author": "string"
}
],
"post_types": [
{
"value": "string",
"label": "string"
}
]
}

Playground​

Authorization
Variables
Key
Value

Samples​

Powered by VitePress OpenAPI