openapi: 3.2.0
info:
title: Newscred Campaigns API
version: V3
description: 'Operations tagged Campaigns across 2 of this provider''s published API definitions: newscred-cmp-open-api-openapi.json, newscred-welcome-open-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- description: v3 version of Optimizely CMP Open API
url: https://api.cmp.optimizely.com/v3
- url: https://api.welcomesoftware.com/v3
description: v3 version of _Welcome_ Open API
tags:
- name: Campaigns
paths:
/campaigns:
get:
description: Experimental Get a list of campaigns.
operationId: listCampaigns
parameters:
- example: 127a32121da23c3a543
in: query
name: owner
schema:
description: Owner ID of the campaign
type: string
- example: '2022-08-24T00:00:00.000Z'
in: query
name: start_date
schema:
description: Start date of the campaign, in ISO 8601 UTC format
type: string
- example: '2022-08-24T00:00:00.000Z'
in: query
name: end_date
schema:
description: End date of the campaign, in ISO 8601 UTC format
type: string
- $ref: '#/components/parameters/offset'
- $ref: '#/components/parameters/page_size'
responses:
'200':
content:
application/json:
schema:
additionalProperties: false
properties:
data:
description: List of campaigns
items:
$ref: '#/components/schemas/CampaignListResponseItem'
type: array
pagination:
allOf:
- $ref: '#/components/schemas/Pagination'
- properties:
next:
example: https://api.cmp.optimizely.com/v3/campaigns?offset=10&page_size=10
type:
- string
- 'null'
type: object
required:
- data
- pagination
type: object
description: List of fetched campaigns
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
summary: GET /campaigns
tags:
- Campaigns
security:
- OAuth2:
- openid
- profile
- offline_access
post:
description: Experimental Create a campaign
operationId: createCampaign
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CampaignCreateRequest'
description: Payload to create a campaign
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/CampaignResponse'
description: Created campaign
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/UnprocessableEntity'
summary: POST /campaigns
tags:
- Campaigns
security:
- OAuth2:
- openid
- profile
- offline_access
servers:
- description: v3 version of Optimizely CMP Open API
url: https://api.cmp.optimizely.com/v3
/campaigns/{campaign_id}/fields/{field_id}:
put:
description: 'Experimental Update the field value of a campaign. '
operationId: updateCampaignField
parameters:
- example: 5f857f30e1c4a2038d6179e9
in: path
name: campaign_id
required: true
schema:
description: Unique identifier of the campaign
type: string
- example: 4f857f30e1c4a2038d6179e7
in: path
name: field_id
required: true
schema:
description: Unique identifier of the field of the campaign
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CampaignFieldUpdateRequest'
description: Payload to update the field value
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CampaignFieldUpdateResponse'
description: Updated the campaign field
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
summary: PUT /campaigns/{campaign_id}/fields/{field_id}
tags:
- Campaigns
security:
- OAuth2:
- openid
- profile
- offline_access
servers:
- description: v3 version of Optimizely CMP Open API
url: https://api.cmp.optimizely.com/v3
/campaigns/{id}:
get:
description: Get a campaign
operationId: getCampaign
parameters:
- example: 8q7f910551b00a722e0418830cee6612
in: path
name: id
required: true
schema:
description: Unique identifier of the campaign
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CampaignResponse'
description: Fetched campaign
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
summary: GET /campaigns/{id}
tags:
- Campaigns
security:
- OAuth2:
- openid
- profile
- offline_access
patch:
description: 'Experimental Update a campaign '
operationId: updateCampaign
parameters:
- example: 8q7f910551b00a722e0418830cee6612
in: path
name: id
required: true
schema:
description: Unique identifier of the campaign
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CampaignUpdateRequest'
description: Payload to update the campaign
required: true
responses:
'204':
description: Campaign updated
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
summary: PATCH /campaigns/{id}
tags:
- Campaigns
security:
- OAuth2:
- openid
- profile
- offline_access
servers:
- description: v3 version of Optimizely CMP Open API
url: https://api.cmp.optimizely.com/v3
/campaigns/{id}/attachments:
post:
description: 'Experimental Add an attachment to the campaign. '
operationId: addAttachmentToCampaign
parameters:
- example: 5f857f30e1c4a2038d6179e9
in: path
name: id
required: true
schema:
description: Unique identifier of the campaign
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AttachmentRequest'
description: Payload to add an attachment
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/AttachmentResponse'
description: Attachment added to the campaign
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
summary: POST /campaigns/{id}/attachments
tags:
- Campaigns
security:
- OAuth2:
- openid
- profile
- offline_access
servers:
- description: v3 version of Optimizely CMP Open API
url: https://api.cmp.optimizely.com/v3
/campaigns/{id}/brief:
get:
description: Get brief of the campaign
operationId: getCampaignBrief
parameters:
- example: 5f857f30e1c4a2038d6179e9
in: path
name: id
required: true
schema:
description: Unique identifier of the campaign
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CampaignBriefResponse'
description: Fetched brief of the campaign
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
summary: GET /campaigns/{id}/brief
tags:
- Campaigns
security:
- OAuth2:
- openid
- profile
- offline_access
servers:
- description: v3 version of Optimizely CMP Open API
url: https://api.cmp.optimizely.com/v3
/campaigns/{id}/comments:
post:
description: 'Experimental Post a comment on a campaign. '
operationId: addCommentToCampaign
parameters:
- example: da80cfd7bbf84959a8a981acbad996b3
in: path
name: id
required: true
schema:
description: Unique identifier of the campaign
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CommentCreateRequest'
description: Payload to add a comment
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/CampaignCommentResponse'
description: Created a comment for the campaign
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
summary: POST /campaigns/{id}/comments
tags:
- Campaigns
security:
- OAuth2:
- openid
- profile
- offline_access
servers:
- description: v3 version of Optimizely CMP Open API
url: https://api.cmp.optimizely.com/v3
/campaigns/{id}/fields:
get:
description: 'Experimental Get the list of fields of a campaign. '
operationId: listCampaignFields
parameters:
- example: 5f857f30e1c4a2038d6179e9
in: path
name: id
required: true
schema:
description: Unique identifier of the campaign
type: string
- $ref: '#/components/parameters/offset'
- $ref: '#/components/parameters/page_size'
responses:
'200':
content:
application/json:
schema:
additionalProperties: false
properties:
data:
description: List of fields
items:
$ref: '#/components/schemas/FieldListResponseItem'
type: array
pagination:
allOf:
- $ref: '#/components/schemas/Pagination'
- properties:
next:
example: https://api.cmp.optimizely.com/v3/campaigns/5f857f30e1c4a2038d6179e9/fields?offset=10&page_size=10
type:
- string
- 'null'
type: object
required:
- data
- pagination
type: object
description: List of fetched fields
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
summary: GET campaigns/{id}/fields
tags:
- Campaigns
security:
- OAuth2:
- openid
- profile
- offline_access
post:
description: Experimental Add a field to a campaign.
operationId: addFieldToCampaign
parameters:
- example: 5f857f30e1c4a2038d6179e9
in: path
name: id
required: true
schema:
description: Unique identifier of the campaign
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ObjectFieldCreateRequest'
description: Payload to add a field to a campaign
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/ObjectFieldCreateResponse'
description: Added field to a campaign.
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/UnprocessableEntity'
summary: POST campaigns/{id}/fields
tags:
- Campaigns
security:
- OAuth2:
- openid
- profile
- offline_access
servers:
- description: v3 version of Optimizely CMP Open API
url: https://api.cmp.optimizely.com/v3
components:
schemas:
NumberTypeObjectFieldUpdatePayload:
allOf:
- $ref: '#/components/schemas/BaseObjectFieldUpdatePayload'
- properties:
values:
description: Accepts a single numeric value
items:
example: 200
type: number
maxItems: 1
type: array
type: object
StringTypeObjectFieldUpdatePayload:
allOf:
- $ref: '#/components/schemas/BaseObjectFieldUpdatePayload'
- properties:
values:
description: Any single string
items:
example: This is a test string
type: string
type: array
type: object
BaseObjectFieldUpdatePayload:
properties:
type:
description: Type of the field
example: checkbox
type: string
values:
description: Values for the campaign field
type: array
required:
- type
- values
type: object
MultiChoiceTypeObjectField:
allOf:
- $ref: '#/components/schemas/BaseObjectField'
- $ref: '#/components/schemas/MultiChoiceTypeObjectFieldUpdatePayload'
CampaignCommentResponse:
additionalProperties: false
properties:
attachments:
description: List of attachments of the comment
example:
- id: a113667245d111eb8945000c
name: sample.png
url: https://files.cmp.optimizely.com/download/96c314a645d111eb8945000c291b51d4?token=
items:
$ref: '#/components/schemas/AttachmentResponse'
type: array
comment_by:
description: Unique identifier of the user who posted the comment
example: 62a8455e29fed3045d9c7a8b
type: string
created_at:
description: Creation date and time of the campaign comment in ISO 8601 UTC format (2020-02-10T10:40:45Z)
example: '2020-10-06T13:15:30Z'
format: date-time
type: string
id:
description: Unique identifier of the campaign comment
example: 5fe38c39574b52a62a089239
type: string
is_resolved:
description: Determines if the comment is resolved in Optimizely CMP
example: false
type: boolean
links:
additionalProperties: false
description: Meta links
properties:
campaign:
description: URL of the campaign
example: https://api.cmp.optimizely.com/v3/campaigns/5fe38c39574b52a62a089239
type: string
comment_by:
description: URL of the user who posted the comment
example: https://api.cmp.optimizely.com/v3/users/62a8455e29fed3045d9c7a8b
type: string
required:
- campaign
- comment_by
type: object
modified_at:
description: Last modification date and time of the campaign comment in ISO 8601 UTC format (2020-02-10T10:40:45Z)
example: '2020-10-06T14:15:30Z'
format: date-time
type: string
parent_comment_id:
description: Unique identifier of the parent comment
example: 5fe38c39574b52a62a089238
type:
- string
- 'null'
value:
description: Content of the comment
example: Well done!
type: string
required:
- id
- value
- is_resolved
- parent_comment_id
- comment_by
- created_at
- modified_at
- attachments
- links
type: object
FieldTypeSimpleNumber:
allOf:
- $ref: '#/components/schemas/FieldBaseType'
- properties:
decimal_places:
description: Decimal place of the numerical field
example: 2
type:
- integer
- 'null'
has_thousand_separator:
description: Whether the numerical field has a thousand separator
example: true
type: boolean
required:
- has_thousand_separator
- decimal_places
type: object
FieldListResponseItem:
discriminator:
mapping:
checkbox: '#/components/schemas/FieldTypeCheckbox'
currency_number: '#/components/schemas/FieldTypeCurrencyNumber'
date: '#/components/schemas/FieldTypeCommon'
dropdown: '#/components/schemas/FieldTypeDropdown'
image: '#/components/schemas/FieldTypeCommon'
label: '#/components/schemas/FieldTypeLabel'
percentage_number: '#/components/schemas/FieldTypePercentageNumber'
radio_button: '#/components/schemas/FieldTypeRadio'
rich_text: '#/components/schemas/FieldTypeCommon'
simple_number: '#/components/schemas/FieldTypeSimpleNumber'
text: '#/components/schemas/FieldTypeCommon'
text_area: '#/components/schemas/FieldTypeCommon'
video: '#/components/schemas/FieldTypeCommon'
propertyName: type
oneOf:
- $ref: '#/components/schemas/FieldTypeCommon'
- $ref: '#/components/schemas/FieldTypeLabel'
- $ref: '#/components/schemas/FieldTypeDropdown'
- $ref: '#/components/schemas/FieldTypeRadio'
- $ref: '#/components/schemas/FieldTypeCheckbox'
- $ref: '#/components/schemas/FieldTypeSimpleNumber'
- $ref: '#/components/schemas/FieldTypePercentageNumber'
- $ref: '#/components/schemas/FieldTypeCurrencyNumber'
ResourceLabelResponse:
additionalProperties: false
description: Label associated to a fetched resource
properties:
group:
additionalProperties: false
description: Label group
properties:
id:
description: Identifier of the label group
example: 2467e583a60e23fda2b89db81a453cd2
type: string
name:
description: Name of the label group
example: Content Format
type: string
required:
- id
- name
type: object
values:
description: List of values of the label
items:
additionalProperties: false
properties:
id:
description: Identifier of the label value
example: 71c378f3fee3d822759d1bdc2aab628c
type: string
name:
description: Name of the label value
example: Photos
type: string
required:
- id
- name
type: object
type: array
required:
- group
- values
type: object
DateTypeObjectField:
allOf:
- $ref: '#/components/schemas/BaseObjectField'
- $ref: '#/components/schemas/DateTypeObjectFieldUpdatePayload'
CampaignListResponseItem:
additionalProperties: false
properties:
description:
description: Description of the campaign
example: The awesome campaign's description
type:
- string
- 'null'
end_date:
description: 'End date of the campaign in ISO 8601 format: `YYYY-MM-DD`'
example: '2019-10-16'
type:
- string
- 'null'
id:
description: Unique identifier of the campaign
example: 8q7f910551b00a722e0418830cee6612
type: string
is_hidden:
description: Whether the campaign is hidden or not
example: false
type: boolean
links:
additionalProperties: false
description: Meta links
properties:
self:
description: URL of the campaign
example: https://api.cmp.optimizely.com/v3/campaigns/8q7f910551b00a722e0418830cee6612
type: string
required:
- self
type: object
owner:
additionalProperties: false
description: Owner information of the campaign
properties:
id:
description: Unique identifier of the owner of the campaign
example: 8q7f910551b00a722e0418830cee8211
type: string
type: object
reference_id:
description: Reference identifier of the campaign
example: CPN-1589
type: string
start_date:
description: 'Start date of the campaign in ISO 8601 format: `YYYY-MM-DD`'
example: '2019-10-06'
type:
- string
- 'null'
title:
description: Title of the campaign
example: The awesome campaign
type: string
required:
- id
- title
- description
- start_date
- end_date
- is_hidden
- reference_id
- owner
- links
type: object
DropdownTypeObjectFieldUpdatePayload:
allOf:
- $ref: '#/components/schemas/BaseObjectFieldUpdatePayload'
- properties:
values:
description: Array of choice ID. Multiple choice values are not acceptable for `is_multi_select=false`.
items:
example: 9119a313057e401189407116fcd3
type: string
type: array
type: object
MultiChoiceTypeObjectFieldUpdatePayload:
allOf:
- $ref: '#/components/schemas/BaseObjectFieldUpdatePayload'
- properties:
values:
description: Array of choice IDs
items:
example: 9119a313057e401189407116fcd3
type: string
type: array
type: object
CampaignFieldTypes:
description: Type of the field
enum:
- checkbox
- currency_number
- date
- dropdown
- label
- radio_button
- text_area
- percentage_number
- rich_text
- simple_number
- text
- image
- video
example: image
type: string
CommentCreateRequest:
additionalProperties: false
properties:
attachments:
description: List of comment attachments.
items:
$ref: '#/components/schemas/AttachmentRequest'
type: array
value:
description: Content of the comment. Markdown is supported. To mention a user belonging to the organization, use the `@[name](openapi-user-link)` format.
example: Comment mentioning @[Organization User](https://api.cmp.optimizely.com/v3/users/5fe38aeb574b52a62a089238)
minLength: 1
type: string
required:
- value
type: object
FieldTypeCheckbox:
allOf:
- $ref: '#/components/schemas/FieldBaseType'
- properties:
choices:
description: Choices of the checkbox
items:
properties:
id:
description: Identifier of the choice
example: 6ceee2f4fa3411ecb37802420ac8001b
type: string
name:
description: Name of the choice
example: Checkbox 1 Choice 1
type: string
required:
- id
- name
- color
type: object
type: array
required:
- choices
type: object
AttachmentResponse:
additionalProperties: false
properties:
id:
description: Unique identifier for the attachment
example: 5a7f910511b0a72230ce6631
type: string
name:
description: Filename of the attachment
example: sample_image.png
type: string
url:
description: Download URL of the attachment
example: https://files.cmp.optimizely.com/download/2115bfe4450c11ebaae8000c291b51d4
type: string
required:
- id
- name
- url
type: object
FieldTypeCommon:
allOf:
- $ref: '#/components/schemas/FieldBaseType'
- type: object
AssetTypeObjectFieldUpdatePayload:
allOf:
- $ref: '#/components/schemas/BaseObjectFieldUpdatePayload'
- properties:
values:
description: Payload for fields with attachments
items:
properties:
key:
description: Unique identifier of the file upload session. This is the `upload_meta_fields.key` field retrieved from the `/v3/upload-url` endpoint.
example: ce8995aea58b11ea8cd90242ac120005
type: string
title:
description: Title of the image or video
example: Sample.jpeg
minLength: 1
type: string
required:
- title
- key
maxItems: 1
type: array
type: object
CampaignResponse:
additionalProperties: false
properties:
budget:
allOf:
- $ref: '#/components/schemas/BudgetResponse'
type:
- object
- 'null'
created_at:
description: Creation date and time of the campaign, in ISO 8601 UTC format (`2035-02-10T10:40:45Z`)
example: '2035-10-06T13:15:30Z'
format: date-time
type: string
description:
description: Description of the campaign
example: The awesome campaign's description
type:
- string
- 'null'
end_date:
description: 'End date of the campaign in ISO 8601 format: `YYYY-MM-DD`'
example: '2019-10-16'
type:
- string
- 'null'
id:
description: Unique identifier of the campaign
example: 8q7f910551b00a722e0418830cee6612
type: string
is_hidden:
description: Whether the campaign is hidden or not
example: false
type: boolean
labels:
description: Labels associated to the campaign
items:
$ref: '#/components/schemas/ResourceLabelResponse'
type: array
links:
additionalProperties: false
description: Meta links
properties:
brief:
description: URL of the campaign brief
example: https://api.cmp.optimizely.com/v3/campaigns/8q7f910551b00a722e0418830cee6612/brief
type:
- string
- 'null'
child_campaigns:
description: URLs of the child campaigns
items:
example: https://api.cmp.optimizely.com/v3/campaigns/6fb21acf987094513ecb4b58
type: string
type: array
owner:
description: URL of the campaign owner
example: https://api.cmp.optimizely.com/v3/users/6ea1bf781398c3147393arr1
type:
- string
- 'null'
parent_campaign:
description: URL of the parent campaign
example: https://api.cmp.optimizely.com/v3/campaigns/7u7f910551b00a722e0418830cee6643
type:
- string
- 'null'
self:
description: URL of the campaign
example: https://api.cmp.optimizely.com/v3/campaigns/8q7f910551b00a722e0418830cee6612
type: string
required:
- self
- brief
- owner
- parent_campaign
- child_campaigns
type: object
reference_id:
description: Reference identifier of the campaign
example: CPN-1589
type: string
start_date:
description: 'Start date of the campaign in ISO 8601 format: `YYYY-MM-DD`'
example: '2019-10-06'
type:
- string
- 'null'
status:
description: Status of the campaign
enum:
- Not Started
- Off Track
- On Track
- Complete
- At Risk
example: On Track
type: string
title:
description: Title of the campaign
example: The awesome campaign
type: string
required:
- id
- title
- description
- start_date
- end_date
- created_at
- is_hidden
- status
- reference_id
- budget
- labels
- links
type: object
NumberTypeObjectField:
allOf:
- $ref: '#/components/schemas/BaseObjectField'
- $ref: '#/components/schemas/NumberTypeObjectFieldUpdatePayload'
Pagination:
additionalProperties: false
description: Pagination related information
properties:
next:
description: URL to the next page
example: https://api.cmp.optimizely.com/?offset=10&page_size=10
type:
- string
- 'null'
previous:
description: URL to the previous page
example: null
type:
- string
- 'null'
required:
- next
- previous
type: object
FieldTypeRadio:
allOf:
- $ref: '#/components/schemas/FieldBaseType'
- properties:
choices:
description: Choices of the radio button
items:
properties:
id:
description: Identifier of the choice
example: 6ceee2f4fa3411ecb37802420ac8001b
type: string
name:
description: Name of the choice
example: Radio 1 Choice 1
type: string
required:
- id
- name
- color
type: object
type: array
required:
- choices
type: object
ObjectFieldCreateRequest:
additionalProperties: false
discriminator:
mapping:
checkbox: '#/components/schemas/MultiChoiceTypeObjectField'
currency_number: '#/components/schemas/NumberTypeObjectField'
date: '#/components/schemas/DateTypeObjectField'
dropdown: '#/components/schemas/DropdownTypeObjectField'
image: '#/components/schemas/AssetTypeObjectField'
label: '#/components/schemas/MultiChoiceTypeObjectField'
percentage_number: '#/components/schemas/NumberTypeObjectField'
radio_button: '#/components/schemas/RadioButtonTypeObjectField'
rich_text: '#/components/schemas/StringTypeObjectField'
simple_number: '#/components/schemas/NumberTypeObjectField'
text: '#/components/schemas/StringTypeObjectField'
text_area: '#/components/schemas/StringTypeObjectField'
video: '#/components/schemas/AssetTypeObjectField'
propertyName: type
oneOf:
- $ref: '#/components/schemas/StringTypeObjectField'
- $ref: '#/components/schemas/MultiChoiceTypeObjectField'
- $ref: '#/components/schemas/DropdownTypeObjectField'
- $ref: '#/components/schemas/RadioButtonTypeObjectField'
- $ref: '#/components/schemas/NumberTypeObjectField'
- $ref: '#/components/schemas/DateTypeObjectField'
- $ref: '#/components/schemas/AssetTypeObjectField'
type: object
ObjectFieldCreateResponse:
additionalProperties: false
discriminator:
mapping:
checkbox: '#/components/schemas/FieldTypeCheckbox'
currency_number: '#/components/schemas/FieldTypeCurrencyNumber'
date: '#/components/schemas/FieldTypeCommon'
dropdown: '#/components/schemas/FieldTypeDropdown'
image: '#/components/schemas/FieldTypeCommon'
label: '#/components/schemas/FieldTypeLabel'
percentage_number: '#/components/schemas/FieldTypePercentageNumber'
radio_button: '#/components/schemas/FieldTypeRadio'
rich_text: '#/components/schemas/FieldTypeCommon'
simple_number: '#/components/schemas/FieldTypeSimpleNumber'
text: '#/components/schemas/FieldTypeCommon'
text_area: '#/components/schemas/FieldTypeCommon'
video: '#/components/schemas/FieldTypeCommon'
propertyName: type
oneOf:
- $ref: '#/components/schemas/FieldTypeCommon'
- $ref: '#/components/schemas/FieldTypeLabel'
- $ref: '#/components/schemas/FieldTypeDropdown'
- $ref: '#/components/schemas/FieldTypeRadio'
- $ref: '#/components/schemas/FieldTypeCheckbox'
- $ref: '#/components/schemas/FieldTypeSimpleNumber'
- $ref: '#/components/schemas/FieldTypePercentageNumber'
- $ref: '#/components/schemas/FieldTypeCurrencyNumber'
type: object
FieldBaseType:
additionalProperties: false
properties:
id:
description: Identifier of the field
example: 64be245ec0d79e79fdf1ad84
type: string
name:
description: Name of the field
example: Dropdown 101
type: string
type:
description: Type of the field
example: text
type: string
values:
description: List of selected values or from user input
items:
type: string
type: array
required:
- id
- name
- type
- values
type: object
CampaignBriefResponse:
additionalProperties: false
properties:
fields:
description: List of fields of the brief
items:
additionalProperties: false
properties:
name:
description: Name of the brief field
example: My Dropdown
type: string
value:
description: List of values set for the brief field
items:
description: value set in the brief field
example: option 1
type: string
type: array
required:
- name
- value
type: object
type: array
links:
additionalProperties: false
description: Meta links
properties:
campaign:
description: URL of the campaign
example: https://api.cmp.optimizely.com/v3/campaigns/5f857f30e1c4a2038d6179e9
type: string
self:
description: URL of the brief
example: https://api.cmp.optimizely.com/v3/campaigns/5f857f30e1c4a2038d6179e9/brief
type: string
required:
- self
- campaign
type: object
template:
allOf:
- $ref: '#/components/schemas/CampaignBriefTemplateValue'
type:
- object
- 'null'
title:
description: Title of the campaign brief
example: Awesome Campaign Brief
type: string
type:
description: Type of the campaign brief
enum:
- template
- attachment
- text
example: template
type: string
required:
- type
- title
- fields
- links
type: object
RadioButtonTypeObjectField:
allOf:
- $ref: '#/components/schemas/BaseObjectField'
- $ref: '#/components/schemas/RadioButtonTypeObjectFieldUpdatePayload'
FieldTypeLabel:
allOf:
- $ref: '#/components/schemas/FieldBaseType'
- properties:
choices:
description: Choices of the label
items:
properties:
id:
description: Identifier of the choice
example: 6ceee2f4fa3411ecb37802420ac8001b
type: string
name:
description: Name of the choice
example: Label 1 Choice 1
type: string
required:
- id
- name
- color
type: object
type: array
is_multi_select:
description: Select multiple values from the label
type: boolean
required:
- is_multi_select
- choices
type: object
DropdownTypeObjectField:
allOf:
- $ref: '#/components/schemas/BaseObjectField'
- $ref: '#/components/schemas/DropdownTypeObjectFieldUpdatePayload'
AttachmentRequest:
additionalProperties: false
properties:
key:
description: Unique identifier of the file upload session. This is the `upload_meta_fields.key` field retrieved from the `/v3/upload-url` endpoint.
example: ce8995aea58b11ea8cd90242ac120005
maxLength: 100
minLength: 1
type: string
name:
description: Filename of the attachment
example: sample_image.png
minLength: 1
type: string
required:
- key
- name
type: object
FieldTypeCurrencyNumber:
allOf:
- $ref: '#/components/schemas/FieldBaseType'
- properties:
currency_code:
description: Currency code of the numerical field
example: USD
type: string
decimal_places:
description: Decimal place of the numerical field
example: 2
type:
- integer
- 'null'
has_thousand_separator:
description: Whether the numerical field has a thousand separator
example: true
type: boolean
required:
- has_thousand_separator
- decimal_places
- currency_code
type: object
FieldTypeDropdown:
allOf:
- $ref: '#/components/schemas/FieldBaseType'
- properties:
choices:
description: Choices of the dropdown
items:
properties:
id:
description: Identifier of the choice
example: 6ceee2f4fa3411ecb37802420ac8001b
type: string
name:
description: Name of the choice
example: Dropdown 1 Choice 1
type: string
required:
- id
- name
type: object
type: array
is_multi_select:
description: Select multiple values from the dropdown
type: boolean
required:
- is_multi_select
- choices
type: object
CampaignFieldUpdateResponse:
additionalProperties: false
properties:
id:
description: Unique identifier for the field
example: 5a7f910511b0a72230ce6631
type: string
links:
additionalProperties: false
description: Meta links
properties:
campaign:
description: URL of the campaign
example: https://api.cmp.optimizely.com/v3/campaigns/5f857f30e1c4a2038d6179e9
type: string
campaign_fields:
description: URL of the campaign fields
example: https://api.cmp.optimizely.com/v3/campaigns/5f857f30e1c4a2038d6179e9/fields
type: string
required:
- campaign_fields
- campaign
type: object
name:
description: Name of the field
example: Image Field
type: string
type:
$ref: '#/components/schemas/CampaignFieldTypes'
values:
description: List of values selected or from user input
items:
example: 1nu8ue9wf8u9nusd9u
type: string
type: array
required:
- id
- name
- type
- values
- links
type: object
Error:
additionalProperties: true
description: Error payload
properties:
errors:
additionalProperties: true
description: Additional information
properties: {}
type: object
message:
description: Message describing the error
example: Not found
type: string
required:
- message
type: object
FieldTypePercentageNumber:
allOf:
- $ref: '#/components/schemas/FieldBaseType'
- properties:
decimal_places:
description: Decimal place of the numerical field
example: 2
type:
- integer
- 'null'
required:
- decimal_places
type: object
StringTypeObjectField:
allOf:
- $ref: '#/components/schemas/BaseObjectField'
- $ref: '#/components/schemas/StringTypeObjectFieldUpdatePayload'
RadioButtonTypeObjectFieldUpdatePayload:
allOf:
- $ref: '#/components/schemas/BaseObjectFieldUpdatePayload'
- properties:
values:
description: Accepts a single choice Id.
items:
example: 9119a313057e401189407116fcd3
type: string
maxItems: 1
type: array
type: object
CampaignFieldUpdateRequest:
additionalProperties: false
discriminator:
mapping:
checkbox: '#/components/schemas/MultiChoiceTypeObjectFieldUpdatePayload'
currency_number: '#/components/schemas/NumberTypeObjectFieldUpdatePayload'
date: '#/components/schemas/DateTypeObjectFieldUpdatePayload'
dropdown: '#/components/schemas/DropdownTypeObjectFieldUpdatePayload'
image: '#/components/schemas/AssetTypeObjectFieldUpdatePayload'
label: '#/components/schemas/MultiChoiceTypeObjectFieldUpdatePayload'
percentage_number: '#/components/schemas/NumberTypeObjectFieldUpdatePayload'
radio_button: '#/components/schemas/RadioButtonTypeObjectFieldUpdatePayload'
rich_text: '#/components/schemas/StringTypeObjectFieldUpdatePayload'
simple_number: '#/components/schemas/NumberTypeObjectFieldUpdatePayload'
text: '#/components/schemas/StringTypeObjectFieldUpdatePayload'
text_area: '#/components/schemas/StringTypeObjectFieldUpdatePayload'
video: '#/components/schemas/AssetTypeObjectFieldUpdatePayload'
propertyName: type
oneOf:
- $ref: '#/components/schemas/StringTypeObjectFieldUpdatePayload'
- $ref: '#/components/schemas/MultiChoiceTypeObjectFieldUpdatePayload'
- $ref: '#/components/schemas/DropdownTypeObjectFieldUpdatePayload'
- $ref: '#/components/schemas/RadioButtonTypeObjectFieldUpdatePayload'
- $ref: '#/components/schemas/NumberTypeObjectFieldUpdatePayload'
- $ref: '#/components/schemas/DateTypeObjectFieldUpdatePayload'
- $ref: '#/components/schemas/AssetTypeObjectFieldUpdatePayload'
type: object
CampaignCreateRequest:
additionalProperties: false
properties:
color:
description: Color of the campaign
enum:
- '#333'
- '#ec2e3b'
- '#fc594b'
- '#e2575b'
- '#f45097'
- '#de55a9'
- '#bd417f'
- '#a959cc'
- '#6456b7'
- '#4db2fc'
- '#3a97be'
- '#36c5a3'
- '#9bc94e'
- '#fdad3c'
- '#ef803c'
- '#fd8876'
- '#ea868a'
- '#f781b5'
- '#e785c1'
- '#cf69a3'
- '#c187db'
- '#9086cc'
- '#79c8fd'
- '#5ab5d0'
- '#4fd5bd'
- '#b8d877'
- '#fec454'
- '#f3a35a'
- '#d3998f'
- '#c79697'
- '#d096af'
- '#c897b4'
- '#ae7c98'
- '#b094be'
- '#908bae'
- '#97bed8'
- '#7aa8b6'
- '#7abeb2'
- '#bece9d'
- '#e3c68d'
- '#d3ac85'
- '#b9a29e'
- '#b29f9f'
- '#b9a1ac'
- '#b5a1ae'
- '#9a8692'
- '#a89bac'
- '#908e9b'
- '#a8b9c3'
- '#8ea1a7'
- '#96b1ac'
- '#c1c8b5'
- '#d4c8b0'
- '#c0b0a1'
- '#212121'
- '#CE515B'
- '#F16281'
- '#EB7777'
- '#A25555'
- '#B05F8C'
- '#AF8EC3'
- '#21B7EC'
- '#3AB0C9'
- '#669BA8'
- '#7ABEB2'
- '#5F9DCE'
- '#717CB9'
- '#4C557E'
- '#449C6C'
- '#63B05F'
- '#4D9B93'
- '#ACC050'
- '#A29F55'
- '#8AA872'
- '#E4844C'
- '#EE9808'
- '#DE7009'
- '#FCD404'
- '#CBB039'
- '#99896A'
- '#2e2a26'
- '#ccccdc'
example: '#ec2e3b'
type: string
description:
description: Description of the campaign
example: Sample Description
type:
- string
- 'null'
end_date:
description: End date of the campaign, in ISO 8601 UTC format (2026-02-10).
example: '2026-10-06'
format: date
type: string
owner_id:
description: ID of the owner of the campaign
example: 665d5717c8ba0201647a0991
type: string
parent_campaign:
description: ID of the parent campaign
example: 665d5717c8ba0201647a0992
type:
- string
- 'null'
start_date:
description: Start date of the campaign, in ISO 8601 UTC format (2025-02-10).
example: '2025-10-01'
format: date
type: string
title:
description: Title of the campaign
example: Sample Title
type: string
required:
- title
type: object
DateTypeObjectFieldUpdatePayload:
allOf:
- $ref: '#/components/schemas/BaseObjectFieldUpdatePayload'
- properties:
values:
description: Array of date-time values, in ISO 8601 UTC format (2020-02-10T10:40:45Z)
items:
description: Date and time, in ISO 8601 UTC format (2020-02-10T10:40:45Z)
example: '2020-02-10T10:40:45Z'
format: date-time
type: string
maxItems: 1
type: array
type: object
CampaignUpdateRequest:
additionalProperties: false
properties:
end_date:
description: 'End date of the campaign in ISO 8601 format: `YYYY-MM-DD`'
example: '2022-09-06'
type:
- string
- 'null'
owner_id:
description: Unique identifier of the campaign owner
example: 8q7f910551b00a722e0418830cee6612
type: string
start_date:
description: 'Start date of the campaign in ISO 8601 format: `YYYY-MM-DD`'
example: '2022-09-06'
type:
- string
- 'null'
title:
description: Title of the campaign
example: The awesome campaign
type: string
type: object
CampaignBriefTemplateValue:
additionalProperties: false
description: Template info of the brief if the brief is of template type
properties:
id:
description: Unique identifier of the template
example: 9nu8ue9wf8u9nusd9f
type: string
name:
description: Name of the template
example: My Template
type: string
required:
- id
- name
type: object
BaseObjectField:
allOf:
- $ref: '#/components/schemas/BaseObjectFieldUpdatePayload'
- properties:
id:
description: Unique identifier of the field
example: 41aac313bda1e40b6cde7116fc24a
type: string
required:
- id
type: object
BudgetResponse:
additionalProperties: false
description: Budget of the campaign
properties:
budgeted_amount:
description: Planned amount for the campaign
example: '1000.50'
type: string
currency_code:
description: Currency code of the budget
example: USD
type: string
required:
- currency_code
- budgeted_amount
type: object
AssetTypeObjectField:
allOf:
- $ref: '#/components/schemas/BaseObjectField'
- $ref: '#/components/schemas/AssetTypeObjectFieldUpdatePayload'
CampaignResponse_2:
type: object
additionalProperties: false
properties:
id:
type: string
description: Unique identifier of the campaign
example: 8q7f910551b00a722e0418830cee6612
title:
type: string
description: Title of the campaign
example: The awesome campaign
description:
type:
- string
- 'null'
description: Description of the campaign
example: The awesome campaign's description
start_date:
type:
- string
- 'null'
description: 'Start date of the campaign in ISO 8601 format: `YYYY-MM-DD`'
example: '2019-10-06'
end_date:
type:
- string
- 'null'
description: 'End date of the campaign in ISO 8601 format: `YYYY-MM-DD`'
example: '2019-10-16'
is_hidden:
type: boolean
description: Whether the campaign is hidden or not
example: false
reference_id:
type: string
description: Reference identifier of the campaign
example: CPN-1589
links:
type: object
additionalProperties: false
description: Meta links
properties:
self:
type: string
description: URL of the campaign
example: https://api.welcomesoftware.com/v3/campaigns/8q7f910551b00a722e0418830cee6612
parent_campaign:
type:
- string
- 'null'
description: URL of the parent campaign
example: https://api.welcomesoftware.com/v3/campaigns/7u7f910551b00a722e0418830cee6643
required:
- self
- parent_campaign
required:
- id
- title
- description
- start_date
- end_date
- is_hidden
- reference_id
- links
responses:
Forbidden:
content:
application/json:
example:
message: You do not have the permission to perform this operation
schema:
$ref: '#/components/schemas/Error'
description: Permission error
ClientError:
content:
application/json:
example:
message: 'Unsupported arguments: a,b,c'
schema:
$ref: '#/components/schemas/Error'
description: Client error
UnprocessableEntity:
content:
application/json:
example:
message: Resource cannot be processed
schema:
$ref: '#/components/schemas/Error'
description: Unprocessable entity error
NotFound:
content:
application/json:
example:
message: Resource not found
schema:
$ref: '#/components/schemas/Error'
description: Not found error
Unauthorized:
content:
application/json:
example:
message: Unauthorized
schema:
$ref: '#/components/schemas/Error'
description: Authorization error
Forbidden_2:
description: Permission error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
message: User does not have the permission to perform this operation
parameters:
page_size:
description: Number of results to return per page
example: 15
in: query
name: page_size
schema:
default: 10
maximum: 100
minimum: 1
type: integer
offset:
description: Starting index of results (zero indexed)
example: 5
in: query
name: offset
schema:
default: 0
minimum: 0
type: integer
securitySchemes:
OAuth2:
flows:
authorizationCode:
authorizationUrl: https://accounts.cmp.optimizely.com/o/oauth2/v1/auth
scopes:
offline_access: Grants the ability to refresh access_token using the refresh token even when user is not present (not logged in).
openid: Grants the ability to receive a unique identifier for the user.
profile: Grants access to user profile information.
tokenUrl: https://accounts.cmp.optimizely.com/o/oauth2/v1/token
clientCredentials:
scopes: {}
tokenUrl: https://accounts.cmp.optimizely.com/o/oauth2/v1/token
type: oauth2
x-refined-from:
- newscred-cmp-open-api-openapi.json
- newscred-welcome-open-api-openapi.yml
x-tagGroups:
- name: API
tags:
- Uploader
- Library
- Labels
- Brand Compliance
- Tasks
- Task Step
- Campaigns
- Publishing
- Templates
- Users
- Work Requests
- Structured Contents
- Assets
- Milestones
- Teams
- Settings
- Workflows
- Fields
- Events