openapi: 3.1.0 info: title: Litmus Instant API description: >- The Litmus Instant API provides REST endpoints for generating email preview screenshots across 40+ email clients by submitting HTML directly without needing to send an actual email. It is used by email editors and ESP integrations to deliver real-time rendering previews within their own platforms. Authentication is via OAuth 2.0 access tokens. version: '1.0.0' contact: name: Litmus Support url: https://www.litmus.com/support/ termsOfService: https://www.litmus.com/terms-of-service/ externalDocs: description: Litmus Instant API Documentation url: https://docs.litmus.com/instant servers: - url: https://instant-api.litmus.com/v1 description: Litmus Instant API Production Server tags: - name: Clients description: Available email client configurations - name: Previews description: Email preview generation and management security: - bearerAuth: [] paths: /emails: post: operationId: createEmailPreview summary: Litmus Create an email preview description: >- Submits email HTML to generate previews across one or more email clients. The request body includes the HTML source and a list of email client identifiers. Returns a preview object with a unique ID that can be used to retrieve individual client screenshots once rendering is complete. tags: - Previews requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateEmailPreviewRequest' responses: '201': description: Email preview created successfully content: application/json: schema: $ref: '#/components/schemas/EmailPreview' '400': description: Invalid request body or HTML content content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Missing or invalid authentication token content: application/json: schema: $ref: '#/components/schemas/Error' /emails/{emailGuid}: get: operationId: getEmailPreview summary: Litmus Get email preview description: >- Retrieves the status and results of an email preview by its GUID. Returns the overall preview state and the rendering status for each requested email client. Poll this endpoint until all client results show a completed status. tags: - Previews parameters: - $ref: '#/components/parameters/emailGuidParam' responses: '200': description: Email preview details retrieved successfully content: application/json: schema: $ref: '#/components/schemas/EmailPreview' '401': description: Missing or invalid authentication token content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Email preview not found content: application/json: schema: $ref: '#/components/schemas/Error' /emails/{emailGuid}/previews/{clientId}: get: operationId: getClientPreview summary: Litmus Get client preview screenshot description: >- Retrieves the rendered screenshot and metadata for a specific email client within an email preview. Returns URLs for the full-size and thumbnail image captures once the client rendering status is complete. tags: - Previews parameters: - $ref: '#/components/parameters/emailGuidParam' - $ref: '#/components/parameters/clientIdParam' responses: '200': description: Client preview screenshot retrieved successfully content: application/json: schema: $ref: '#/components/schemas/ClientPreview' '401': description: Missing or invalid authentication token content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Email preview or client not found content: application/json: schema: $ref: '#/components/schemas/Error' /clients: get: operationId: listEmailClients summary: Litmus List available email clients description: >- Returns the list of email client identifiers available for preview generation. Each entry includes the client ID, display name, platform category, and whether the client is currently available for rendering. tags: - Clients responses: '200': description: List of available email clients content: application/json: schema: type: array items: $ref: '#/components/schemas/EmailClient' '401': description: Missing or invalid authentication token content: application/json: schema: $ref: '#/components/schemas/Error' components: securitySchemes: bearerAuth: type: http scheme: bearer description: OAuth 2.0 access token obtained via the Litmus OAuth flow parameters: emailGuidParam: name: emailGuid in: path description: Unique identifier (GUID) for the email preview required: true schema: type: string format: uuid example: 550e8400-e29b-41d4-a716-446655440000 clientIdParam: name: clientId in: path description: Email client identifier string required: true schema: type: string example: gmail_chrome schemas: CreateEmailPreviewRequest: type: object description: Request body for creating an email preview required: - html - clients properties: html: type: string description: Full HTML source of the email to be previewed example: '