openapi: 3.1.0 info: title: Open Calendar Notes Studio Media API description: Agorapulse's Open API documentation version: '1.0' security: - bearerAuth: [] tags: - name: Studio Media description: Studio media upload management paths: /v1.0/library/organizations/{organizationId}/workspaces/{workspaceId}/studio/media/upload: post: tags: - Studio Media summary: Request a presigned upload URL for studio media description: Returns a presigned S3 PUT URL that can be used to upload a media file directly to S3 operationId: requestUpload parameters: - name: organizationId in: path description: Organization identifier required: true - name: workspaceId in: path description: Workspace identifier required: true requestBody: description: Upload request details content: application/json: schema: $ref: '#/components/schemas/StudioMediaUploadOpenRequest' required: true responses: '201': description: Presigned upload URL generated successfully content: application/json: schema: $ref: '#/components/schemas/StudioMediaUploadOpenResponse' '400': description: Invalid request data '404': description: Organization or workspace not found components: schemas: StudioMediaUploadOpenResponse: type: object properties: uploadUrl: type: string description: Presigned PUT URL - upload file with HTTP PUT to this URL filename: type: string description: S3 object key publicUrl: type: string description: CDN URL to access the uploaded file baseUrl: type: string description: S3 URL to access the uploaded file expiresInSeconds: type: integer description: URL expiration in seconds format: int32 requiredHeaders: type: object additionalProperties: type: string description: Headers the client MUST include in the PUT upload request description: Presigned URL for direct S3 upload StudioMediaUploadOpenRequest: required: - contentType - extension - fileSize - origin type: object properties: extension: minLength: 1 type: string description: File extension example: jpg fileSize: minimum: 0 exclusiveMinimum: true type: integer description: File size in bytes format: int64 example: 1048576 contentType: minLength: 1 type: string description: Content type (MIME) example: image/jpeg origin: minLength: 1 type: string description: Origin of the upload request example: lovable contentStudioSessionId: type: string description: Optional Content Studio session ID for grouping uploads nullable: true description: Request to obtain a presigned upload URL for a studio media securitySchemes: bearerAuth: type: apiKey name: X-API-KEY in: header