> ## 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 Special Offer Design

> Creates a special offer design.

<RequestExample>
  ```bash Create Special Offer 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": "SpecialOffer",
      "name": "Summer Special Design",
      "externalId": "summer-special-design",
      "backgroundImageUrl": "https://media.appcharge.com/media/65cb7861ec8924a6b69a0f59/background.png",
      "title": {
        "text": "Limited Time Offer",
        "fontColor": "#ffffff",
        "fontSize": 20,
        "fontWeight": "bold"
      },
      "buttonSuffixImage": "https://media.appcharge.com/media/65cb7861ec8924a6b69a0f59/button-suffix.png",
      "buttonSuffixAnimation": "https://media.appcharge.com/media/65cb7861ec8924a6b69a0f59/button-suffix-animation.json"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Create Special Offer Design theme={"system"}
  {
    "id": "68b3f37f3a2852af1a154fae",
    "offerUiType": "SpecialOffer",
    "name": "Summer Special Design",
    "externalId": "summer-special-design",
    "backgroundImageUrl": "https://media.appcharge.com/media/65cb7861ec8924a6b69a0f59/background.png",
    "title": {
      "text": "Limited Time Offer",
      "fontColor": {
        "colorOne": "#ffffff"
      },
      "fontSize": 20,
      "fontWeight": "bold"
    },
    "buttonSuffixImage": "https://media.appcharge.com/media/65cb7861ec8924a6b69a0f59/button-suffix.png",
    "buttonSuffixAnimation": "https://media.appcharge.com/media/65cb7861ec8924a6b69a0f59/button-suffix-animation.json"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi-special-offer-design.json POST /components/v1/offer-design
openapi: 3.0.3
info:
  title: Special Offer 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 special offer design.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpecialOffersDesignCreate'
      responses:
        '200':
          description: Offer design created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpecialOffersDesignResponse'
        '400':
          description: Bad request. Invalid input or validation failure.
components:
  schemas:
    SpecialOffersDesignCreate:
      title: Special Offer Design
      type: object
      description: Design a special offer.
      properties:
        offerUiType:
          type: string
          enum:
            - SpecialOffer
          description: Type of offer design.
          example: SpecialOffer
        name:
          type: string
          description: Offer design name.
          example: Summer Special Design
        externalId:
          type: string
          description: Design ID that you define.
          example: summer-special-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'
        buttonSuffixImage:
          type: string
          description: Button asset suffix for the promotion offer design.
          example: >-
            https://media.appcharge.com/media/65cb7861ec8924a6b69a0f59/button-suffix.png
        buttonSuffixAnimation:
          type: string
          description: Button asset suffix animation for the promotion offer design.
          example: >-
            https://media.appcharge.com/media/65cb7861ec8924a6b69a0f59/button-suffix-animation.json
      required:
        - offerUiType
        - name
        - externalId
        - backgroundImageUrl
    SpecialOffersDesignResponse:
      title: Special Offer Design
      type: object
      properties:
        id:
          type: string
          description: Design ID.
          example: 68b3f37f3a2852af1a154fae
        offerUiType:
          type: string
          enum:
            - SpecialOffer
          description: Type of offer design.
          example: SpecialOffer
        name:
          type: string
          description: Offer design name.
          example: Summer Special Design
        externalId:
          type: string
          description: Design ID that you defined.
          example: summer-special-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
        buttonSuffixImage:
          type: string
          description: Button asset suffix for the promotion offer design.
          example: >-
            https://media.appcharge.com/media/65cb7861ec8924a6b69a0f59/button-suffix.png
        buttonSuffixAnimation:
          type: string
          description: Button asset suffix animation for the promotion offer design.
          example: >-
            https://media.appcharge.com/media/65cb7861ec8924a6b69a0f59/button-suffix-animation.json
    OfferTitleCreate:
      type: object
      properties:
        text:
          type: string
          description: Offer title.
          example: Limited Time 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: bold
      required:
        - text
        - fontColor
        - fontSize
        - fontWeight
    OfferTitleResponse:
      type: object
      properties:
        text:
          type: string
          description: Offer title.
          example: Limited Time Offer
        fontColor:
          allOf:
            - $ref: '#/components/schemas/ColorDetails'
        fontSize:
          type: number
          description: Font size in pixels.
          example: 20
        fontWeight:
          type: string
          description: Font weight.
          example: bold
    ColorDetails:
      type: object
      description: Color details returned by offer designs.
      properties:
        colorOne:
          type: string
          description: Primary color.
          example: '#FFFFFF'
        colorTwo:
          type: string
          description: Secondary color.
          example: '#FDFCF9'
        direction:
          type: string
          description: Direction of the color transition.
          example: to right
  securitySchemes:
    PublisherTokenAuth:
      type: apiKey
      in: header
      name: x-publisher-token
      description: Publisher token, as displayed in the Publisher Dashboard.

````