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

# Create a referral profile



## OpenAPI

````yaml https://files.easyflows.io/openapi.json post /api/v1/app/referrals/profiles
openapi: 3.0.0
info:
  title: Easyflows
  version: v1
servers:
  - url: https://{subdomain}.easyflows.io
    variables:
      subdomain:
        default: demo
        description: Subdomain of the project
security: []
paths:
  /api/v1/app/referrals/profiles:
    post:
      tags:
        - Referrals
      summary: Create a referral profile
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: The email of the customer looking to refer friends.
                  example: john.doe@example.com
              required:
                - email
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    allOf:
                      - $ref: '#/components/schemas/ReferralProfile'
                      - description: The main data returned by the API endpoint.
                required:
                  - data
        '400':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: A description of the error that occurred.
                required:
                  - error
components:
  schemas:
    ReferralProfile:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the referral profile.
          example: 0b0abfba-18a4-4b7e-9179-e0cec1f2994f
        member:
          allOf:
            - $ref: '#/components/schemas/Member'
            - description: The member associated with this referral profile.
        invite:
          type: string
          description: The unique referral invite code for the member.
          example: ABC123
        reward:
          $ref: '#/components/schemas/RewardFulfillment'
        enabled:
          type: boolean
          description: Indicates if the referral profile is enabled.
          example: true
        created_at:
          type: string
          description: The date and time when the referral profile was created.
          example: '2026-01-01T12:00:00Z'
      required:
        - id
        - member
        - invite
        - reward
        - enabled
        - created_at
    Member:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the member.
          example: f804cfec-39ec-45cc-845a-4fe51b80d2f0
        name:
          type: string
          description: The name of the member.
          example: John Doe
      required:
        - id
        - name
    RewardFulfillment:
      allOf:
        - $ref: '#/components/schemas/Reward'
        - type: object
          properties:
            id:
              type: string
              description: The unique identifier of the fulfilled reward.
              example: d9f8a7c6-5b4e-4c3d-9a2b-1e0f2a3b4c5d
            code:
              type: string
              description: The reward code that can be redeemed at checkout.
              example: 10-OFF
            expires_at:
              type: string
              nullable: true
              description: >-
                The date and time when the reward expires, or null if it doesn't
                expire.
              example: '2026-12-31T23:59:59Z'
            revoked_at:
              type: string
              nullable: true
              description: >-
                The date and time when the reward was revoked, or null if it
                hasn't been revoked.
              example: null
            created_at:
              type: string
              description: The date and time when the reward was created.
              example: '2026-01-01T12:00:00Z'
          required:
            - code
            - expires_at
            - revoked_at
            - created_at
      description: The reward associated with this referral profile.
    Reward:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the reward.
          example: c08c5d3b-e98f-4c47-b7e1-7b8e792f99ea
        type:
          type: string
          enum:
            - coupon
            - giftcard
            - code
          description: The type of the reward.
          example: coupon
        name:
          type: string
          description: The name of the reward.
          example: 10% Off Coupon
        description:
          type: string
          nullable: true
          description: The description of the reward.
          example: Get 10% off your next purchase.
        image:
          type: string
          nullable: true
          description: The image URL of the reward.
          example: https://example.com/reward.jpg
      required:
        - id
        - type
        - name
        - description
        - image

````