> ## 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 link



## OpenAPI

````yaml /openapi.json post /affiliate_links
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_links:
    post:
      summary: Create an affiliate link
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - affiliate_id
              properties:
                affiliate_id:
                  type: string
                token:
                  type: string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AffiliateLink'
components:
  schemas:
    AffiliateLink:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          example: affiliate_link
        url:
          type: string
        token:
          type: string
        visitors:
          type: integer
        leads:
          type: integer
        conversions:
          type: integer
        affiliate_id:
          type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Use your API secret as the username, with an empty password.

````