POST /settings
1 min
POST
https://api.cmp.optimizely.com/v3/settings
executeboolean<p>If <code>execute=true</code> the settings are created or updated. Otherwise, the endpoint returns only the changeset.</p>
overwrite_workflowsboolean<p>If <code>overwrite_workflows=true</code> the existing workflows are overwritten. Otherwise, a new workflow is created where a prefix <code>Copy of</code> is added to the workflow's name.</p>
acceptstringGenerated from available response content types
bodyobjectPayload to create or update settings
200Created or updated settings and changeset
401Authorization error
403Permission error
422Unprocessable entity error
curl --request POST \
--url https://api.cmp.optimizely.com/v3/settings \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"labels": [
{
"has_single_value": true,
"label_type": "Content Pillar",
"labels": [
{
"name": "Pillar1",
"color": "#4ECFD5"
}
]
}
],
"custom_fields": {
"currency": [
{
"label": "A Currency Custom Field",
"decimal_places": 1,
"currency_code": "USD",
"has_thousand_separator": false
}
],
"number": [
{
"label": "A Number Custom Field",
"decimal_places": 1,
"has_thousand_separator": false
}
],
"percentage": [
{
"label": "A Percentage Custom Field",
"decimal_places": 1
}
],
"checkbox": [
{
"label": "A custom field with choice",
"choices": []
}
],
"dropdown": [
{
"label": "A custom field with choice",
"choices": []
}
],
"multichoice": [
{
"label": "A custom field with choice",
"choices": []
}
],
"multi_select_dropdown": [
{
"label": "A custom field with choice",
"choices": []
}
],
"date": [
{
"label": "A Custom Field"
}
],
"image": [
{
"label": "A Custom Field"
}
],
"richtext": [
{
"label": "A Custom Field"
}
],
"string": [
{
"label": "A Custom Field"
}
],
"textarea": [
{
"label": "A Custom Field"
}
],
"video": [
{
"label": "A Custom Field"
}
]
},
"workflows": [
{
"is_flexible_workflow": false,
"is_not_pushed_to_library_by_default": false,
"is_released_as_asset": false,
"name": "A Workflow",
"labels": [
{
"default_value": [],
"is_required": true,
"label_type": "Content Pillar",
"is_required_at_task_creation": false
}
],
"custom_fields": [
{
"is_required": false,
"field": "exampleCustomField",
"default_value": [],
"type": "equal"
}
],
"default_channels": [
{
"display_name": "exampleChannel",
"type": "twitter"
}
],
"blacklisted_channels": [
{
"display_name": "exampleChannel",
"type": "twitter"
}
],
"steps": [
{
"label": "Step 1",
"substeps": [
{
"actions": [],
"label": "Substep 1",
"is_external": false,
"external_system": "",
"description": "This is a substep description"
}
],
"description": "This is a dummy example",
"duration": 1
}
],
"description": "Sample description"
}
],
"templates": [
{
"name": "Template 1",
"description": "Template description",
"public_description": "Template public description",
"form_fields": [
{
"field_type": "custom_field",
"help": "This is a helper text",
"is_required": false,
"logic_rules": [
{
"action": {
"target_field": {
"identifier": "end_of_form",
"custom_field_type": "",
"type": "end_of_form"
},
"type": "jump_to",
"values": []
},
"condition": {
"operator": "equal",
"values": []
}
}
],
"sort_order": 0,
"identifier": "SingleChoice1",
"custom_field_type": "multichoice"
}
],
"sections": [
{
"label": "Test section",
"id": "9ec506f480dbc2d5f6919168ae448c41"
}
],
"instructions": [
{
"description": "Test instruction description",
"id": "9ec506f480dbc2d5f6919168ae448c40"
}
],
"types": []
}
],
"apps": [
{
"name": "App 1",
"description": "Sample description",
"homepage_url": "https://example1.com",
"authorization_callback_urls": [],
"expose_email": true,
"env": "production"
}
],
"webhooks": [
{
"name": "Webhook 1",
"description": "Sample description",
"callback_url": "https://exampledomain.com",
"secret": "secret121",
"event_names": []
}
],
"routing_rules": [
{
"name": "example Routing Rule",
"rules": [
{
"field_type": "customField",
"identifier": "exampleCustomField1",
"operator": "equal",
"value": [],
"unit": "days",
"custom_field_type": "multichoice"
}
],
"watchers": [],
"description": "Sample routing rule description",
"template_name": "Sample template name"
}
]
}'