{ "openapi": "3.0.3", "info": { "title": "Design Builder API v2", "version": "0.0.3" }, "tags": [ { "name": "design-builder", "description": "Available design-builder over designs provided by Design Builder v2" } ], "servers": [ { "url": "https://design-builder-api.sls.epilot.io" } ], "security": [ { "custom_authorizer": [] } ], "paths": { "/v1/designs": { "get": { "operationId": "getAllDesigns", "x-epilot-permissions": [ { "action": "design:view" } ], "summary": "getAllDesigns", "description": "Scan all designs linked to a organization, based in orgId attribute from JWT auth token", "tags": [ "design-builder" ], "responses": { "200": { "description": "Success - designs loaded with success. Empty array if org has no designs.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAllDesignsRes" } } } }, "500": { "description": "Other errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } } } }, "post": { "operationId": "addDesign", "x-epilot-permissions": [ { "action": "design:create" } ], "summary": "addDesign", "description": "Create a brand new design linked to a organization, based in orgId attribute from JWT auth token", "tags": [ "design-builder" ], "requestBody": { "description": "Design payload", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddDesignReq" } } } }, "responses": { "201": { "description": "Success - design created with success.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddDesignRes" } } } }, "400": { "description": "Validation Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "401": { "description": "Authentication Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "500": { "description": "Other errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } } } } }, "/v1/designs/{designId}": { "get": { "operationId": "getDesign", "x-epilot-permissions": [ { "action": "design:view" } ], "summary": "getDesign", "description": "Search for a especific design owned by user organization", "tags": [ "design-builder" ], "parameters": [ { "in": "path", "name": "designId", "required": true, "schema": { "$ref": "#/components/schemas/DesignId" } } ], "responses": { "200": { "description": "Success - design loaded with success.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetDesignRes" } } } }, "400": { "description": "Validation Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "401": { "description": "Authentication Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "404": { "description": "No design found" }, "500": { "description": "Other errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } } } }, "delete": { "operationId": "deleteDesign", "x-epilot-permissions": [ { "action": "design:delete" } ], "summary": "deleteDesign", "description": "Search and delete for a especific design owned by user organization", "tags": [ "design-builder" ], "parameters": [ { "in": "path", "name": "designId", "required": true, "schema": { "$ref": "#/components/schemas/DesignId" } } ], "responses": { "204": { "description": "Success - design deleted with success." }, "400": { "description": "Validation Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "401": { "description": "Authentication Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "404": { "description": "No design found" }, "409": { "description": "The design cannot be deleted: it is the only one of the organization, it is still\nassigned to journeys (listed in `journeys`) or portals (listed in `portals`), or the\ncaller may not view the organization's portals, so their usage cannot be checked.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "500": { "description": "Other errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "503": { "description": "customer-portal-api could not be reached to check which portals use the design. Retry later.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } } } }, "put": { "operationId": "updateDesign", "x-epilot-permissions": [ { "action": "design:edit" } ], "summary": "updateDesign", "description": "Update a especific design owned by user organization. A body with `version: 1` is validated against the design document v1 schema and stored as v1. A v1 body leaves the stored `style`, `design_tokens`, `custom_theme` and `use_custom_theme` untouched. A body without `version` on a v1 design is treated as an old client's read-modify-write: those four fields are stored as sent, and brand-wide changes in `style` are applied to the v1 groups.", "tags": [ "design-builder" ], "parameters": [ { "in": "path", "name": "designId", "required": true, "schema": { "$ref": "#/components/schemas/DesignId" } }, { "in": "header", "name": "If-Match", "required": false, "description": "The `last_modified_at` of the design the client read. When it no longer matches the stored design, the update is rejected with 409. Without the header the update is unconditional.", "schema": { "type": "string" } } ], "requestBody": { "description": "Design payload", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateDesignReq" } } } }, "responses": { "204": { "description": "Success - design updated with success." }, "400": { "description": "Validation Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "401": { "description": "Authentication Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "404": { "description": "No design found" }, "409": { "description": "The design was changed since the `If-Match` value was read. Returns the current design.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateDesignConflict" } } } }, "500": { "description": "Other errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } } } } }, "/v1/designs/{designId}/duplicate": { "post": { "operationId": "duplicateDesign", "x-epilot-permissions": [ { "action": "design:create" } ], "summary": "duplicateDesign", "description": "Duplicate an existing design owned by the user organization. The copy carries over the style, custom CSS and name (marked as a copy) but does NOT carry over journey/portal relations, so the new design starts with 0 consumers, exactly like a freshly created design.", "tags": [ "design-builder" ], "parameters": [ { "in": "path", "name": "designId", "required": true, "schema": { "$ref": "#/components/schemas/DesignId" } } ], "responses": { "201": { "description": "Success - design duplicated with success.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddDesignRes" } } } }, "400": { "description": "Validation Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "401": { "description": "Authentication Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "404": { "description": "No design found" }, "500": { "description": "Other errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } } } } }, "/v1/designs/{designId}/duplicate-as-v1": { "post": { "operationId": "duplicateDesignAsV1", "x-epilot-permissions": [ { "action": "design:create" } ], "summary": "duplicateDesignAsV1", "description": "Duplicate a classic design (no version) as a v1 design document. The original stays as it is. The copy is named \" (v1)\", starts with no journeys or portals and keeps the original's journey fields, so a journey switched to it later paints the same. Where the conversion needs a decision, the questions come back first: which logo and favicon the portal pages using the design show, and, for every value journeys paint differently from the design (primary colour, font, radius, logo), whether journeys take the design's value (sync), the design takes the journeys' value (design) or both stay (keep). Send `dry_run` to get the questions, then the answers to create the copy. Needs the design-document-v1 feature flag.", "tags": [ "design-builder" ], "parameters": [ { "in": "path", "name": "designId", "required": true, "schema": { "$ref": "#/components/schemas/DesignId" } } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DuplicateDesignAsV1Req" } } } }, "responses": { "200": { "description": "Dry run - the conversion and its questions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DuplicateDesignAsV1Plan" } } } }, "201": { "description": "Success - the v1 copy was created.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddDesignRes" } } } }, "400": { "description": "Invalid answers, a v1 design, an invalid conversion or the feature flag is off", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "404": { "description": "No design found" }, "409": { "description": "A question is still unanswered", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DuplicateDesignAsV1Plan" } } } }, "502": { "description": "The portals using the design could not be read", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } } } } }, "/v1/designs/{designId}/variables": { "get": { "operationId": "getDesignVariables", "x-epilot-permissions": [ { "action": "design:view" } ], "summary": "getDesignVariables", "description": "The design as flat `design.*` template variables (e.g. `design.colors.primary`, `design.assets.logo.url`), for consumers that render designs into text templates such as email templates. Classic designs are converted to design document v1 first, unset values take the defaults of `@epilot/design-document`, and every value is validated for use in HTML attributes and CSS (hex colors, `https:` URLs, numbers, font family lists). Values are not HTML-escaped; consumers escape them where they insert them.", "tags": [ "design-builder" ], "parameters": [ { "in": "path", "name": "designId", "required": true, "schema": { "$ref": "#/components/schemas/DesignId" } } ], "responses": { "200": { "description": "Success - design variables resolved.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetDesignVariablesRes" } } } }, "400": { "description": "Validation Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "401": { "description": "Authentication Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "404": { "description": "No design found" }, "500": { "description": "Other errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } } } } }, "/v1/designs/{designId}/parse": { "get": { "operationId": "getThemeFromDesign", "summary": "getThemeFromDesign", "deprecated": true, "description": "Search for a especific design owned by user organization and parse them to a new or old theme. Deprecated: kept for old readers only. For a v1 design the response carries the v1 groups and the derived `journey` group next to the stored old fields and the theme built from them; new runtimes read the v1 groups.", "security": [], "tags": [ "design-builder" ], "parameters": [ { "in": "path", "name": "designId", "required": true, "schema": { "$ref": "#/components/schemas/DesignId" } }, { "in": "query", "name": "orgId", "required": false, "schema": { "type": "string" }, "description": "Organization id of the user" }, { "in": "query", "name": "theme", "required": true, "schema": { "$ref": "#/components/schemas/Theme" } } ], "responses": { "200": { "description": "Success - design parsed with success.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ParseThemeFromDesignResp" } } } }, "400": { "description": "Validation Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "401": { "description": "Authentication Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "404": { "description": "No design found" }, "500": { "description": "Other errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } } } } }, "/v1/designs/generate": { "post": { "operationId": "generateDesign", "x-epilot-permissions": [ { "anyOf": [ { "action": "design:create" }, { "action": "design:edit" } ] } ], "summary": "generateDesign", "description": "Generates a design (palette, text colours, font, logo and border radius) from a public\nwebsite with AI. The result is cached per organization and URL for 30 days.\n", "tags": [ "design-builder" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateDesignReq" } } } }, "responses": { "200": { "description": "A design generated earlier for this organization and URL", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateDesignRes" } } } }, "201": { "description": "A newly generated design", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateDesignRes" } } } }, "400": { "description": "The URL is not a valid http(s) URL (`invalid_url`) or points to a private network (`blocked_url`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "401": { "description": "Authentication Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "403": { "description": "The caller may not edit designs", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "422": { "description": "The website could not be fetched (`fetch_failed`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "502": { "description": "The design could not be generated (`generation_failed`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "504": { "description": "The generation did not finish in time", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } } } } }, "/v1/designs/document/generate": { "post": { "operationId": "generateDesignDocument", "x-epilot-permissions": [ { "action": "design:create" } ], "summary": "generateDesignDocument", "description": "Reads a public website and returns a v1 design document plus one finding for each\nid in fixed order. This version chooses the favicon in code and derives the site name.\nThe other findings are `not_found` until they are implemented. The document contains\nonly the leaves that passed validation, and defaults are not pruned.\nSuccessful responses are cached per organization, normalised URL and generator version\nfor 7 days. Each organization may run 20 new generations per UTC day; cache hits do not\ncount toward the limit. A client abort still finishes on the server and is cached.\n", "tags": [ "design-builder" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateDesignDocumentReq" } } } }, "responses": { "200": { "description": "A design document generated earlier for this organization, URL and generator version", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateDesignDocumentRes" } } } }, "201": { "description": "A newly generated design document", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateDesignDocumentRes" } } } }, "400": { "description": "The URL is not a valid http(s) URL (`invalid_url`) or points to a private network (`blocked_url`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "401": { "description": "Authentication Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "403": { "description": "The caller does not have design:create", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "422": { "description": "The website could not be fetched (`fetch_failed`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "429": { "description": "The organization has used today's generation limit (`rate_limited`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "502": { "description": "Generation failed, or no finding survived (`generation_failed`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "504": { "description": "The 27 second budget ran out (`timeout`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } } } } }, "/v1/designs/document/generate/jobs": { "post": { "operationId": "createDesignDocumentJob", "x-epilot-permissions": [ { "action": "design:create" } ], "summary": "createDesignDocumentJob", "description": "Generates a v1 design document from a public website like `generateDesignDocument`, returns it\nright away as `baseline`, and starts an AI review of it in the background. The review looks at the\nwebsite in a real browser and reads the optional brand guideline files, then confirms or corrects\nthe baseline (primary color, fonts, corners, primary button, logo). Poll `getDesignDocumentJob`\nfor the reviewed document.\n\nEach call counts toward the 20 generations per organization and UTC day. Reviews have their own\nlimit of 5 per organization and UTC day; past it, or when the review can't start, the response is\n201 with `review.status: skipped` and the baseline is the result. When the deterministic generation\nfinds nothing, the review builds the document on its own and `baseline` is null.\n\nBrand guideline files are uploaded with file-api `uploadFileV2` first and referenced by `s3ref`.\n", "tags": [ "design-builder" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateDesignDocumentJobReq" } } } }, "responses": { "201": { "description": "The baseline design document; no review runs", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DesignDocumentJob" } } } }, "202": { "description": "The baseline design document; the review is running", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DesignDocumentJob" } } } }, "400": { "description": "The URL is not a valid http(s) URL (`invalid_url`), points to a private network (`blocked_url`), or an attachment is not accepted (`invalid_attachment`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "401": { "description": "Authentication Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "403": { "description": "The caller does not have design:create", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "422": { "description": "The website could not be fetched (`fetch_failed`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "429": { "description": "The organization has used today's generation limit (`rate_limited`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "502": { "description": "Nothing could be generated and no review could run (`generation_failed`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "504": { "description": "The website took too long (`timeout`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } } } } }, "/v1/designs/document/generate/jobs/{jobId}": { "get": { "operationId": "getDesignDocumentJob", "x-epilot-permissions": [ { "action": "design:create" } ], "summary": "getDesignDocumentJob", "description": "The state of a design document review started with `createDesignDocumentJob`. While it runs,\n`steps` lists the browser tools used so far. When it completes, `result` holds the reviewed design\ndocument, the reviewer's note and how each finding changed. A failed review keeps the baseline.\nJobs are kept for one day.\n", "tags": [ "design-builder" ], "parameters": [ { "name": "jobId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "screenshots_after", "in": "query", "required": false, "description": "Return only the review's screenshots from this index on (the number the caller already has)", "schema": { "type": "integer", "minimum": 0 } } ], "responses": { "200": { "description": "The job", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DesignDocumentJob" } } } }, "401": { "description": "Authentication Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "403": { "description": "The caller does not have design:create", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "404": { "description": "No such job for this organization, or it expired", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } } } } }, "/v1/designs/files": { "post": { "operationId": "uploadFile", "x-epilot-permissions": [ { "access": "org" } ], "summary": "uploadFile", "description": "Upload a new file for the user organization bucket", "tags": [ "design-builder" ], "requestBody": { "description": "Upload file payload", "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/UploadFileReq" }, "encoding": { "file_data": { "contentType": "image/*, application/x-font-ttf, application/x-font-opentype, application/font-woff, application/font-woff2" } } } } }, "responses": { "201": { "description": "Success - upload with success.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadFileRes" } } } }, "400": { "description": "Validation Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "401": { "description": "Authentication Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "500": { "description": "Other errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } } } }, "get": { "operationId": "getFiles", "x-epilot-permissions": [ { "access": "org" } ], "summary": "getFiles", "description": "List all files for the user organization bucket", "tags": [ "design-builder" ], "parameters": [ { "in": "query", "name": "type", "schema": { "type": "string", "enum": [ "LOGO", "FONT", "IMAGE" ] }, "required": false, "description": "Type of files to be returned", "example": "LOGO" } ], "responses": { "200": { "description": "Success - files loaded with success.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetFilesRes" } } } }, "400": { "description": "Validation Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "401": { "description": "Authentication Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "500": { "description": "Other errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } } } } }, "/v1/designs/consumer/{application}/{consumerId}": { "get": { "operationId": "getConsumerDesign", "x-epilot-permissions": [ { "access": "org" } ], "summary": "getConsumerDesign", "description": "Search for a especific design owned by user organization", "tags": [ "design-builder" ], "parameters": [ { "in": "path", "name": "consumerId", "required": true, "schema": { "$ref": "#/components/schemas/DesignId" } }, { "in": "path", "name": "application", "required": true, "schema": { "$ref": "#/components/schemas/Application" } } ], "responses": { "200": { "description": "Success - design loaded with success.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetDesignRes" } } } }, "400": { "description": "Validation Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "401": { "description": "Authentication Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "404": { "description": "No design found" }, "500": { "description": "Other errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } } } } }, "/v1/designs/addConsumer/{application}/{designId}": { "put": { "operationId": "addConsumer", "deprecated": true, "x-epilot-permissions": [ { "anyOf": [ { "action": "entity:edit", "resource": "journey" }, { "action": "customer_portal:edit" }, { "action": "installer_portal:edit" }, { "action": "portal:content:edit", "resource": "{consumer_id}" }, { "action": "design:edit" } ] } ], "summary": "addConsumer", "description": "Add a consumer that uses a specific design", "tags": [ "design-builder" ], "parameters": [ { "in": "path", "name": "designId", "required": true, "schema": { "$ref": "#/components/schemas/DesignId" } }, { "in": "path", "name": "application", "schema": { "type": "string" }, "required": true, "description": "Type of application that uses the design", "example": "journey" } ], "requestBody": { "description": "widget id payload", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddConsumerReq" } } } }, "responses": { "204": { "description": "Success - design updated with success." }, "400": { "description": "Validation Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "401": { "description": "Authentication Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "404": { "description": "No design found" }, "500": { "description": "Other errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } } } } }, "/v1/designs/removeConsumer/{application}/{designId}": { "put": { "operationId": "removeConsumer", "deprecated": true, "x-epilot-permissions": [ { "anyOf": [ { "action": "entity:edit", "resource": "journey" }, { "action": "customer_portal:edit" }, { "action": "installer_portal:edit" }, { "action": "portal:content:edit", "resource": "{consumer_id}" }, { "action": "design:edit" } ] } ], "summary": "removeConsumer", "description": "Remove a consumer that uses a specific design", "tags": [ "design-builder" ], "parameters": [ { "in": "path", "name": "designId", "required": true, "schema": { "$ref": "#/components/schemas/DesignId" } }, { "in": "path", "name": "application", "schema": { "type": "string" }, "required": true, "description": "Type of application that uses the design", "example": "journey" } ], "requestBody": { "description": "widget id payload", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RemoveConsumerReq" } } } }, "responses": { "204": { "description": "Success - design updated with success." }, "400": { "description": "Validation Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "401": { "description": "Authentication Errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } }, "404": { "description": "No design found" }, "500": { "description": "Other errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResp" } } } } } } } }, "components": { "securitySchemes": { "custom_authorizer": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } }, "schemas": { "DuplicateDesignAsV1Req": { "type": "object", "properties": { "dry_run": { "type": "boolean" }, "answers": { "type": "object", "properties": { "assets": { "type": "object", "description": "Index of the chosen option per asset kind, null keeps the converted one", "properties": { "logo": { "type": "integer", "nullable": true }, "favicon": { "type": "integer", "nullable": true } } }, "journeys": { "type": "object", "properties": { "primary_color": { "$ref": "#/components/schemas/JourneyChoice" }, "font": { "$ref": "#/components/schemas/JourneyChoice" }, "border_radius": { "$ref": "#/components/schemas/JourneyChoice" }, "logo": { "$ref": "#/components/schemas/JourneyChoice" } } } } } } }, "JourneyChoice": { "type": "string", "enum": [ "sync", "design", "keep" ] }, "DuplicateDesignAsV1Plan": { "type": "object", "properties": { "message": { "type": "string" }, "conversion": { "type": "object", "properties": { "name": { "type": "string" }, "asset_questions": { "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "logo", "favicon" ] }, "options": { "type": "array", "items": { "type": "object", "properties": { "asset": { "type": "object", "additionalProperties": true }, "sources": { "type": "array", "items": { "type": "object", "properties": { "portal_id": { "type": "string" }, "portal_name": { "type": "string" }, "page": { "type": "string" } } } } } } } } } }, "journey_questions": { "type": "array", "items": { "type": "object", "properties": { "leaf": { "type": "string", "enum": [ "primary_color", "font", "border_radius", "logo" ] }, "journeys": { "description": "The value journeys paint; null when they paint Concorde's fallback" }, "design": { "description": "The value of the converted design" }, "adoptable": { "type": "boolean", "description": "Whether the design can take the journeys' value" } } } }, "open": { "type": "object", "properties": { "assets": { "type": "array", "items": { "type": "string" } }, "journeys": { "type": "array", "items": { "type": "string" } } } }, "unmapped": { "type": "object", "additionalProperties": true }, "radius_adjusted": { "type": "object", "additionalProperties": true }, "hex_normalized": { "type": "object", "additionalProperties": { "type": "string" } }, "notes": { "type": "array", "items": { "type": "string" } }, "invalid": { "type": "array", "items": { "type": "string" } } } } } }, "UploadFileReq": { "type": "object", "properties": { "file_type": { "type": "string", "enum": [ "LOGO", "FONT", "IMAGE" ] }, "file_data": { "type": "string", "format": "base64" }, "display_name": { "type": "string" }, "file_name": { "type": "string" } }, "required": [ "file_type", "file_name", "file_data" ] }, "UploadFileRes": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/FileData" } ] }, "GetFilesRes": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/FileData" } ] } }, "GetAllDesignsRes": { "type": "object", "properties": { "designs": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/ItemMetada" }, { "$ref": "#/components/schemas/DesignItem" }, { "$ref": "#/components/schemas/Custom_Style" }, { "$ref": "#/components/schemas/Journey" }, { "$ref": "#/components/schemas/Design_Document_V1" } ] } } } }, "AddDesignReq": { "type": "object", "properties": { "design": { "allOf": [ { "$ref": "#/components/schemas/DesignItem" }, { "$ref": "#/components/schemas/Custom_Style" }, { "$ref": "#/components/schemas/Journey" }, { "$ref": "#/components/schemas/Design_Document_V1" } ] } }, "required": [ "design" ] }, "AddDesignRes": { "type": "object", "properties": { "design": { "allOf": [ { "$ref": "#/components/schemas/ItemMetada" }, { "$ref": "#/components/schemas/DesignItem" }, { "$ref": "#/components/schemas/Custom_Style" }, { "$ref": "#/components/schemas/Journey" }, { "$ref": "#/components/schemas/Design_Document_V1" } ] } } }, "GetDesignRes": { "type": "object", "properties": { "design": { "allOf": [ { "$ref": "#/components/schemas/ItemMetada" }, { "$ref": "#/components/schemas/DesignItem" }, { "$ref": "#/components/schemas/Custom_Style" }, { "$ref": "#/components/schemas/Journey" }, { "$ref": "#/components/schemas/Design_Document_V1" } ] } } }, "GetDesignVariablesRes": { "type": "object", "required": [ "design_id", "variables" ], "properties": { "design_id": { "type": "string" }, "variables": { "type": "object", "description": "`design.name`, `design.colors.primary | background | neutral`, `design.colors.custom.`, `design.typography.heading | body.family | url`, `design.shape.radius`, `design.buttons.primary | secondary | tertiary.color` and `design.assets.logo.url`. Unset values without a default are left out.", "additionalProperties": { "type": "string" }, "example": { "design.name": "Stadtwerke Blau", "design.colors.primary": "#0054A6", "design.shape.radius": "8", "design.assets.logo.url": "https://go.epilot.cloud/designs/org/logo/logo.png" } } } }, "UpdateDesignReq": { "type": "object", "properties": { "design": { "allOf": [ { "$ref": "#/components/schemas/DesignItem" }, { "$ref": "#/components/schemas/Custom_Style" }, { "$ref": "#/components/schemas/Journey" }, { "$ref": "#/components/schemas/Design_Document_V1" } ] }, "journey_write": { "type": "object", "description": "Only with a version 1 body. Per journey leaf, overrides the default write-through: `keep` does not write a changed leaf into the journey fields, `sync` writes the design's value even when it did not change (nothing when the design has no value). Not stored.", "properties": { "primary_color": { "$ref": "#/components/schemas/Journey_Write" }, "font": { "$ref": "#/components/schemas/Journey_Write" }, "border_radius": { "$ref": "#/components/schemas/Journey_Write" }, "logo": { "$ref": "#/components/schemas/Journey_Write" } }, "additionalProperties": false } }, "required": [ "design" ] }, "Journey_Write": { "type": "string", "enum": [ "keep", "sync" ] }, "ItemMetada": { "type": "object", "properties": { "id": { "type": "string" }, "created_at": { "type": "string", "description": "Creation date and time", "example": "2021-01-30T08:30:00Z" }, "created_by": { "type": "string" }, "edited": { "type": "boolean" }, "last_modified_at": { "type": "string" } } }, "AddConsumerReq": { "type": "object", "properties": { "consumer_id": { "$ref": "#/components/schemas/DesignId" }, "consumer_name": { "type": "string" } }, "required": [ "consumer_id", "consumer_name" ] }, "RemoveConsumerReq": { "type": "object", "properties": { "consumer_id": { "$ref": "#/components/schemas/DesignId" } }, "required": [ "consumer_id" ] }, "DesignItem": { "type": "object", "properties": { "brand_id": { "type": "string" }, "brand_name": { "type": "string" }, "user": { "type": "object", "properties": { "emailaddress": { "type": "string" }, "fullname": { "type": "string" }, "name": { "type": "string" }, "userid": { "type": "string" } } }, "style_name": { "type": "string" }, "style": { "type": "object", "properties": { "logo": { "type": "object", "$ref": "#/components/schemas/LogoData" }, "palette": { "type": "object", "$ref": "#/components/schemas/PaletteData" }, "typography": { "type": "object", "$ref": "#/components/schemas/TypographyData" }, "shape": { "type": "object", "$ref": "#/components/schemas/ShapeData" }, "consumer": { "type": "object", "$ref": "#/components/schemas/ConsumerData" } }, "required": [ "palette", "typography", "consumer" ] }, "is_default": { "type": "boolean" }, "_manifest": { "type": "array", "description": "The manifest IDs associated with this design", "items": { "type": "string" } } }, "required": [ "style_name", "status", "edited", "style" ] }, "Design_Document_V1": { "type": "object", "description": "Groups of the design document v1. A design is v1 when `version` is 1, otherwise it is the old shape (`style`, `design_tokens`, `custom_theme`). The authoritative contract for the groups is the schema exported by @epilot/design-document. A v1 design keeps `style`, `design_tokens`, `custom_theme` and `use_custom_theme`. A v1 update writes each changed primary colour, font, radius and logo into `style` (`palette.primary`, `typography.font`, `shape.border_radius`, `logo.main`) and deletes the matching `custom_theme` key, so journeys paint the edit. It also writes a set one whose journey field is missing and has no `custom_theme` key, which a journey paints as the fallback. A v1 create does the same when it sends no journey fields. Other groups never reach journeys. A v1 update may carry the `journey` group.", "properties": { "version": { "type": "integer", "enum": [ 1 ] }, "colors": { "type": "object", "additionalProperties": {} }, "typography": { "type": "object", "additionalProperties": {} }, "shape": { "type": "object", "additionalProperties": {} }, "components": { "type": "object", "additionalProperties": {} }, "assets": { "type": "object", "additionalProperties": {} }, "consumer": { "$ref": "#/components/schemas/ConsumerData" } } }, "UpdateDesignConflict": { "type": "object", "properties": { "message": { "type": "string" }, "design": { "allOf": [ { "$ref": "#/components/schemas/ItemMetada" }, { "$ref": "#/components/schemas/DesignItem" }, { "$ref": "#/components/schemas/Custom_Style" }, { "$ref": "#/components/schemas/Journey" }, { "$ref": "#/components/schemas/Design_Document_V1" } ] } } }, "Custom_Style": { "type": "object", "properties": { "custom_theme": { "type": "string" }, "use_custom_theme": { "type": "boolean" } } }, "Journey": { "type": "object", "properties": { "design_tokens": { "type": "object", "description": "Design tokens for journey customization", "properties": { "coupon": { "type": "string" }, "cashback": { "type": "string" }, "custom_css": { "type": "string" }, "accent_color": { "type": "string", "description": "Accent color, defaults to primary" }, "outline_color": { "type": "string", "description": "Global outline/focus color" }, "divider_color": { "type": "string", "description": "Divider line color" }, "link_color": { "type": "string", "description": "Link text color" }, "link_hover_color": { "type": "string", "description": "Link hover text color" }, "font_size_scale": { "type": "string", "description": "Font size scale factor", "enum": [ "xs", "sm", "md", "lg", "xl" ] }, "topbar_height": { "type": "number", "description": "Topbar minimum height in pixels" }, "topbar_logo_alignment": { "type": "string", "description": "Logo/content alignment in the top bar", "enum": [ "flex-start", "center", "flex-end" ] }, "logo_size": { "type": "number", "description": "Logo size in pixels" }, "input_background": { "type": "string", "description": "Input field background color" }, "input_border_color": { "type": "string", "description": "Input field border color" }, "input_text_color": { "type": "string", "description": "Input field text color" }, "input_label_color": { "type": "string", "description": "Input field label color" }, "input_border_radius": { "type": "number", "description": "Input field border radius in pixels" }, "input_height": { "type": "number", "description": "Input field height in pixels" }, "input_variant": { "type": "string", "description": "Input field variant style", "enum": [ "outlined", "filled", "underlined" ] }, "button_primary_bg": { "type": "string", "description": "Primary button background color or gradient" }, "button_primary_text": { "type": "string", "description": "Primary button text color" }, "button_primary_hover_bg": { "type": "string", "description": "Primary button hover background color or gradient" }, "button_primary_hover_text": { "type": "string", "description": "Primary button hover text color" }, "button_outlined_border": { "type": "string", "description": "Outlined button border color" }, "button_outlined_text": { "type": "string", "description": "Outlined button text color" }, "button_outlined_hover_bg": { "type": "string", "description": "Outlined button hover background color" }, "button_outlined_hover_text": { "type": "string", "description": "Outlined button hover text color" }, "button_ghost_bg": { "type": "string", "description": "Ghost button background color" }, "button_ghost_text": { "type": "string", "description": "Ghost button text color" }, "button_ghost_hover_bg": { "type": "string", "description": "Ghost button hover background color" }, "button_ghost_hover_text": { "type": "string", "description": "Ghost button hover text color" }, "button_border_radius": { "type": "number", "description": "Button border radius in pixels" }, "button_height": { "type": "number", "description": "Button height in pixels" }, "card_background": { "type": "string", "description": "Card background color" }, "card_border_color": { "type": "string", "description": "Card border color for outlined variant" }, "card_variant": { "type": "string", "description": "Card visual variant", "enum": [ "shadow", "outlined" ] }, "summary_card_background": { "type": "string", "description": "Summary card background color" }, "toggle_selected_bg": { "type": "string", "description": "Toggle button selected background color" }, "toggle_selected_text": { "type": "string", "description": "Toggle button selected text color" }, "toggle_hover_bg": { "type": "string", "description": "Toggle button hover background color" }, "toggle_hover_text": { "type": "string", "description": "Toggle button hover text color" }, "toggle_border_color": { "type": "string", "description": "Toggle group wrapper border color" }, "dropdown_hover_bg": { "type": "string", "description": "Dropdown option hover background color" }, "dropdown_hover_text": { "type": "string", "description": "Dropdown option hover text color" }, "dropdown_selected_bg": { "type": "string", "description": "Dropdown option selected background color" }, "dropdown_selected_text": { "type": "string", "description": "Dropdown option selected text color" }, "switch_unchecked_color": { "type": "string", "description": "Switch unchecked thumb color" }, "switch_unchecked_bg": { "type": "string", "description": "Switch unchecked track background color" }, "switch_border_radius": { "type": "number", "description": "Switch border radius in pixels" }, "checkbox_unchecked_color": { "type": "string", "description": "Checkbox unchecked border color" }, "checkbox_label_color": { "type": "string", "description": "Checkbox label text color" }, "radio_unchecked_color": { "type": "string", "description": "Radio button unchecked border color" }, "radio_label_color": { "type": "string", "description": "Radio button label text color" }, "datepicker_selected_bg": { "type": "string", "description": "Date picker selected date background color" }, "datepicker_selected_color": { "type": "string", "description": "Date picker selected date text color" }, "datepicker_border_radius": { "type": "number", "description": "Date picker border radius in pixels" }, "chip_background": { "type": "string", "description": "Chip background color" }, "chip_hover_background": { "type": "string", "description": "Chip hover background color" }, "chip_text_color": { "type": "string", "description": "Chip text color" }, "chip_hover_text_color": { "type": "string", "description": "Chip hover text color" } } } } }, "ConsumerData": { "type": "object", "properties": { "widgets": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/WidgetData" } ] } }, "customer_portals": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/CustomerPortalData" } ] } } }, "required": [ "widgets", "customer_portals" ] }, "WidgetData": { "allOf": [ { "$ref": "#/components/schemas/WidgetPortalData" } ] }, "CustomerPortalData": { "allOf": [ { "$ref": "#/components/schemas/WidgetPortalData" } ] }, "LogoData": { "type": "object", "properties": { "main": { "type": "object", "$ref": "#/components/schemas/FileData" } } }, "PaletteData": { "type": "object", "properties": { "primary": { "type": "string" }, "secondary": { "type": "string" }, "error": { "type": "string" }, "background": { "type": "string" }, "paper": { "type": "string" }, "navbar": { "type": "string" }, "portal_login_background": { "type": "string" } }, "required": [ "primary", "secondary", "error", "background", "paper", "navbar" ] }, "TypographyData": { "type": "object", "properties": { "font": { "type": "object", "$ref": "#/components/schemas/FontData" }, "primary": { "type": "string" }, "secondary": { "type": "string" } }, "required": [ "font", "primary", "secondary" ] }, "ShapeData": { "type": "object", "properties": { "border_radius": { "type": "number" } } }, "FontData": { "type": "object", "properties": { "font_id": { "type": "string" }, "font_name": { "type": "string" }, "font_family": { "type": "string" }, "font_weight_regular": { "type": "string" }, "font_weight_medium": { "type": "string" }, "font_weight_bold": { "type": "string" }, "urls": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/FontResponseUrl" } ] } } }, "required": [ "font_id", "font_name", "urls" ] }, "FontResponseUrl": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "WOFF2", "WOFF", "TTF", "EOT" ] }, "url": { "type": "string" } } }, "WidgetPortalData": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "GenerateDesignReq": { "type": "object", "properties": { "url": { "type": "string", "format": "uri", "description": "Public website to derive the design from", "example": "https://www.twl.de" } }, "required": [ "url" ] }, "GenerateDesignRes": { "type": "object", "properties": { "design": { "$ref": "#/components/schemas/GeneratedDesign" }, "cached": { "type": "boolean", "description": "True when the design was generated earlier for this organization and URL" } }, "required": [ "design", "cached" ] }, "GenerateDesignDocumentReq": { "type": "object", "properties": { "url": { "type": "string", "format": "uri", "description": "Public website to read the design from", "example": "https://www.stadtwerke-musterstadt.de" } }, "required": [ "url" ] }, "FindingId": { "type": "string", "enum": [ "primary_color", "fonts", "corners", "primary_button", "logo", "favicon" ] }, "FindingStatus": { "type": "string", "enum": [ "found", "not_found", "not_available" ] }, "FindingDetail": { "type": "object", "properties": { "family": { "type": "string", "description": "Font family that was found but cannot be loaded" } }, "required": [ "family" ] }, "DesignFinding": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/FindingId" }, "status": { "$ref": "#/components/schemas/FindingStatus" }, "detail": { "$ref": "#/components/schemas/FindingDetail" } }, "required": [ "id", "status" ] }, "GenerateDesignDocumentRes": { "type": "object", "properties": { "document": { "$ref": "#/components/schemas/Design_Document_V1" }, "findings": { "type": "array", "minItems": 6, "maxItems": 6, "items": { "$ref": "#/components/schemas/DesignFinding" } }, "site_name": { "type": "string", "example": "Stadtwerke Musterstadt" }, "cached": { "type": "boolean", "description": "True when the response was served from an earlier successful generation for this organization, normalised URL and generator version" } }, "required": [ "document", "findings", "site_name", "cached" ] }, "CreateDesignDocumentJobReq": { "type": "object", "properties": { "url": { "type": "string", "format": "uri", "description": "Public website to read the design from", "example": "https://www.stadtwerke-musterstadt.de" }, "language": { "type": "string", "enum": [ "de", "en" ], "description": "Language of the design builder; the review writes its note for the user in it" }, "attachments": { "type": "array", "description": "Brand guideline files for the review, uploaded with file-api `uploadFileV2`. At most 5.", "items": { "$ref": "#/components/schemas/BrandGuidelineAttachment" } } }, "required": [ "url" ] }, "BrandGuidelineAttachment": { "type": "object", "properties": { "s3ref": { "type": "object", "properties": { "bucket": { "type": "string" }, "key": { "type": "string", "description": "Must start with the organization id, as file-api upload keys do" } }, "required": [ "bucket", "key" ] }, "mime_type": { "type": "string", "enum": [ "application/pdf", "image/png", "image/jpeg", "image/webp" ] }, "filename": { "type": "string" } }, "required": [ "s3ref", "mime_type" ] }, "GeneratedDesignDocument": { "type": "object", "properties": { "document": { "$ref": "#/components/schemas/Design_Document_V1" }, "findings": { "type": "array", "items": { "$ref": "#/components/schemas/DesignFinding" } }, "site_name": { "type": "string" } }, "required": [ "document", "findings", "site_name" ] }, "ReviewChange": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "primary_color", "fonts", "corners", "primary_button", "logo" ] }, "change": { "type": "string", "enum": [ "confirmed", "changed", "added", "removed" ] }, "origin": { "type": "string", "enum": [ "guidelines", "website" ], "description": "Where the reviewed value comes from" }, "source": { "type": "string", "description": "Where the review saw the value, in its own words, e.g. \"background of the hero CTA\"" } }, "required": [ "id", "change" ] }, "ReviewScreenshot": { "type": "object", "properties": { "index": { "type": "integer" }, "label": { "type": "string", "description": "What it shows, e.g. \"desktop, first screen\"" }, "kind": { "type": "string", "description": "`page`, or a close-up of the element a token is read from: `cta`, `logo`, `heading`" }, "box": { "type": "object", "description": "Where a close-up sits on the page, in CSS pixels (the desktop first screen starts at 0,0)", "properties": { "x": { "type": "number" }, "y": { "type": "number" }, "width": { "type": "number" }, "height": { "type": "number" } } }, "page_url": { "type": "string" }, "tool": { "type": "string" }, "taken_at": { "type": "string" }, "data_url": { "type": "string", "description": "JPEG as a data URL" } }, "required": [ "index", "label", "page_url", "data_url" ] }, "ReviewedDesignDocument": { "allOf": [ { "$ref": "#/components/schemas/GeneratedDesignDocument" }, { "type": "object", "properties": { "notes": { "type": "string", "description": "The reviewer's note for the person checking the design, in the website's language" }, "changes": { "type": "array", "items": { "$ref": "#/components/schemas/ReviewChange" } } }, "required": [ "notes", "changes" ] } ] }, "DesignDocumentJob": { "type": "object", "properties": { "job_id": { "type": "string", "format": "uuid", "nullable": true, "description": "Null when no review runs" }, "status": { "type": "string", "enum": [ "running", "completed", "failed", "skipped" ], "description": "`skipped`: no review runs (daily review limit, or it could not start); the baseline is the result" }, "steps": { "type": "array", "description": "Browser tools the review used so far", "items": { "type": "string" } }, "screenshots": { "type": "array", "description": "Screenshots the review took, from `screenshots_after` on, oldest first", "items": { "$ref": "#/components/schemas/ReviewScreenshot" } }, "baseline": { "allOf": [ { "$ref": "#/components/schemas/GeneratedDesignDocument" } ], "nullable": true }, "result": { "$ref": "#/components/schemas/ReviewedDesignDocument" } }, "required": [ "job_id", "status", "steps", "baseline" ] }, "GeneratedDesign": { "type": "object", "description": "Partial design to merge into the design being edited", "properties": { "style": { "type": "object", "properties": { "logo": { "$ref": "#/components/schemas/LogoData" }, "palette": { "$ref": "#/components/schemas/PaletteData" }, "typography": { "$ref": "#/components/schemas/TypographyData" } }, "required": [ "logo", "palette", "typography" ] }, "theme": { "type": "object", "properties": { "shape": { "type": "object", "properties": { "borderRadius": { "type": "string", "example": "8" } }, "required": [ "borderRadius" ] } }, "required": [ "shape" ] } }, "required": [ "style", "theme" ] }, "ErrorResp": { "type": "object", "properties": { "message": { "type": "string" }, "code": { "type": "string", "description": "Machine-readable reason, e.g. `invalid_url` or `rate_limited`" }, "error": { "type": "object" } } }, "FileData": { "type": "object", "properties": { "name": { "type": "string" }, "display_name": { "type": "string" }, "file_type": { "type": "string", "enum": [ "LOGO", "FONT", "IMAGE" ] }, "s3_object_key": { "type": "string" }, "url": { "type": "string" }, "file_id": { "type": "string", "description": "ID of the source file entity in the epilot file-entity system. Set when the file was picked from the File Manager (rather than uploaded directly to the design-builder bucket). Consumers resolve the live `public_url` via this reference. The org id is derived from the journey's owning org at render time (same convention as journey image blocks), so blueprint cross-org installs work without any extra remapping." } }, "required": [ "name", "s3_object_key", "url" ] }, "DesignId": { "type": "string", "minLength": 36, "maxLength": 36, "description": "Id of the design", "example": "4a062990-a6a3-11eb-9828-4f3da7d4935a" }, "Theme": { "type": "string", "enum": [ "NEW", "OLD" ], "description": "Type of theme to be parsed and returned", "example": "NEW" }, "Application": { "type": "string", "description": "Type of application that uses the design", "example": "journey" }, "DesignParameters": { "type": "object", "properties": { "designId": { "$ref": "#/components/schemas/DesignId" }, "theme": { "$ref": "#/components/schemas/Theme" }, "application": { "$ref": "#/components/schemas/Application" } } }, "ParseThemeFromDesignResp": { "type": "object", "properties": { "theme": { "$ref": "#/components/schemas/Theme" }, "design": { "type": "object", "properties": { "id": { "type": "string" }, "last_modified_at": { "type": "string" }, "style_name": { "type": "string" }, "style": { "type": "object", "properties": { "logo": { "$ref": "#/components/schemas/LogoData" }, "palette": { "$ref": "#/components/schemas/PaletteData" }, "typography": { "$ref": "#/components/schemas/TypographyData" } } }, "custom_theme": { "type": "string" }, "use_custom_theme": { "type": "boolean" }, "journey_design_tokens": { "type": "object", "description": "Design tokens for journey customization (renamed from design_tokens)" }, "version": { "type": "integer", "enum": [ 1 ] }, "colors": { "type": "object", "additionalProperties": {} }, "typography": { "type": "object", "additionalProperties": {} }, "shape": { "type": "object", "additionalProperties": {} }, "components": { "type": "object", "additionalProperties": {} }, "assets": { "type": "object", "additionalProperties": {} }, "journey": { "type": "object", "additionalProperties": {}, "description": "v1 designs only: the journey group of @epilot/design-document (custom_css, tokens and the journey overrides primary_color, font, border_radius, logo), derived on read from the stored journey fields and compared with the stored v1 groups. What a journey paints from it equals what it paints from the theme built from the old fields. Not returned by GET." } } } } } } } }