> ## 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 Promotion Code

> Create a promotion code for a connected account.



## OpenAPI

````yaml post /stripe/connect/accounts/{accountId}/promotion-codes
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}/promotion-codes:
    post:
      tags:
        - Stripe Connect
      summary: Create Promotion Code
      description: Create a promotion code 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
                  required:
                    - coupon
                  properties:
                    coupon:
                      type: string
                      description: >-
                        The ID of the coupon to create a promotion code for
                        (required)
                      example: rgJkxQB4
                    code:
                      type: string
                      description: >-
                        The customer-facing code. If not provided, Stripe will
                        generate one
                      example: SUMMER20
                    customer:
                      type: string
                      description: >-
                        The customer ID that this promotion code can be used by.
                        If not set, any customer can use it
                      example: cus_TppcYxuTJKLNnG
                    max_redemptions:
                      type: integer
                      description: >-
                        Maximum number of times this promotion code can be
                        redeemed
                      example: 10
                    expires_at:
                      type: integer
                      description: >-
                        Unix timestamp specifying when the promotion code
                        expires
                      example: 1770137940
                    restrictions:
                      type: object
                      description: Restrictions on the promotion code
                      properties:
                        first_time_transaction:
                          type: boolean
                          description: >-
                            Whether this promotion code is only valid for first
                            time transactions
                          example: true
                        minimum_amount:
                          type: integer
                          description: >-
                            Minimum amount required to redeem this promotion
                            code (in cents)
                          example: 1000
                        minimum_amount_currency:
                          type: string
                          description: Currency for minimum_amount
                          example: usd
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the promotion code
                    example: promo_1SucFwRjNw7C4HMK01fsfjOh
                  object:
                    type: string
                    description: Object type
                    example: promotion_code
                  active:
                    type: boolean
                    description: Whether the promotion code is active
                    example: true
                  code:
                    type: string
                    description: The customer-facing code
                    example: SUMMER20
                  coupon:
                    type: object
                    description: The coupon associated with this promotion code
                    properties:
                      id:
                        type: string
                        example: rgJkxQB4
                      object:
                        type: string
                        example: coupon
                      amount_off:
                        type: integer
                        nullable: true
                        example: null
                      created:
                        type: integer
                        example: 1751915454
                      currency:
                        type: string
                        example: usd
                      duration:
                        type: string
                        example: repeating
                      duration_in_months:
                        type: integer
                        nullable: true
                        example: 3
                      livemode:
                        type: boolean
                        example: true
                      max_redemptions:
                        type: integer
                        nullable: true
                        example: null
                      metadata:
                        type: object
                        example: {}
                      name:
                        type: string
                        example: 3Months Off
                      percent_off:
                        type: number
                        nullable: true
                        example: 10
                      redeem_by:
                        type: integer
                        nullable: true
                        example: null
                      times_redeemed:
                        type: integer
                        example: 6
                      valid:
                        type: boolean
                        example: true
                  created:
                    type: integer
                    description: Unix timestamp of when the promotion code was created
                    example: 1769620216
                  customer:
                    type: string
                    nullable: true
                    description: The customer that this promotion code can be used by
                    example: cus_TppcYxuTJKLNnG
                  customer_account:
                    type: string
                    nullable: true
                    example: null
                  expires_at:
                    type: integer
                    nullable: true
                    description: Unix timestamp of when the promotion code expires
                    example: 1770137940
                  livemode:
                    type: boolean
                    example: true
                  max_redemptions:
                    type: integer
                    nullable: true
                    example: 10
                  metadata:
                    type: object
                    example: {}
                  restrictions:
                    type: object
                    properties:
                      first_time_transaction:
                        type: boolean
                        example: true
                      minimum_amount:
                        type: integer
                        nullable: true
                        example: null
                      minimum_amount_currency:
                        type: string
                        nullable: true
                        example: null
                  times_redeemed:
                    type: integer
                    example: 0
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 'Missing required field: coupon'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: An unexpected error occurred

````