Skip to content

Create Dynamic Content Profile

POST
/api/v1/workspaces/{workspace_id}/dynamic_content_profiles
curl --request POST \
--url https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/dynamic_content_profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "Mailchimp Profile", "template_engine_preset": "liquid" }'

Creates a new DynamicContentProfile for the currently logged in user.

  • OAuth2
    dynamic_content_profiles:write
workspace_id
required
integer

Workspace ID

Media typeapplication/json
object
name
required
string
Example
Mailchimp Profile
template_engine_preset
string | null
Example
liquid

Successful

Media typeapplication/json
object
id
required
string
name
required
string
created_at
required
string format: date-time
updated_at
required
string format: date-time
organization_id
required
integer
template_engine_preset

Optional. Stable key identifying the template engine preset applied to this profile’s conditional syntax.

string | null
template_engine_preset_schema
required
One of:

Capability manifest for a template engine preset, describing the joiners, operators, and branch options allowed when authoring conditionals against a profile using this preset.

object
joiners
required

Supported joiner strings between conditions within a branch (e.g. “and”, “or”). Empty disallows compound conditions.

Array<string>
operators_by_type
required

Map of value type (“string”, “number”, “boolean”) to the operators allowed for that type. Each operator declares whether it takes a value, so the UI picker knows whether to render a value input.

object
key
additional properties
Array<object>
object
key
required

Wire identifier for the operator (e.g. “equals”, “is_empty”).

string
requires_value
required

Whether this operator takes a value. When false, the UI picker hides the value input and the wire payload omits value.

boolean
Example
{
"id": "uuid TODO",
"name": "Mailchimp Profile",
"created_at": "2023-08-23T10:30:00.000Z",
"updated_at": "2023-08-23T10:30:00.000Z",
"organization_id": 12345,
"template_engine_preset": "liquid",
"template_engine_preset_schema": {
"joiners": [
"and",
"or"
],
"operators_by_type": {
"string": [
{
"key": "equals",
"requires_value": true
},
{
"key": "is_empty",
"requires_value": false
}
],
"boolean": [
{
"key": "equals",
"requires_value": true
}
]
}
}
}

Unauthorized

Media typeapplication/json
object
message
required
string
Example
{
"message": "Record not found"
}

Forbidden

Media typeapplication/json
object
message
required
string
Example
{
"message": "Record not found"
}

Unprocessable Entity

Media typeapplication/json
object
message
required
string
errors
required
object
key
additional properties
Array<string>
Example
{
"errors": {
"username": [
"Username is required.",
"Username must be unique."
],
"email": [
"Invalid email format."
]
}
}