Studio

Create a new Studio session

Generates an opaque session token for the Studio iframe on WooCommerce, custom storefronts, and Shopify storefronts that call through the App Proxy. No unauthenticated access. API key never leaves the server.

post/api/v1/studio/create-session

Request

  • Base URL: https://api.sudomock.com
  • URL: https://api.sudomock.com/api/v1/studio/create-session
  • Auth: API key in header x-api-key

Request body

mockup_type'psd' | '2d' nullable

Which editor the session opens, psd or 2d.

session_kind'setup' | 'customize' nullable

What the session is for, setup or customize.

mockup_uuidstring nullable

UUID of the mockup to customize

product_idstring nullable

Product ID from the platform

variant_idstring nullable

Variant ID from the platform

allowed_originstring nullable

HTTPS origin of the page that embeds the editor.

action_idstring nullable

Your own routing identifier for the action this session completes.

Example request

{
  "allowed_origin": "https://your-store.example.com",
  "mockup_type": "psd",
  "mockup_uuid": "c315f78f-d2c7-4541-b240-a9372842de94",
  "product_id": "8342019283",
  "session_kind": "customize",
  "variant_id": "44912837465"
}

Response

Successful Response

successtrue

True when the session was created.

mockup_type'psd' | '2d' required

Which editor this session opens, psd or 2d.

sessionstring required

Opaque token the editor is opened with.

expires_ininteger required

Seconds the session stays valid while it sits idle.

message_session_idstring required

Identifier your page matches every editor message against.

bootstrap_secretstring required

One-time secret your page sends to complete the handshake.

Example response

{
  "session": "sess_xQ8pM2vK7nR4tB1yH6zJ3wL5sD9fG0aC2eN8uV4iT7o",
  "expires_in": 900,
  "message_session_id": "7d1b4a90-2e63-4f18-bb27-1c9a0e4d7f52",
  "bootstrap_secret": "wAKBqgAce_HWV01uenTwEPrczjPkIt9xH0BSjQ1S68A"
}

Changes

No recorded changes to this operation across all 1 revision of this API.