Create Conditionals
POST /api/v1/workspaces/{workspace_id}/conditionals
Creates a new conditional.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Workspace ID
Request Body
Section titled “Request Body ”object
Example
Over age 30Whether this conditional is permitted to be used in a subject or preheader.
object
Example
gold_membershipExample
Gold Membershipobject
The closing syntax tag for the conditional block.
Example
{% endif %}Key-value pairs where the key is the branch key and the value is the opening syntax for that branch.
object
Example
{ "gold_membership": "{% if membership == 'gold' %}", "silver_membership": "{% elsif membership == 'silver' %}"}A map of DynamicContentProfile IDs to platform-specific syntax values. Each value overrides the default syntax for that profile’s platform.
object
Example
{ "a1b2c3d4-5678-90ab-cdef-1234567890ab": "*|FNAME|*"}Responses
Section titled “ Responses ”Successful
object
Example
12345Example
Over age 30sobject
The closing syntax tag for the conditional block.
Example
{% endif %}Key-value pairs where the key is the branch key and the value is the opening syntax for that branch.
object
Example
{ "gold_membership": "{% if membership == 'gold' %}", "silver_membership": "{% elsif membership == 'silver' %}"}object
Example
gold_membershipExample
Gold MembershipExample
2023-08-23T10:30:00.000ZExample
2023-08-23T10:30:00.000ZExample
12345object
object
The closing syntax tag for the conditional block.
Example
{% endif %}Key-value pairs where the key is the branch key and the value is the opening syntax for that branch.
object
Example
{ "gold_membership": "{% if membership == 'gold' %}", "silver_membership": "{% elsif membership == 'silver' %}"}Unauthorized
object
Example
Record not foundForbidden
object
Example
Record not foundUnprocessable Entity
object
Example
Failed to saveobject
Example
{ "errors": { "username": [ "Username is required.", "Username must be unique." ], "email": [ "Invalid email format." ] }}