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

# Create Coupon

> Create a coupon for a connected account.



## OpenAPI

````yaml post /stripe/connect/accounts/{accountId}/coupons
openapi: 3.0.1
info:
  title: ChatDash API Documentation
  description: API Documentation for the ChatDash Server
  version: 2.0.0
servers:
  - url: https://api.chat-dash.com/v1/public
security: []
paths:
  /stripe/connect/accounts/{accountId}/coupons:
    post:
      tags:
        - Stripe Connect
      summary: Create Coupon
      description: Create a coupon for a connected account.
      parameters:
        - name: Authorization
          in: header
          required: true
          description: >-
            All requests to the ChatDash API must be validated with the agency
            API Key found on your agency profile
          schema:
            type: string
        - name: accountId
          in: path
          required: true
          description: The Stripe connected account ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  type: object
                  properties:
                    name:
                      type: string
                      description: Display name for the coupon
                      example: Summer Sale
                    percent_off:
                      type: number
                      description: >-
                        Percent discount (1-100). Required if amount_off is not
                        provided.
                      example: 25
                    amount_off:
                      type: integer
                      description: >-
                        Amount off in smallest currency unit. Required if
                        percent_off is not provided.
                      example: 1000
                    currency:
                      type: string
                      description: >-
                        Three-letter ISO currency code. Required when amount_off
                        is provided.
                      example: usd
                    duration:
                      type: string
                      enum:
                        - once
                        - repeating
                        - forever
                      description: How long the coupon applies. Defaults to 'once'.
                      default: once
                      example: once
                    duration_in_months:
                      type: integer
                      description: >-
                        Number of months the coupon applies. Required when
                        duration is 'repeating'.
                      example: 3
                    max_redemptions:
                      type: integer
                      description: Maximum number of times the coupon can be redeemed
                      example: 100
                    redeem_by:
                      type: integer
                      description: >-
                        Unix timestamp after which the coupon can no longer be
                        redeemed
                      example: 1735689600
            example:
              data:
                name: Summer Sale
                percent_off: 25
                duration: once
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The coupon ID
                    example: SUMMER20
                  object:
                    type: string
                    example: coupon
                  amount_off:
                    type: integer
                    nullable: true
                    example: null
                  created:
                    type: integer
                    example: 1700000000
                  currency:
                    type: string
                    nullable: true
                    example: null
                  duration:
                    type: string
                    example: once
                  duration_in_months:
                    type: integer
                    nullable: true
                    example: null
                  livemode:
                    type: boolean
                    example: true
                  max_redemptions:
                    type: integer
                    nullable: true
                    example: null
                  metadata:
                    type: object
                    example: {}
                  name:
                    type: string
                    example: Summer Sale
                  percent_off:
                    type: number
                    nullable: true
                    example: 25
                  redeem_by:
                    type: integer
                    nullable: true
                    example: null
                  times_redeemed:
                    type: integer
                    example: 0
                  valid:
                    type: boolean
                    example: true
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: An unexpected error occurred

````