> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appcharge.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Post Purchase Popup Design

> Creates a post purchase popup design.

<RequestExample>
  ```bash Create Post Purchase Popup Design theme={"system"}
  curl -X POST \
    'https://api.appcharge.com/components/v1/offer-design' \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'x-publisher-token: <x-publisher-token>' \
    --data '{
      "offerUiType": "PopUp",
      "offerUiSubType": "PostPurchase",
      "name": "Post Purchase Popup Design",
      "externalId": "post-purchase-popup-design",
      "backgroundImageUrl": "https://media.appcharge.com/media/65cb7861ec8924a6b69a0f59/background.png",
      "title": {
        "text": "Post purchase offer",
        "fontColor": "#FFFFFF",
        "fontSize": 20,
        "fontWeight": "medium"
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Create Post Purchase Popup Design theme={"system"}
  {
    "id": "6a09aa1018b751228b09faed",
    "offerUiType": "PopUp",
    "offerUiSubType": "PostPurchase",
    "name": "Post Purchase Popup Design",
    "externalId": "post-purchase-popup-design",
    "backgroundImageUrl": "https://media.appcharge.com/media/65cb7861ec8924a6b69a0f59/background.png",
    "title": {
      "text": "Post purchase offer",
      "fontColor": "#FFFFFF",
      "fontSize": 20,
      "fontWeight": "medium"
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi-post-purchase-popup-design.json POST /components/v1/offer-design
openapi: 3.0.3
info:
  title: Post Purchase Popup Designs API
  version: 1.0.0
servers:
  - url: https://api-sandbox.appcharge.com
security:
  - PublisherTokenAuth: []
tags:
  - name: Offer Designs
paths:
  /components/v1/offer-design:
    post:
      tags:
        - Offer Designs
      description: Creates a post purchase popup design.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostPurchasePopupDesignCreate'
      responses:
        '200':
          description: Offer design created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostPurchasePopupDesignResponse'
        '400':
          description: Bad request. Invalid input or validation failure.
components:
  schemas:
    PostPurchasePopupDesignCreate:
      title: Post Purchase Popup Design
      type: object
      description: Creates a post purchase popup design.
      properties:
        offerUiType:
          type: string
          enum:
            - PopUp
          description: Type of offer design.
          example: PopUp
        name:
          type: string
          description: Offer design name.
          example: Post Purchase Popup Design
        externalId:
          type: string
          description: Design ID that you define.
          example: post-purchase-popup-design
        backgroundImageUrl:
          type: string
          format: url
          description: >-
            Background image URL in PNG or JPEG format.


            For uploaded files, this is the Appcharge-hosted CDN URL. For
            external image URLs, this is the original image URL served from the
            provided URL. External image URLs are saved and used as-is, and
            Appcharge doesn't download, copy, upload, or host them. Images must
            remain available at the provided URLs.


            We recommend uploading image files instead of using external URLs
            when possible.
          example: >-
            https://media.appcharge.com/media/65cb7861ec8924a6b69a0f59/background.png
        title:
          allOf:
            - $ref: '#/components/schemas/OfferTitleCreate'
        offerUiSubType:
          type: string
          enum:
            - PostPurchase
          description: >-
            Popup design subtype. Use `PostPurchase` for post purchase popup
            designs.
          example: PostPurchase
      required:
        - offerUiType
        - name
        - externalId
        - backgroundImageUrl
        - offerUiSubType
    PostPurchasePopupDesignResponse:
      title: Post Purchase Popup Design
      type: object
      properties:
        id:
          type: string
          description: Design ID.
          example: 6a09aa1018b751228b09faed
        offerUiType:
          type: string
          enum:
            - PopUp
          description: Type of offer design.
          example: PopUp
        name:
          type: string
          description: Offer design name.
          example: Post Purchase Popup Design
        externalId:
          type: string
          description: Design ID that you defined.
          example: post-purchase-popup-design
        backgroundImageUrl:
          type: string
          format: url
          description: >-
            Background image URL. For uploaded files, this is the
            Appcharge-hosted CDN URL. For external image URLs, this is the
            original image URL served from the provided URL.
          example: >-
            https://media.appcharge.com/media/65cb7861ec8924a6b69a0f59/background.png
        title:
          allOf:
            - $ref: '#/components/schemas/OfferTitleResponse'
        externalBackgroundImageUrl:
          type: string
          format: url
          description: >-
            Original background image URL when the design uses an external image
            URL. This URL is used as provided to serve the image.
          example: https://cdn.example.com/assets/background.png
        offerUiSubType:
          type: string
          enum:
            - PostPurchase
          description: >-
            Popup design subtype. Use `PostPurchase` for post purchase popup
            designs.
          example: PostPurchase
    OfferTitleCreate:
      type: object
      properties:
        text:
          type: string
          description: Offer title.
          example: Post purchase offer
        fontColor:
          type: string
          description: Title font color.
          example: '#FFFFFF'
        fontSize:
          type: number
          description: Font size in pixels.
          example: 20
        fontWeight:
          type: string
          description: Font weight.
          example: medium
      required:
        - text
        - fontColor
        - fontSize
        - fontWeight
    OfferTitleResponse:
      type: object
      properties:
        text:
          type: string
          description: Offer title.
          example: Post purchase offer
        fontColor:
          type: string
          description: Title font color.
          example: '#FFFFFF'
        fontSize:
          type: number
          description: Font size in pixels.
          example: 20
        fontWeight:
          type: string
          description: Font weight.
          example: medium
  securitySchemes:
    PublisherTokenAuth:
      type: apiKey
      in: header
      name: x-publisher-token
      description: Publisher token, as displayed in the Publisher Dashboard.

````