Langsung ke konten utama
PATCH
/
v3
/
chatgpt
/
pages
/
{page_id}
/
html-mode
/
draft
Create an unpublished HTML Mode draft
curl --request PATCH \
  --url https://api.scalev.com/v3/chatgpt/pages/{page_id}/html-mode/draft \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agent_html": "<main><h1>Launch offer</h1><a href=\"#order\">Buy now</a></main>",
  "agent_css": "main { max-width: 960px; margin: 0 auto; }",
  "agent_js": "const data = window.Scalev.data.get();",
  "agent_csp_policy": {
    "img_src": [
      "https://cdn.example.com"
    ]
  }
}
'
{
  "page_id": 123,
  "page_display_id": 123,
  "version": 123,
  "render_mode": "agent_html",
  "draft_url": "<string>",
  "agent_csp_policy": {
    "connect_src": [
      "<string>"
    ],
    "img_src": [
      "<string>"
    ],
    "script_src": [
      "<string>"
    ],
    "style_src": [
      "<string>"
    ],
    "frame_src": [
      "<string>"
    ]
  },
  "validation_warnings": [
    {
      "severity": "warning",
      "code": "head_content_not_allowed",
      "field": "agent_html",
      "message": "<string>"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.scalev.com/llms.txt

Use this file to discover all available pages before exploring further.

Otorisasi

Authorization
string
header
wajib

OAuth access tokens are rate-limited per OAuth application and merchant installation.

Parameter Path

page_id
integer
wajib

Numeric Scalev page ID.

Body

application/json

Body-only HTML Mode payload. Do not include head, meta, title, favicon, crawler, domain, credential, cookie, token, or private backend behavior.

agent_html
string

Body-only HTML. Do not include doctype, html, body, head, meta, link, title, favicon, SEO, crawler, or domain settings.

Maximum string length: 204800
agent_css
string
Maximum string length: 102400
agent_js
string

JavaScript must use documented window.Scalev runtime APIs only.

Maximum string length: 102400
agent_csp_policy
object

Supported Agent HTML CSP keys. Unsupported keys are rejected.

Respons

Unpublished draft metadata. This response never indicates publishing.

page_id
integer
wajib
page_display_id
integer
wajib
version
integer
wajib
render_mode
enum<string>
wajib
Opsi yang tersedia:
agent_html
draft_url
string<uri>
wajib
agent_csp_policy
object
wajib

Supported Agent HTML CSP keys. Unsupported keys are rejected.

validation_warnings
object[]
wajib