Skip to main content

Save Marketing Post Overlays (v1)

Method & Path

PUT /api/v1/workspace/:workspaceId/ai/usages/:usageId/overlays

Description

Save overlay configurations for a marketing post generation usage. This allows you to save text, badge, and image overlays that were configured in the frontend.

Authentication

Required: Workspace authentication. User must be authenticated as Workspace Owner or Staff with workspace permissions.

Headers

Authorization: Bearer <workspace_token>
Content-Type: application/json

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier
usageIdstringYesAI tool usage identifier

Request Body

{
"overlays": [
{
"id": "overlay-1",
"type": "text",
"text": "New Product",
"visible": true,
"style": {
"fontFamily": "Arial",
"fontWeight": 700,
"fontSize": 24,
"color": "#000000",
"align": "center",
"direction": "ltr"
},
"layout": {
"x": 100,
"y": 50,
"w": 200,
"h": 30
}
}
]
}

Request Body Schema

FieldTypeRequiredDescription
overlaysarrayYesArray of overlay objects
overlays[].idstringYesOverlay identifier
overlays[].typestringYesOverlay type (text, badge, image)
overlays[].textstringNoText content (for text/badge overlays)
overlays[].imageUrlstringNoImage URL (for image overlays)
overlays[].visiblebooleanNoWhether overlay is visible
overlays[].styleobjectYesOverlay style configuration
overlays[].layoutobjectYesOverlay layout/position configuration

Response 200 OK

{
"success": true
}

Common Errors

400 Bad Request: Invalid request body or overlay configuration

401 Unauthorized: Missing or invalid authentication token

404 Not Found: Workspace or usage not found

422 Unprocessable Entity: Validation error

500 Internal Server Error: Server error occurred while processing the request

Notes

  • Overlays are saved in the responseData.overlaysSaved field of the usage
  • This endpoint is typically called after user configures overlays in the frontend
  • Overlay configurations are used for generating final marketing post images