Publish landing page
Makes the draft the live landing page. Call it without plan_id for the preview and the checks, then again with the plan_id. The page is never offline; the old version can be restored.
PUT /v1/landing-page/publication
| Permission | landing:publish (all permissions) |
| Risk | Send (reaches other people) |
| Idempotency-Key | Required (how it works) |
| Safe to repeat | Safe to repeat with the same Idempotency-Key: the first answer comes back and nothing is done twice. |
| Rate limit class | write (120 requests per minute per key) |
| Confirmation | Preview first, then the call with the plan ID |
| MCP tool | publish_landing_page |
| Since version | 2026-10-25 |
#What it does
- Publishes content that other people can see.
- Needs a confirmation step (a preview first).
- Safe to repeat with the same Idempotency-Key.
#Request
Header
| Name | Required | Description |
|---|---|---|
Authorization | yes | Bearer <key> |
Idempotency-Key | yes | A unique value for this operation, for example a UUID (1 to 255 visible ASCII characters). |
Body (JSON)
| Name | Type | Required | Description |
|---|---|---|---|
plan_id | string | no | Plan ID from the preview call. Without it you get the preview. |
#Examples
curl -X PUT "https://api.smartchat.marketing/v1/landing-page/publication" \
-H "Authorization: Bearer $SMARTCHAT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'import os
import uuid
import requests
response = requests.put(
"https://api.smartchat.marketing/v1/landing-page/publication",
headers={
"Authorization": "Bearer " + os.environ["SMARTCHAT_API_KEY"],
"Idempotency-Key": str(uuid.uuid4()),
},
json={},
)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.smartchat.marketing/v1/landing-page/publication", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.SMARTCHAT_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());Response (200):
{
"object": "landing_publish_plan",
"plan_id": "pln_9f8e7d6c5b4a43210fedcba987654321",
"expires_at": "2026-10-30T09:51:07Z",
"changed_fields": 2,
"issues": []
}#Response
Status 200. Every response has the headers Request-Id, SmartChat-Version and X-RateLimit-*.
#Errors
| Code | Status | When |
|---|---|---|
idempotency_key_invalid | 400 | The 'Idempotency-Key' header must be 1 to 255 visible ASCII characters. |
idempotency_key_required | 400 | This call needs an 'Idempotency-Key' header. |
plan_required | 400 | This action needs a plan_id from a preview. |
api_key_expired | 401 | This API key has expired. |
api_key_invalid | 401 | This API key is not valid. |
api_key_revoked | 401 | This API key was revoked. |
authentication_required | 401 | No API key was sent. Send 'Authorization: Bearer <key>'. |
insufficient_scope | 403 | This key lacks a required permission. |
ip_not_allowed | 403 | This IP address is not allowed for this key. |
not_found | 404 | This path does not exist. |
plan_not_found | 404 | No plan with this ID exists. |
conflict | 409 | The state of the object does not allow this. |
idempotency_in_progress | 409 | A request with this idempotency key is still running. |
plan_already_used | 409 | The plan was already used. |
plan_changed | 409 | The content or audience changed after the preview. |
plan_mismatch | 409 | The plan belongs to another account, key, action or request. |
plan_expired | 410 | The plan is older than 10 minutes. |
idempotency_key_reused | 422 | This idempotency key was already used with a different request. |
landing_not_publishable | 422 | The checker blocks publishing. |
validation_failed | 422 | A field is not valid. |
rate_limited | 429 | Too many requests. Wait and try again. |
internal_error | 500 | Something went wrong on our side. |
All errors use one format.