openapi: 3.2.0 info: title: Simulation Campaign Preview API description: APIs for Campaign Preview and Proofs. version: 0.0.1 servers: - url: https://platform.adobe.io/ajo/simulations security: - imsUserToken: [] tags: - name: Campaign Preview API paths: /campaigns/{campaignId}/previews: parameters: - $ref: '#/components/parameters/CampaignIdParam' - $ref: '#/components/parameters/AuthorizationParam' - $ref: '#/components/parameters/APIKeyParam' - $ref: '#/components/parameters/ImsOrgIdParam' - $ref: '#/components/parameters/SandboxNameParam' post: tags: - Campaign Preview API summary: Generate Campaign Preview description: Use this API to fetch preview campaign preview using specified profile. The API returns rendered content for each variant. operationId: createCampaignPreview requestBody: $ref: '#/components/requestBodies/CampaignPreviewRequest' responses: 200: $ref: '#/components/responses/CampaignPreviewResponse' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' components: responses: CampaignPreviewResponse: description: Success Response content: application/json: schema: $ref: '#/components/schemas/CampaignPreviewResponseBody' schemas: push-media-uri: type: string description: External Link OR Adobe Asset ID example: medialib://urn:aaid:sc:US:aece0145-bf61-44e3-ae08-c1daa04d1396 minLength: 5 maxLength: 2000 pattern: ^(https?|medialib)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|] sms-preview: type: object properties: text: type: string messageType: type: string enum: - sms - mms push-preview: type: object properties: appNames: type: array items: type: string pushType: type: string enum: - MESSAGE - SILENT title: type: string message: type: string ios: description: Properties specific to ios devices only allOf: - $ref: '#/components/schemas/push-ios-specific-properties' android: description: Properties specific to Android devices only allOf: - $ref: '#/components/schemas/push-android-specific-properties' push-android-specific-properties: type: object properties: media: type: object minProperties: 1 properties: uri: $ref: '#/components/schemas/push-media-uri' iconUri: $ref: '#/components/schemas/push-media-uri' Channel: type: object description: channel enum: - email - push - sms push-ios-specific-properties: type: object properties: media: type: object minProperties: 1 properties: uri: $ref: '#/components/schemas/push-media-uri' CampaignPreviewRequest: type: object properties: previewRequestItems: description: previewing for multiple profiles minItems: 1 type: array items: $ref: '#/components/schemas/PreviewRequestItem' CampaignPreviewResponseBody: type: object description: Campaign Preview Response properties: previews: type: array items: properties: profileId: type: string description: The variant is rendered using profile details of this profileId variantId: description: A unique id of variant. Auto generated by server on creation. type: string messageId: type: string channel: $ref: '#/components/schemas/Channel' oneOf: - $ref: '#/components/schemas/email-preview' - $ref: '#/components/schemas/push-preview' - $ref: '#/components/schemas/sms-preview' description: Preview content per variant per profileId. Will contain PxV items in previews, where P is no of the items in the request & V is no of variants in campaign. email-preview: type: object properties: subject: type: string title: Subject description: Subject of Mail example: Your test score html: type: object properties: body: type: string description: HTML/Text body string example: Hello John PreviewRequestItem: type: object properties: userId: description: Identifier of the test profile type: string example: test@gmail.com namespace: description: Namespace of the userId. Can be Email, ECID etc type: string example: Email profileAttributes: description: Profile attributes in form of json key values. If profileAttributes are provided in the request payload as JSON key-value pairs, they will be used to render content. In this case, profile details will not be fetched from the Unified Profile Store using userId and namespace. type: object contextAttributes: description: Context attributes in form of json key values type: object required: - userId - namespace parameters: AuthorizationParam: name: Authorization in: header description: Authorization token required: true schema: type: string example: Bearer {{token}} ImsOrgIdParam: name: x-gw-ims-org-id in: header description: Your Identity Management Services (IMS) Organization id required: true schema: type: string example: 0A7F574EBB4C6E1423973F52@AdobeOrg SandboxNameParam: name: x-sandbox-name in: header description: Filter on platform sandbox name required: true schema: type: string example: prod CampaignIdParam: name: campaignId in: path description: Campaign Id required: true schema: type: string example: 8fd4b5e2-e559-425b-bd89-389b007d32d5 APIKeyParam: name: x-api-key in: header description: API Key located in Adobe Developer Console required: true schema: type: string example: 829495afa589475ab56850a702359cf9 requestBodies: CampaignPreviewRequest: description: Campaign Preview Request content: application/json: schema: allOf: - $ref: '#/components/schemas/CampaignPreviewRequest' securitySchemes: imsUserToken: type: http scheme: bearer bearerFormat: JWT