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

# Create an affiliate coupon



## OpenAPI

````yaml /openapi.json post /affiliate_coupons
openapi: 3.1.0
info:
  title: Referralful API
  version: 1.0.0
  description: Rewardful-compatible REST API for affiliate programs built on Stripe.
servers:
  - url: https://api.referralful.com/v1
security:
  - basicAuth: []
paths:
  /affiliate_coupons:
    post:
      summary: Create an affiliate coupon
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - affiliate_id
                - token
              properties:
                affiliate_id:
                  type: string
                token:
                  type: string
                  description: The coupon code.
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AffiliateCoupon'
components:
  schemas:
    AffiliateCoupon:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          example: affiliate_coupon
        token:
          type: string
          description: The coupon code.
        affiliate_id:
          type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Use your API secret as the username, with an empty password.

````