v1

latestOpenAPI 3.0.02026-08-062903562.2 MB
Campaign Studio

Create first JavaScript customization version for a block

Requires privateEndpoint auth and admin authorization. Organization must have 'custom-embedded-code' tag. Creates version 1 for the block and fails if the block already exists. Security scan is only triggered if scan=1 parameter is included.

post/studio-campaigns/{campaign_id}/js-customizations/{block_id}

Path parameters

campaign_idinteger required

Campaign ID

block_idstring required

Block identifier

Query parameters

scan'1'

Set to 1 to trigger security scan

Request body

html_contentstring required

Custom HTML/CSS/JS content as a string

Response

Success

_idstring

MongoDB identifier

campaign_idinteger

Associated campaign ID

block_idstring

Block identifier

html_contentstring

Custom HTML/CSS/JS content as a string

status'draft' | 'published' | 'scanning' | 'failed'

Status of the customization

versioninteger

Version number per (campaign_id, block_id)

published_atstring date-time nullable

Timestamp when promoted to published

created_atstring date-time
updated_atstring date-time

Example response

{
  "_id": "650f2a8c1f1a2b3c4d5e6f70",
  "campaign_id": 12345,
  "block_id": "hyVQjxoz9DV-JX6IemnCI",
  "html_content": "<div>...</div>",
  "status": "draft",
  "version": 1
}