---
title: "Create visual edit session"
method: POST
path: "/wpe/project/{projectId}/sessions"
tags: ["Visual Editor"]
---

# Create visual edit session

`POST /wpe/project/{projectId}/sessions`

## Request

- Base URL: `https://api.websitepublisher.ai`
- URL: `https://api.websitepublisher.ai/wpe/project/{projectId}/sessions`
- Auth: OAuth 2 (authorization code, authorization URL `https://api.websitepublisher.ai/dapi/oauth/authorize`, token URL `https://api.websitepublisher.ai/dapi/oauth/token`, scopes: `read`, `write`)

Creates a browser-based edit session for image management on a page. Returns an edit URL for the user. Use data-wpe-slot placeholder images when building pages, then create a session for real image uploads.

## Path parameters

- `projectId` integer, required

## Request body

- EditSessionRequest
  - `page_slug` string, required: Page slug to edit (e.g., index.htm, about.htm)
  - `capabilities_json` string: JSON array of capabilities: image_upload, image_resize, image_padding, image_remove. Default: ["image_upload","image_resize","image_padding"]
  - `ttl_minutes` integer: Session duration in minutes (5-120, default: 30)

## Response `201`

Edit session created — returns session_id, edit_url, expires_in

## Other responses

- `404`: Page not found — create the page first
- `429`: Monthly or concurrent session limit reached

---

[API](https://skmtc.dev/websitepublisher/apis/websitepublisher-ai-api.md) · [All operations](https://skmtc.dev/websitepublisher/apis/websitepublisher-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/websitepublisher/apis/websitepublisher-ai-api/revisions/e9df1ef10551?raw)
